These plugins must implement a vimconnector class derived from this
and all these methods
'''
- def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None, log_level="ERROR", config={}):
+ def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None, log_level=None, config={}):
self.id = uuid
self.name = name
self.url = url
self.passwd = passwd
self.config = config
self.logger = logging.getLogger('openmano.vim')
- self.logger.setLevel( getattr(logging, log_level) )
+ if log_level:
+ self.logger.setLevel( getattr(logging, log_level) )
if not self.url_admin: #try to use normal url
self.url_admin = self.url
}
class vimconnector(vimconn.vimconnector):
- def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None, log_level="DEBUG", config={}):
+ def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None, log_level=None, config={}):
'''using common constructor parameters. In this case
'url' is the keystone authorization url,
'url_admin' is not use
self.n_creds['api_key'] = passwd
self.reload_client = True
self.logger = logging.getLogger('openmano.vim.openstack')
+ if log_level:
+ self.logger.setLevel( getattr(logging, log_level) )
def __setitem__(self,index, value):
'''Set individuals parameters
class vimconnector(vimconn.vimconnector):
def __init__(self, uuid=None, name=None, tenant_id=None, tenant_name=None,
- url=None, url_admin=None, user=None, passwd=None, log_level="ERROR", config={}):
+ url=None, url_admin=None, user=None, passwd=None, log_level=None, config={}):
"""
Constructor create vmware connector to vCloud director.
self.admin_user = None
self.logger = logging.getLogger('openmano.vim.vmware')
- self.logger.setLevel(10)
+ if log_level:
+ self.logger.setLevel( getattr(logging, log_level) )
try:
self.admin_user = config['admin_username']
except KeyError:
raise vimconn.vimconnException(message="Error admin username or admin password is empty.")
- self.logger = logging.getLogger('mano.vim.vmware')
self.org_uuid = None
self.vca = None