diff options
Diffstat (limited to 'lcm')
-rw-r--r-- | lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py | 18 | ||||
-rw-r--r-- | lcm/lcm/pub/database/models.py | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py index 6bc996fb..5d622741 100644 --- a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py +++ b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py @@ -438,14 +438,18 @@ class InstVnf(Thread): JobUtil.add_job_status(self.job_id, 50, 'Create ports!') PortInstModel.objects.create( portid=str(uuid.uuid4()), - networkid=ret["networkId"], - subnetworkid=ret["subnetId"], - vimid=ret["vimId"], - resouceid=ret["id"], - name=ret["name"], - tenant=ret["tenatId"], + networkid=ignore_case_get(ret, "networkId"), + subnetworkid=ignore_case_get(ret, "subnetId"), + name=ignore_case_get(ret, "name"), + vimid=ignore_case_get(ret, "vimId"), + resouceid=ignore_case_get(ret, "id"), + tenant=ignore_case_get(ret, "tenantId"), + macaddress = ignore_case_get(ret, "macAddress"), + ipaddress = ignore_case_get(ret, "ip"), + typevirtualnic=ignore_case_get(ret, "vnicType"), + securityGroups=ignore_case_get(ret, "securityGroups"), insttype=0, - is_predefined=ret["returnCode"], + is_predefined=ignore_case_get(ret, "returnCode"), instid=self.nf_inst_id) elif res_type == adaptor.RES_FLAVOR: logger.info('Create flavors!') diff --git a/lcm/lcm/pub/database/models.py b/lcm/lcm/pub/database/models.py index a765e24f..de986a11 100644 --- a/lcm/lcm/pub/database/models.py +++ b/lcm/lcm/pub/database/models.py @@ -247,6 +247,8 @@ class PortInstModel(models.Model): interfacename = models.CharField(db_column='INTERFACENAME', max_length=255, blank=True, null=True) vmid = models.CharField(db_column='VMID', max_length=255, blank=True, null=True) create_time = models.CharField(db_column='CREATETIME', max_length=200, null=True, blank=True) + securityGroups = models.CharField(db_column='SECURITYGROUPS', max_length=255) + is_predefined = models.IntegerField(db_column='ISPREDEFINED', default=0, null=True) class CPInstModel(models.Model): class Meta: |