Fix minor issues in policy interface 88/105688/1
authorkrishnaa96 <krishna.moorthy6@wipro.com>
Thu, 9 Apr 2020 15:23:23 +0000 (20:53 +0530)
committerkrishnaa96 <krishna.moorthy6@wipro.com>
Thu, 9 Apr 2020 15:25:21 +0000 (20:55 +0530)
Issue-ID: OPTFRA-731
Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Change-Id: I65e12da03b3f3881abda2dd3d1313ebe163fc3ff

config/common_config.yaml
osdf/adapters/policy/interface.py

index 04a5594..835ade5 100644 (file)
@@ -83,7 +83,7 @@ policy_info:
             -
                 scope:
                   - OSDF_FRANKFURT
-                service:
+                services:
                     - get_param: service_name
 
     placement:
@@ -94,7 +94,7 @@ policy_info:
                     - OSDF_FRANKFURT
                 geography:
                     - US
-                service:
+                services:
                     - get_param: service_name
                 resources:
                     - get_param: resource
index e38af50..ccbd3dc 100644 (file)
@@ -122,7 +122,7 @@ def policy_api_call(rest_client, scope_fields):
                      "ONAPComponent": "OOF_Component",
                      "ONAPInstance": "OOF_Component_Instance",
                      "action": "optimize",
-                     "resources": scope_fields}
+                     "resource": scope_fields}
     return rest_client.request(json=api_call_body)
 
 def remote_api(req_json, osdf_config, service_type="placement"):
@@ -133,7 +133,7 @@ def remote_api(req_json, osdf_config, service_type="placement"):
     :return: all related policies and provStatus retrieved from Subscriber policy
     """
     config = osdf_config.deployment
-    headers = {"Content-typeapplication/json"}
+    headers = {"Content-type": "application/json"}
     uid, passwd = config['policyPlatformUsername'], config['policyPlatformPassword']
     url = config['policyPlatformUrl']
     rc = RestClient(userid=uid, passwd=passwd, headers=headers, url=url, log_func=debug_log.debug)