__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
#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
"$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
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: