Feature 7318 check vim-create connectivity and credentials 68/7868/2 v6.0 v6.0.2 v6.0.2rc1 v6.0.3 v6.0.4 v6.0.4rc1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 4 Jul 2019 16:23:20 +0000 (16:23 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 29 Aug 2019 10:46:30 +0000 (10:46 +0000)
change version to be aligned with OSM

Change-Id: Id5a95c51397a4b8722bd8042cabf0f2f0c67d684
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
openmanod
osm_ro/nfvo.py
osm_ro/openmano_schemas.py
osm_ro/vimconn_openstack.py

index d87653d..4cac18c 100755 (executable)
--- a/openmanod
+++ b/openmanod
@@ -53,8 +53,8 @@ import osm_ro
 
 __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
index 9a2e5e1..0782023 100644 (file)
@@ -5189,7 +5189,13 @@ def datacenter_action(mydb, tenant_id, datacenter, action_dict):
     #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
index 988b6ca..ef9d62c 100644 (file)
@@ -257,8 +257,9 @@ datacenter_action_schema = {
     "$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
index 073a752..4a897a3 100644 (file)
@@ -448,6 +448,10 @@ class vimconnector(vimconn.vimconnector):
                     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: