示例#1
0
    def setUp(self):
        super(NeutronNetworkAPITest, self).setUp()
        self.useFixture(cfg_fixture.Config(CONF))

        CONF.set_override('endpoints', ['RegionOne|http://localhost:9696'],
                          'network_api:neutron')

        self.api = get_network_api('neutron')
        self.context = context.DesignateContext(
            user_id='12345',
            project_id='54321',
        )
示例#2
0
    def __init__(self, *args, **kwargs):
        super(Service, self).__init__(*args, **kwargs)

        backend_driver = cfg.CONF['service:central'].backend_driver
        self.backend = backend.get_backend(backend_driver, self)

        policy.init_policy()

        # Get a storage connection
        self.storage_api = storage_api.StorageAPI()

        # Get a quota manager instance
        self.quota = quota.get_quota()

        self.network_api = network_api.get_network_api(cfg.CONF.network_api)
示例#3
0
    def __init__(self, *args, **kwargs):
        backend_driver = cfg.CONF['service:central'].backend_driver
        self.backend = backend.get_backend(backend_driver, self)

        kwargs.update(
            host=cfg.CONF.host,
            topic=cfg.CONF.central_topic,
        )

        self.notifier = notifier.get_notifier('central')

        policy.init_policy()

        super(Service, self).__init__(*args, **kwargs)

        # Get a storage connection
        self.storage_api = storage_api.StorageAPI()

        # Get a quota manager instance
        self.quota = quota.get_quota()

        self.network_api = network_api.get_network_api(cfg.CONF.network_api)
示例#4
0
 def setUp(self):
     super(NetworkAPIFixture, self).setUp()
     self.api = network_api.get_network_api(cfg.CONF.network_api)
     self.fake = fake_network_api
     self.addCleanup(self.fake.reset_floatingips)
示例#5
0
 def setUp(self):
     super(NetworkAPIFixture, self).setUp()
     self.api = network_api.get_network_api(cfg.CONF.network_api)
     self.fake = fake_network_api
     self.addCleanup(self.fake.reset_floatingips)
示例#6
0
 def setUp(self):
     super(NeutronAPITest, self).setUp()
     self.config(endpoints=['RegionOne|http://localhost:9696'],
                 group='network_api:neutron')
     self.api = get_network_api('neutron')
示例#7
0
 def setUp(self):
     super(NeutronAPITest, self).setUp()
     self.config(endpoints=['RegionOne|http://localhost:9696'],
                 group='network_api:neutron')
     self.api = get_network_api('neutron')