Fix slice selection 55/113555/1
authorkrishnaa96 <krishna.moorthy6@wipro.com>
Tue, 6 Oct 2020 05:28:52 +0000 (10:58 +0530)
committerkrishnaa96 <krishna.moorthy6@wipro.com>
Tue, 6 Oct 2020 05:33:30 +0000 (11:03 +0530)
Issue-ID: OPTFRA-855
Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Change-Id: If4f7155ced93d91ae22a2e82db01bcf4c32b6323

apps/slice_selection/optimizers/conductor/remote_opt_processor.py
config/common_config.yaml
osdf/adapters/conductor/templates/conductor_interface.json

index c1c6980..bb9d289 100644 (file)
@@ -35,6 +35,7 @@ from osdf.utils.mdc_utils import mdc_from_json
 
 class SliceSelectionOptimizer(Thread):
     def __init__(self, osdf_config, slice_config, request_json, model_type):
+        super().__init__()
         self.osdf_config = osdf_config
         self.slice_config = slice_config
         self.request_json = request_json
index 905aa0b..8f028b3 100644 (file)
@@ -86,11 +86,12 @@ policy_info:
         policy_scope:
             -
                 scope:
-                  - OSDF_GUILIN
                   - get_param: resource_sharing_level
                   - get_param: reuse_preference
                 services:
                     - get_param: service_name
+                resources:
+                    - get_param: service_name
 
     subnet_selection:
         policy_fetch: by_scope
@@ -99,6 +100,8 @@ policy_info:
                   - OSDF_GUILIN
               services:
                   - get_param: service_name
+              resources:
+                  - get_param: service_name
 
     placement:
         policy_fetch: by_scope
@@ -127,4 +130,4 @@ PCI:
         service_id: ho_metric
         filter:
             interval: 10
-    ml_enabled: false
\ No newline at end of file
+    ml_enabled: false
index e8d47b3..c0e28dc 100755 (executable)
@@ -33,7 +33,7 @@
       {% set comma=joiner(",") %}
       {% for elem in optimization_policies %} {{ comma() }}
         {% for key, value in elem.items() %}
-          "{{key}}": {{ json.dumps(value) }}
+          "{{key}}": {{ json.dumps(value) }} {{ ", " if not loop.last }}
         {% endfor %}
       {% endfor %}
     }