Merge "Improve description of push policy for vFW" into casablanca
[integration.git] / test / vcpe / soutils.py
index 3749689..5cfe464 100755 (executable)
@@ -166,6 +166,7 @@ class SoUtils:
                                        'owningEntityName': self.vcpecommon.owning_entity_name}
 
     def generate_custom_service_request(self, instance_name, model, brg_mac):
+        brg_mac_enc = brg_mac.replace(':', '-')
         req_details = {
             'modelInfo':  model,
             'subscriberInfo':  {'subscriberName': 'Kaneohe',
@@ -177,8 +178,16 @@ class SoUtils:
                     {
                         'name': 'BRG_WAN_MAC_Address',
                         'value': brg_mac
-                    }
-                     ,
+                    },
+                    {
+                       'name': 'VfModuleNames',
+                       'value': [
+                            {
+                                'VfModuleModelInvariantUuid': self.vcpecommon.vgw_VfModuleModelInvariantUuid,
+                                'VfModuleName': 'VGW2BRG-{0}'.format(brg_mac_enc)
+                            }
+                       ]
+                    },
                     {
                          "name": "Customer_Location",
                          "value": self.vcpecommon.customer_location_used_by_oof
@@ -208,7 +217,7 @@ class SoUtils:
 
         # create service
         instance_name = '_'.join([self.vcpecommon.instance_name_prefix['service'],
-                                  parser.svc_model['modelName'], name_suffix])
+                                  parser.svc_model['modelName'][0:10], name_suffix])
         instance_name = instance_name.lower()
         req = self.generate_custom_service_request(instance_name, parser.svc_model, brg_mac)
         self.logger.info(json.dumps(req, indent=2, sort_keys=True))
@@ -331,7 +340,7 @@ class SoUtils:
                                                  vnf_instance_id, vnf_model)
             self.logger.debug(json.dumps(req, indent=2, sort_keys=True))
             req_id, vfmodule_instance_id = self.submit_create_req(req, 'vfmodule', svc_instance_id, vnf_instance_id)
-            if not self.check_progress(req_id, eta=70, interval=5):
+            if not self.check_progress(req_id, eta=70, interval=50):
                 self.logger.error('Failed to create VF Module {0}.'.format(vfmodule_instance_name))
                 return None