Feature 7184 New Generation RO enhancemnt
New module vim_admin:
- check and load unattending ro_tasks
- check for vim updates and deletion in order to re-load it
- check vim_connectivity at creation edition
- Injection of ssh keys, retry if fails
- allow non load filesystem, because it is used only for cloud-init, but
it can be provided as text by LCM
- load sdn and wim targets
- sdn connectivity
- set network type 'data' when there are SRIOV or PT interfaces
Change-Id: I67147d1d500d60f0b2be1de214c97b1905168c8e
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/RO-plugin/osm_ro_plugin/vim_dummy.py b/RO-plugin/osm_ro_plugin/vim_dummy.py
index 3189239..e90d213 100644
--- a/RO-plugin/osm_ro_plugin/vim_dummy.py
+++ b/RO-plugin/osm_ro_plugin/vim_dummy.py
@@ -25,6 +25,7 @@
from uuid import uuid4
from copy import deepcopy
import logging
+from random import randrange
__author__ = "Alfonso Tierno"
__date__ = "2020-04-20"
@@ -248,6 +249,12 @@
"vim_interface_id": str(iface_index),
"vim_net_id": iface["net_id"],
}
+ if iface.get("type") in ("SR-IOV", "PCI-PASSTHROUGH") and self.config.get("sdn-port-mapping"):
+ compute_index = randrange(len(self.config["sdn-port-mapping"]))
+ port_index = randrange(len(self.config["sdn-port-mapping"][compute_index]["ports"]))
+ interface["compute_node"] = self.config["sdn-port-mapping"][compute_index]["compute_node"]
+ interface["pci"] = self.config["sdn-port-mapping"][compute_index]["ports"][port_index]["pci"]
+
interfaces.append(interface)
vm = {
"id": vm_id,