From 7987ff69ffd6db7f609715ccecee20bdb7868f36 Mon Sep 17 00:00:00 2001 From: "ying.yunlong" Date: Tue, 10 Oct 2017 14:00:39 +0800 Subject: Update vfc-nfvo-lcm service-type field 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 --- lcm/ns/ns_create.py | 4 ++-- lcm/ns/ns_delete.py | 4 ++-- lcm/ns/vnfs/create_vnfs.py | 2 +- lcm/ns/vnfs/terminate_nfs.py | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lcm/ns/ns_create.py b/lcm/ns/ns_create.py index e5435816..f7cf3ca6 100644 --- a/lcm/ns/ns_create.py +++ b/lcm/ns/ns_create.py @@ -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 } ] diff --git a/lcm/ns/ns_delete.py b/lcm/ns/ns_delete.py index 52b0df84..dde89d1a 100644 --- a/lcm/ns/ns_delete.py +++ b/lcm/ns/ns_delete.py @@ -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)) diff --git a/lcm/ns/vnfs/create_vnfs.py b/lcm/ns/vnfs/create_vnfs.py index caaefc2d..f7b94911 100644 --- a/lcm/ns/vnfs/create_vnfs.py +++ b/lcm/ns/vnfs/create_vnfs.py @@ -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", diff --git a/lcm/ns/vnfs/terminate_nfs.py b/lcm/ns/vnfs/terminate_nfs.py index c88e844e..d641debc 100644 --- a/lcm/ns/vnfs/terminate_nfs.py +++ b/lcm/ns/vnfs/terminate_nfs.py @@ -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)) -- cgit 1.2.3-korg