Change vnf instance order to nsd:constituent-vnfd list order.
Ensure interface are deployed in order
Change-Id: I3f2d43643f6cd25a09d0f21407544657168c3513
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
__author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes"
__date__ = "$26-aug-2014 11:09:29$"
-__version__ = "0.5.70-r580"
-version_date = "Jun 2018"
+__version__ = "0.5.71-r581"
+version_date = "Jul 2018"
database_version = 32 # expected database schema version
vnf=vnfd_id, vdu=vdu_id, iface=iface["name"],
cp=iface.get("internal-connection-point-ref"), msg=str(e)),
HTTP_Bad_Request)
- if iface.get("position") is not None:
- db_interface["created_at"] = int(iface.get("position")) - 1000
+ if iface.get("position"):
+ db_interface["created_at"] = int(iface.get("position")) * 50
if iface.get("mac-address"):
db_interface["mac"] = str(iface.get("mac-address"))
db_interfaces.append(db_interface)
"net2task_id": net2task_id,
"sce_net2instance": sce_net2instance,
}
- sce_vnf_list = sorted(scenarioDict['vnfs'], key=lambda k: k['name'])
- for sce_vnf in sce_vnf_list:
+ # sce_vnf_list = sorted(scenarioDict['vnfs'], key=lambda k: k['name'])
+ for sce_vnf in scenarioDict['vnfs']: # sce_vnf_list:
instantiate_vnf(mydb, sce_vnf, vnf_params, vnf_params_out, rollbackList)
task_index = vnf_params_out["task_index"]
uuid_list = vnf_params_out["uuid_list"]
if table_name in self.tables_with_created_field:
if "created_at" in row:
- created_time_param = created_time + row.pop("created_at")*0.00001
+ created_time_param = created_time + (index + row.pop("created_at"))*0.00001
else:
created_time_param = created_time + index*0.00001
- index += 1
+ index += 1
else:
created_time_param = 0
self._new_row_internal(table_name, row, add_uuid=False, root_uuid=None,
}
# Gateway should be set to None if not needed. Otherwise openstack assigns one by default
if ip_profile.get('gateway_address'):
- subnet['gateway_ip'] = ip_profile.get('gateway_address')
+ subnet['gateway_ip'] = ip_profile['gateway_address']
+ else:
+ subnet['gateway_ip'] = None
if ip_profile.get('dns_address'):
subnet['dns_nameservers'] = ip_profile['dns_address'].split(";")
if 'dhcp_enabled' in ip_profile:
vnfd-connection-point-ref: eth0
- id: vld2
- name: vld2-name
+ name: nsd-vld2
short-name: vld2-sname
type: ELAN
ip-profile-ref: ipprofileA
ip-address: 10.31.31.5
- id: vld3
- name: vld3-name
+ name: nsd-vld3
short-name: vld3-sname
type: ELAN
ip-profile-ref: no_dhcp
internal-vld:
- description: Internal VL
id: net_internal
- name: net_internal_name
+ name: internal_vld1
short-name: net_internal_sname
type: ELAN
internal-connection-point:
- id-ref: eth2
- ip-address: 10.10.133.4
+ ip-address: 10.10.135.4
- id-ref: eth3
- ip-address: 10.10.133.5
+ ip-address: 10.10.135.5
ip-profile-ref: ip-profile1
ip-profiles:
- description: Inter VNF Link
ip-profile-params:
- gateway-address: 10.10.133.1
+ gateway-address: null
ip-version: ipv4
- subnet-address: 10.10.133.0/24
+ subnet-address: 10.10.135.0/24
dhcp-params:
- count: 200
- start-address: 10.10.133.20
+ count: 100
+ start-address: 10.10.135.20
name: ip-profile1
vdu:
- id: VM1
- name: VM1-name
+ name: VM11
image: US1604
interface:
- name: iface11
vcpu-count: '1'
- id: VM2
image: US1604
- name: VM2-name
+ name: VM12
interface:
- name: iface21
type: EXTERNAL
internal-vld:
- description: Internal VL
id: net_internal
- name: net_internal_name
+ name: internal_vld2
short-name: net_internal_sname
type: ELAN
internal-connection-point:
name: ip-profile1
vdu:
- id: VM1
- name: VM1-name
+ name: VM21
image: US1604
interface:
- name: iface11
vcpu-count: '1'
- id: VM2
image: US1604
- name: VM2-name
+ name: VM22
interface:
- name: iface21
type: EXTERNAL