def __init__(self): for key in conf.PLUGINS[const.PLUGINS].keys(): self._plugins[key] = utils.import_object( conf.PLUGINS[const.PLUGINS][key]) LOG.debug("Loaded device plugin %s\n" % \ conf.PLUGINS[const.PLUGINS][key]) if key in conf.PLUGINS[const.INVENTORY].keys(): self._inventory[key] = utils.import_object( conf.PLUGINS[const.INVENTORY][key]) LOG.debug("Loaded device inventory %s\n" % \ conf.PLUGINS[const.INVENTORY][key])
def setUp(self): """Setup our tests""" # Initialize cdb and credentials db.configure_db({'sql_connection': 'sqlite:///:memory:'}) cdb.initialize() creds.Store.initialize() # Create a place a store net and port ids for the druation of the test self.net_id = 0 self.port_id = 0 # Create the multiblade object self._l2network_multiblade = l2network_multi_blade. \ L2NetworkMultiBlade() self.plugin_key = "quantum.plugins.cisco.ucs.cisco_ucs_plugin" + \ ".UCSVICPlugin" # Get UCS inventory to make sure all UCSs are affected by tests for key in conf.PLUGINS[const.PLUGINS].keys(): if key in conf.PLUGINS[const.INVENTORY].keys(): self._inventory[key] = utils.import_object( conf.PLUGINS[const.INVENTORY][key]) self.ucs_count = self._inventory['ucs_plugin'].\ _inventory.__len__()
def __init__(self): """ Extracts the configuration parameters from the configuration file """ self._client = utils.import_object(conf.NEXUS_DRIVER) LOG.debug("Loaded driver %s\n" % conf.NEXUS_DRIVER) self._nexus_ip = conf.NEXUS_IP_ADDRESS self._nexus_username = cred.Store.getUsername(conf.NEXUS_IP_ADDRESS) self._nexus_password = cred.Store.getPassword(conf.NEXUS_IP_ADDRESS) self._nexus_first_port = conf.NEXUS_FIRST_PORT self._nexus_second_port = conf.NEXUS_SECOND_PORT self._nexus_ssh_port = conf.NEXUS_SSH_PORT
def verify_plugin(self, plugin_key): """ Verifies the PlugIn available """ _plugins = {} for key in conf.PLUGINS[const.PLUGINS].keys(): _plugins[key] = \ utils.import_object(conf.PLUGINS[const.PLUGINS][key]) if not plugin_key in _plugins.keys(): LOG.debug("No %s Plugin loaded" % plugin_key) return False else: LOG.debug("Plugin %s founded" % const.UCS_PLUGIN) return True
def __init__(self): cdb.initialize() cred.Store.initialize() self._model = utils.import_object(conf.MODEL_CLASS) self._vlan_mgr = utils.import_object(conf.MANAGER_CLASS) LOG.debug("L2Network plugin initialization done successfully\n")
def __init__(self): self._driver = utils.import_object(conf.UCSM_DRIVER) LOG.debug("Loaded driver %s\n" % conf.UCSM_DRIVER) # TODO (Sumit) Make the counter per UCSM self._port_profile_counter = 0