avoid openstack default gateway creation at VLD ip-profile.
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>
diff --git a/openmanod b/openmanod
index 5bae20e..e63ddf1 100755
--- a/openmanod
+++ b/openmanod
@@ -48,8 +48,8 @@
__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
diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py
index 5279b9a..76e7244 100644
--- a/osm_ro/nfvo.py
+++ b/osm_ro/nfvo.py
@@ -1149,8 +1149,8 @@
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)
@@ -3208,8 +3208,8 @@
"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"]
diff --git a/osm_ro/nfvo_db.py b/osm_ro/nfvo_db.py
index 3c0e7a5..4376278 100644
--- a/osm_ro/nfvo_db.py
+++ b/osm_ro/nfvo_db.py
@@ -812,10 +812,10 @@
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,
diff --git a/osm_ro/vimconn_openstack.py b/osm_ro/vimconn_openstack.py
index 43fdbc5..ae9dc12 100644
--- a/osm_ro/vimconn_openstack.py
+++ b/osm_ro/vimconn_openstack.py
@@ -463,7 +463,9 @@
}
# 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:
diff --git a/test/RO_tests/v3_2vdu_set_ip_mac/scenario_2vdu_set_ip_mac.yaml b/test/RO_tests/v3_2vdu_set_ip_mac/scenario_2vdu_set_ip_mac.yaml
index 3357f3e..fb76079 100644
--- a/test/RO_tests/v3_2vdu_set_ip_mac/scenario_2vdu_set_ip_mac.yaml
+++ b/test/RO_tests/v3_2vdu_set_ip_mac/scenario_2vdu_set_ip_mac.yaml
@@ -56,7 +56,7 @@
vnfd-connection-point-ref: eth0
- id: vld2
- name: vld2-name
+ name: nsd-vld2
short-name: vld2-sname
type: ELAN
ip-profile-ref: ipprofileA
@@ -71,7 +71,7 @@
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
diff --git a/test/RO_tests/v3_2vdu_set_ip_mac/vnfd_2vdu_set_ip_mac.yaml b/test/RO_tests/v3_2vdu_set_ip_mac/vnfd_2vdu_set_ip_mac.yaml
index b6be27c..e790a9c 100644
--- a/test/RO_tests/v3_2vdu_set_ip_mac/vnfd_2vdu_set_ip_mac.yaml
+++ b/test/RO_tests/v3_2vdu_set_ip_mac/vnfd_2vdu_set_ip_mac.yaml
@@ -16,28 +16,28 @@
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
@@ -67,7 +67,7 @@
vcpu-count: '1'
- id: VM2
image: US1604
- name: VM2-name
+ name: VM12
interface:
- name: iface21
type: EXTERNAL
diff --git a/test/RO_tests/v3_2vdu_set_ip_mac/vnfd_2vdu_set_ip_mac2.yaml b/test/RO_tests/v3_2vdu_set_ip_mac/vnfd_2vdu_set_ip_mac2.yaml
index fe200bf..6c4b6cf 100644
--- a/test/RO_tests/v3_2vdu_set_ip_mac/vnfd_2vdu_set_ip_mac2.yaml
+++ b/test/RO_tests/v3_2vdu_set_ip_mac/vnfd_2vdu_set_ip_mac2.yaml
@@ -16,7 +16,7 @@
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:
@@ -37,7 +37,7 @@
name: ip-profile1
vdu:
- id: VM1
- name: VM1-name
+ name: VM21
image: US1604
interface:
- name: iface11
@@ -67,7 +67,7 @@
vcpu-count: '1'
- id: VM2
image: US1604
- name: VM2-name
+ name: VM22
interface:
- name: iface21
type: EXTERNAL