diff options
author | Ruoyu Ying <ruoyu.ying@intel.com> | 2019-10-30 23:25:55 +0800 |
---|---|---|
committer | Ruoyu Ying <ruoyu.ying@intel.com> | 2019-10-30 23:30:40 +0800 |
commit | eea1300171509e7f5c6aa5e9e01f88a7afa24d0b (patch) | |
tree | adc40b2acf0b4623f317bac70957f2a0fe6b0b05 | |
parent | 20d6ef66c107f9c01c9594edfde6ac0ca5faf7f2 (diff) |
Update Policy config url and pass
Update the config retrieval uri and authorization keys
Issue-ID: OPTFRA-520
Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
Change-Id: I694930fcbf2ac2b17c048d0341571a027552576c
-rwxr-xr-x | config/osdf_config.yaml | 5 | ||||
-rwxr-xr-x | config/preload_secrets.yaml | 8 | ||||
-rw-r--r-- | osdf/adapters/policy/interface.py | 5 |
3 files changed, 5 insertions, 13 deletions
diff --git a/config/osdf_config.yaml b/config/osdf_config.yaml index cf5426b..7ae8cac 100755 --- a/config/osdf_config.yaml +++ b/config/osdf_config.yaml @@ -17,9 +17,8 @@ conductorMaxRetries: 30 # if we don't get something in 30 minutes, give up # versions to be set in HTTP header conductorMinorVersion: 0 -# Policy Platform -- requires ClientAuth, Authorization, and Environment -policyPlatformUrl: http://policy.api.simpledemo.onap.org:8081/pdp/api/getConfig # Policy Dev platform URL -policyPlatformEnv: TEST # Environment for policy platform +# Policy Platform -- requires Authorization +policyPlatformUrl: https://policy-xacml-pdp:6969/policy/pdpx/decision/v1 # Policy Dev platform URL # URL for policy model uploading policyPlatformUrlModelUpload: https://policy.api.simpledemo.onap.org:8081/policy/api/v1/policytypes pathPolicyModelUpload: ../../models/policy/placement/tosca_upload/ diff --git a/config/preload_secrets.yaml b/config/preload_secrets.yaml index 1d2ea01..3050d87 100755 --- a/config/preload_secrets.yaml +++ b/config/preload_secrets.yaml @@ -11,12 +11,8 @@ secrets: Password: plan.15 - name: policyPlatform values: - UserName: testpdp - Password: alpha123 -- name: policyClient - values: - UserName: python - Password: test + UserName: healthcheck + Password: zb!XztG34 - name: dmaap values: UserName: NA diff --git a/osdf/adapters/policy/interface.py b/osdf/adapters/policy/interface.py index 7c3118c..61861de 100644 --- a/osdf/adapters/policy/interface.py +++ b/osdf/adapters/policy/interface.py @@ -128,11 +128,8 @@ def remote_api(req_json, osdf_config, service_type="placement"): """ config = osdf_config.deployment uid, passwd = config['policyPlatformUsername'], config['policyPlatformPassword'] - pcuid, pcpasswd = config['policyClientUsername'], config['policyClientPassword'] - headers = {"ClientAuth": base64.b64encode(bytes("{}:{}".format(pcuid, pcpasswd), "ascii"))} - headers.update({'Environment': config['policyPlatformEnv']}) url = config['policyPlatformUrl'] - rc = RestClient(userid=uid, passwd=passwd, headers=headers, url=url, log_func=debug_log.debug) + rc = RestClient(userid=uid, passwd=passwd, url=url, log_func=debug_log.debug) if osdf_config.core['policy_info'][service_type]['policy_fetch'] == "by_name": policies = get_by_name(rc, req_json[service_type + "Info"]['policyId'], wildcards=True) |