Exemplo n.º 1
0
    def setUp(self):

        CONF.connection_type = 'fake'
        # Copy the clean database over
        shutil.copyfile(os.path.join(CONF.state_path, CONF.sqlite_clean_db),
                        os.path.join(CONF.state_path, CONF.sqlite_db))

        self.mock_rpc = utils.mock_rpc

        # Mock out all of the policy enforcement (the tests don't have a defined policy)
        utils.mock_policy()
        self.gridcentric_api = gc_api.API()
        self.context = nova_context.RequestContext('fake', 'fake', True)
Exemplo n.º 2
0
    def setUp(self):

        CONF.connection_type = 'fake'
        # Copy the clean database over
        shutil.copyfile(os.path.join(CONF.state_path, CONF.sqlite_clean_db),
                        os.path.join(CONF.state_path, CONF.sqlite_db))

        self.mock_rpc = utils.mock_rpc

        # Mock out all of the policy enforcement (the tests don't have a defined policy)
        utils.mock_policy()
        self.gridcentric_api = gc_api.API()
        self.context = nova_context.RequestContext('fake', 'fake', True)
Exemplo n.º 3
0
    def setUp(self):
        CONF.connection_type = 'fake'
        CONF.compute_driver = 'fake.FakeDriver'

        # Copy the clean database over
        shutil.copyfile(os.path.join(CONF.state_path, CONF.sqlite_clean_db),
                        os.path.join(CONF.state_path, CONF.sqlite_db))

        self.mock_rpc = utils.mock_rpc

        self.vmsconn = utils.MockVmsConn()
        self.gridcentric = gc_manager.GridCentricManager(vmsconn=self.vmsconn)
        self.gridcentric._instance_network_info = utils.fake_networkinfo
        self.context = nova_context.RequestContext('fake', 'fake', True)

        # Mock out all of the policy enforcement (the tests don't have a defined policy)
        utils.mock_policy()
Exemplo n.º 4
0
    def setUp(self):
        CONF.connection_type = 'fake'
        CONF.compute_driver = 'fake.FakeDriver'

        # Copy the clean database over
        shutil.copyfile(os.path.join(CONF.state_path, CONF.sqlite_clean_db),
                        os.path.join(CONF.state_path, CONF.sqlite_db))

        self.mock_rpc = utils.mock_rpc

        self.vmsconn = utils.MockVmsConn()
        self.gridcentric = gc_manager.GridCentricManager(vmsconn=self.vmsconn)
        self.gridcentric._instance_network_info = utils.fake_networkinfo
        self.context = nova_context.RequestContext('fake', 'fake', True)

        # Mock out all of the policy enforcement (the tests don't have a defined policy)
        utils.mock_policy()