Update vfc-nfvo-lcm service-type field 21/17821/1
authorying.yunlong <ying.yunlong@zte.com.cn>
Tue, 10 Oct 2017 06:00:39 +0000 (14:00 +0800)
committerying.yunlong <ying.yunlong@zte.com.cn>
Tue, 10 Oct 2017 06:00:39 +0000 (14:00 +0800)
Update vfc-nfvo-lcm service-type field to distinguish E2E instance and NetworkService instance

Change-Id: I45309bc86a70be5c4dc9e0e5b94abd818e3a3973
Issue-ID: VFC-502
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
lcm/ns/ns_create.py
lcm/ns/ns_delete.py
lcm/ns/vnfs/create_vnfs.py
lcm/ns/vnfs/terminate_nfs.py

index e543581..f7cf3ca 100644 (file)
@@ -74,13 +74,13 @@ class CreateNSService(object):
             "service-subscriptions": {
                 "service-subscription": [
                     {
-                        "service-type": "service-type-" + self.ns_inst_id,
+                        "service-type": "Network",
                         "service-instances": {
                             "service-instance": [
                                 {
                                     "service-instance-id": self.ns_inst_id,
                                     "service-instance-name": self.ns_name,
-                                    "service-type": "service-type-" + self.ns_inst_id,
+                                    "service-type": "Network",
                                     "service-role": "service-role-" + self.ns_inst_id
                                 }
                             ]
index 52b0df8..dde89d1 100644 (file)
@@ -62,5 +62,5 @@ class DeleteNsService(object):
         if resp_data:
             logger.debug("Fail to delete ns instance[%s] from aai, resp_status: [%s]." % (self.ns_inst_id, resp_status))
         else:
-            logger.debug(
-                "Success to delete ns instance[%s] from aai, resp_status: [%s]." % (self.ns_inst_id, resp_status))
+            logger.debug("Success to delete ns instance[%s] from aai, resp_status: [%s]."
+                         % (self.ns_inst_id, resp_status))
index caaefc2..f7b9491 100644 (file)
@@ -295,7 +295,7 @@ class CreateVnfs(Thread):
                             },
                             {
                                 "relationship-key": "service-subscription.service-type",
-                                "relationship-value": "service-type-" + self.ns_inst_id
+                                "relationship-value": "Network"
                             },
                             {
                                 "relationship-key": "service-instance.service-instance-id",
index c88e844..d641deb 100644 (file)
@@ -11,6 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 import logging
 import traceback
 import json
@@ -142,7 +143,8 @@ class TerminateVnfs(threading.Thread):
         # delete vnf instance from aai
         resp_data, resp_status = delete_vnf_aai(self.vnf_inst_id, resource_version)
         if resp_data:
-            logger.debug("Fail to delete vnf instance[%s] from aai, resp_status: [%s]." % (self.vnf_inst_id, resp_status))
+            logger.debug("Fail to delete vnf instance[%s] from aai, resp_status: [%s]."
+                         % (self.vnf_inst_id, resp_status))
         else:
             logger.debug(
                 "Success to delete vnf instance[%s] from aai, resp_status: [%s]." % (self.vnf_inst_id, resp_status))