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 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__()
示例#3
0
def initialize():
    'Establish database connection and load models'
    options = {
        "sql_connection":
        "mysql://%s:%s@%s/%s" %
        (conf.DB_USER, conf.DB_PASS, conf.DB_HOST, conf.DB_NAME)
    }
    db.configure_db(options)
示例#4
0
 def setUp(self):
     db.configure_db({'sql_connection': 'sqlite:///:memory:'})
     cdb.initialize()
     creds.Store.initialize()
     self.tenant_id = "network_admin"
     self.net_name = "TestNetwork1"
     self.vlan_name = "TestVlan1"
     self.vlan_id = 300
     self.net_id = 100
     self.vlan_mgr = L2NetworkVLANMgr()
     self.plugin_key = (
         "quantum.plugins.cisco.ucs.cisco_ucs_plugin.UCSVICPlugin")
    def setUp(self):
        """Setup our tests"""
        # Initialize cdb and credentials
        db.configure_db({'sql_connection': 'sqlite:///:memory:'})
        cdb.initialize()
        creds.Store.initialize()

        # Create the ucs inventory  object
        self._ucs_inventory = UCSInventory()
        self.inventory = self._ucs_inventory._inventory

        # Create a plugin instance to create networks/ports
        self._l2network = L2Network()
示例#6
0
    def setUp(self):
        """Setup our tests"""
        # Initialize cdb and credentials
        db.configure_db({'sql_connection': 'sqlite:///:memory:'})
        cdb.initialize()
        creds.Store.initialize()

        # Create the ucs inventory  object
        self._ucs_inventory = UCSInventory()
        self.inventory = self._ucs_inventory._inventory

        # Create a plugin instance to create networks/ports
        self._l2network = L2Network()
    def __init__(self):
        cdb.initialize()
        cred.Store.initialize()
        self._model = importutils.import_object(conf.MODEL_CLASS)
        self._vlan_mgr = importutils.import_object(conf.MANAGER_CLASS)
        """
        Changes for configure_db accordingly will be done later
        """

        sql_connection = "mysql://%s:%s@%s/%s" % (conf.DB_USER,
                          conf.DB_PASS, conf.DB_HOST, conf.DB_NAME)
        db.configure_db({'sql_connection': sql_connection,
                         'base': models_v2.model_base.BASEV2})
        LOG.debug("L2Network plugin initialization done successfully\n")
示例#8
0
 def setUp(self):
     """
     Set up function
     """
     self.tenant_id = "test_tenant_cisco1"
     self.net_name = "test_network_cisco1"
     self.net_id = 000007
     self.vlan_name = "q-" + str(self.net_id) + "vlan"
     self.vlan_id = 267
     self.port_id = "9"
     db.configure_db({'sql_connection': 'sqlite:///:memory:'})
     cdb.initialize()
     cred.Store.initialize()
     self._cisco_nexus_plugin = cisco_nexus_plugin.NexusPlugin()
示例#9
0
 def setUp(self):
     """
     Set up function
     """
     self.tenant_id = "test_tenant_cisco1"
     self.net_name = "test_network_cisco1"
     self.net_id = 000007
     self.vlan_name = "q-" + str(self.net_id) + "vlan"
     self.vlan_id = 267
     self.port_id = "9"
     db.configure_db({'sql_connection': 'sqlite:///:memory:'})
     cdb.initialize()
     cred.Store.initialize()
     self._cisco_nexus_plugin = cisco_nexus_plugin.NexusPlugin()
示例#10
0
def initialize():
    'Establish database connection and load models'
    options = {"sql_connection": "mysql://%s:%s@%s/%s" % (conf.DB_USER,
    conf.DB_PASS, conf.DB_HOST, conf.DB_NAME)}
    db.configure_db(options)
示例#11
0
def initialize():
    """Establish database connection and load models"""
    db.configure_db()
示例#12
0
def initialize():
    """Establish database connection and load models."""
    db.configure_db()