diff options
author | Ruoyu Ying <ruoyu.ying@intel.com> | 2018-09-14 18:52:35 +0800 |
---|---|---|
committer | Ruoyu Ying <ruoyu.ying@intel.com> | 2018-09-14 18:53:34 +0800 |
commit | a544f7db29abce453fc550bf0b810b5fc4d428a6 (patch) | |
tree | 47882fd8ac73026ce7d56a99b31ae1d9dc0b27b6 | |
parent | bc8b0bb9c90d4e287c96327383e6e37d4b76629d (diff) |
Support InvariantId in NSINST model
Support InvariantId in NSINST model
Change-Id: I88207c221f9999e7fb499ea73e2995b28fad0d16
Issue-ID: VFC-941
Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
-rw-r--r-- | lcm/ns/biz/ns_create.py | 2 | ||||
-rw-r--r-- | lcm/ns/biz/ns_get.py | 1 | ||||
-rw-r--r-- | lcm/pub/database/models.py | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/lcm/ns/biz/ns_create.py b/lcm/ns/biz/ns_create.py index 1f99f22b..6bcc5a05 100644 --- a/lcm/ns/biz/ns_create.py +++ b/lcm/ns/biz/ns_create.py @@ -54,6 +54,7 @@ class CreateNSService(object): packageInfo = ns_package_info["packageInfo"] self.ns_package_id = ignore_case_get(packageInfo, "nsPackageId") self.nsd_id = ignore_case_get(packageInfo, "nsdId") + self.nsd_invariant_id = ignore_case_get(packageInfo, "nsdInvariantId") logger.debug("CreateNSService::check_nsd_valid::ns_package_id=%s,nsd_id=%s", self.ns_package_id, self.nsd_id) def check_ns_inst_name_exist(self): @@ -69,6 +70,7 @@ class CreateNSService(object): name=self.ns_name, nspackage_id=self.ns_package_id, nsd_id=self.nsd_id, + nsd_invariant_id=self.nsd_invariant_id, description=self.description, status='empty', lastuptime=now_time(), diff --git a/lcm/ns/biz/ns_get.py b/lcm/ns/biz/ns_get.py index 4193bfae..31d26866 100644 --- a/lcm/ns/biz/ns_get.py +++ b/lcm/ns/biz/ns_get.py @@ -40,6 +40,7 @@ class GetNSInfoService(object): 'nsName': ns_inst.name, 'description': ns_inst.description, 'nsdId': ns_inst.nsd_id, + 'nsdInvariantId': ns_inst.nsd_invariant_id, 'vnfInfoId': self.get_vnf_infos(ns_inst.id), 'vlInfo': self.get_vl_infos(ns_inst.id), 'vnffgInfo': self.get_vnffg_infos(ns_inst.id, ns_inst.nsd_model), diff --git a/lcm/pub/database/models.py b/lcm/pub/database/models.py index a078c6a8..7c6fee73 100644 --- a/lcm/pub/database/models.py +++ b/lcm/pub/database/models.py @@ -36,6 +36,7 @@ class NSInstModel(models.Model): name = models.CharField(db_column='NAME', max_length=200) nspackage_id = models.CharField(db_column='NSPACKAGEID', max_length=200, null=True, blank=True) nsd_id = models.CharField(db_column='NSDID', max_length=200) + nsd_invariant_id = models.CharField(db_column='NSDINVARIANTID', max_length=200) description = models.CharField(db_column='DESCRIPTION', max_length=255, null=True, blank=True) sdncontroller_id = models.CharField(db_column='SDNCONTROLLERID', max_length=200, null=True, blank=True) flavour_id = models.CharField(db_column='FLAVOURID', max_length=200, null=True, blank=True) |