Feature 7318 check vim-create connectivity and credentials
change version to be aligned with OSM
Change-Id: Id5a95c51397a4b8722bd8042cabf0f2f0c67d684
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/openmanod b/openmanod
index d87653d..4cac18c 100755
--- a/openmanod
+++ b/openmanod
@@ -53,8 +53,8 @@
__author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes"
__date__ = "$26-aug-2014 11:09:29$"
-__version__ = "0.6.20"
-version_date = "May 2019"
+__version__ = "6.0.2.post0"
+version_date = "Aug 2019"
database_version = 39 # expected database schema version
global global_config
diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py
index 9a2e5e1..0782023 100644
--- a/osm_ro/nfvo.py
+++ b/osm_ro/nfvo.py
@@ -5189,7 +5189,13 @@
#get datacenter info
datacenter_id, myvim = get_datacenter_by_name_uuid(mydb, tenant_id, datacenter)
- if 'net-update' in action_dict:
+ if 'check-connectivity' in action_dict:
+ try:
+ myvim.check_vim_connectivity()
+ except vimconn.vimconnException as e:
+ #logger.error("nfvo.datacenter_action() Not possible to get_network_list from VIM: %s ", str(e))
+ raise NfvoException(str(e), e.http_code)
+ elif 'net-update' in action_dict:
try:
nets = myvim.get_network_list(filter_dict={'shared': True, 'admin_state_up': True, 'status': 'ACTIVE'})
#print content
diff --git a/osm_ro/openmano_schemas.py b/osm_ro/openmano_schemas.py
index 988b6ca..ef9d62c 100644
--- a/osm_ro/openmano_schemas.py
+++ b/osm_ro/openmano_schemas.py
@@ -257,8 +257,9 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
- "net-update":{"type":"null",},
- "net-edit":{
+ "check-connectivity": {"type": "null"},
+ "net-update": {"type": "null"},
+ "net-edit": {
"type":"object",
"properties":{
"net": name_schema, #name or uuid of net to change
diff --git a/osm_ro/vimconn_openstack.py b/osm_ro/vimconn_openstack.py
index 073a752..4a897a3 100644
--- a/osm_ro/vimconn_openstack.py
+++ b/osm_ro/vimconn_openstack.py
@@ -448,6 +448,10 @@
self.security_groups_id = None
raise vimconn.vimconnConnectionException("Not found security group {} for this tenant".format(sg))
+ def check_vim_connectivity(self):
+ # just get network list to check connectivity and credentials
+ self.get_network_list(filter_dict={})
+
def get_tenant_list(self, filter_dict={}):
'''Obtain tenants of VIM
filter_dict can contain the following keys: