예제 #1
0
    def setUp(self):
        super(GlanceProtectionPluginTest, self).setUp()

        plugin_config = cfg.ConfigOpts()
        plugin_config_fixture = self.useFixture(fixture.Config(plugin_config))
        plugin_config_fixture.load_raw_values(
            group='image_backup_plugin',
            poll_interval=0,
        )
        plugin_config_fixture.load_raw_values(
            group='image_backup_plugin',
            backup_image_object_size=65536,
        )
        plugin_config_fixture.load_raw_values(
            group='image_backup_plugin',
            enable_server_snapshot=True,
        )
        self.plugin = GlanceProtectionPlugin(plugin_config)
        cfg.CONF.set_default('glance_endpoint', 'http://127.0.0.1:9292',
                             'glance_client')

        self.cntxt = RequestContext(user_id='demo',
                                    project_id='abcd',
                                    auth_token='efgh')
        self.glance_client = client_factory.ClientFactory.create_client(
            "glance", self.cntxt)
        self.checkpoint = FakeCheckpoint()
    def setUp(self):
        super(GlanceProtectionPluginTest, self).setUp()
        self.plugin = GlanceProtectionPlugin()
        cfg.CONF.set_default('glance_endpoint', 'http://127.0.0.1:9292',
                             'glance_client')

        self.cntxt = RequestContext(user_id='admin',
                                    project_id='abcd',
                                    auth_token='efgh')
        self.glance_client = ClientFactory.create_client("glance", self.cntxt)
        self.checkpoint = CheckpointCollection()