Esempio n. 1
0
    def __init__(self, config_data, parent):
        self.type = 'ONOS'
        self.config = self
        self.config_parent = parent

        self.name = config_data.get('name', '{}.ONOS.{}'.format(parent.name, str(get_uuid())))
        self.seed_file = config_data.get('seed-file', parent.seed_file)
        self.logging_level = config_data.get('logging-level', parent.logging_level)
        self.cache_client = config_data.get('cache-client', parent.cache_client)

        base_module_name = __name__[:-len(path.splitext(path.basename(__file__))[0]) - 1]
        logging.getLogger(base_module_name).setLevel(levelname_to_level(self.logging_level))

        self.address = config_data.get('address')
        self.username = config_data.get('username', 'onos')
        self.password = config_data.get('password', 'rocks')
        self.port = config_data.get('port')
Esempio n. 2
0
    def __init__(self, config_data, parent):
        self.type = 'OpenStack'
        self.config = self
        self.config_parent = parent

        self.name = config_data.get('name', '{}OpenStack.{}'.format(parent.name, str(get_uuid())))
        self.seed_file = config_data.get('seed-file', parent.seed_file)
        self.logging_level = config_data.get('logging-level', parent.logging_level)
        self.cache_client = config_data.get('cache-client', parent.cache_client)

        base_module_name = __name__[:-len(path.splitext(path.basename(__file__))[0]) - 1]
        logging.getLogger(base_module_name).setLevel(levelname_to_level(self.logging_level))

        self.auth_url = config_data.get('OS_AUTH_URL')
        self.username = config_data.get('OS_USERNAME')
        self.password = config_data.get('OS_PASSWORD')
        self.project = config_data.get('OS_PROJECT_NAME')
        self.region_name = config_data.get('OS_REGION_NAME')
        self.user_domain_name = config_data.get('OS_USER_DOMAIN_NAME')
        self.project_domain_name = config_data.get('OS_PROJECT_DOMAIN_NAME')
        self.certificate_path = config_data.get('OS_CA_PATH')