def setUp(self): super(TroveProtectionPluginTest, self).setUp() plugin_config = cfg.ConfigOpts() plugin_config_fixture = self.useFixture(fixture.Config(plugin_config)) plugin_config_fixture.load_raw_values( group='database_backup_plugin', poll_interval=0, ) self.plugin = DatabaseBackupProtectionPlugin(plugin_config) cfg.CONF.set_default('trove_endpoint', 'http://127.0.0.1:8774/v2.1', 'trove_client') service_catalog = [ { 'type': 'database', 'endpoints': [{ 'publicURL': 'http://127.0.0.1:8774/v2.1/abcd' }], }, ] self.cntxt = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=service_catalog) self.trove_client = client_factory.ClientFactory.create_client( "trove", self.cntxt) self.checkpoint = CheckpointCollection()
def setUp(self): super(VolumeGlanceProtectionPluginTest, self).setUp() plugin_config = cfg.ConfigOpts() plugin_config_fixture = self.useFixture(fixture.Config(plugin_config)) plugin_config_fixture.load_raw_values( group='volume_glance_plugin', poll_interval=0, backup_image_object_size=65536 ) self.plugin = VolumeGlanceProtectionPlugin(plugin_config) cfg.CONF.set_default('glance_endpoint', 'http://127.0.0.1:9292', 'glance_client') cfg.CONF.set_default('cinder_endpoint', 'http://127.0.0.1:8774/v2.1', 'cinder_client') self.cntxt = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh' ) self.cinder_client = client_factory.ClientFactory.create_client( "cinder", self.cntxt) self.glance_client = client_factory.ClientFactory.create_client( "glance", self.cntxt) self.checkpoint = FakeCheckpoint()
def setUp(self): super(ManilaProtectionPluginTest, self).setUp() plugin_config = cfg.ConfigOpts() plugin_config_fixture = self.useFixture(fixture.Config(plugin_config)) plugin_config_fixture.load_raw_values( group='manila_snapshot_plugin', poll_interval=0, ) self.plugin = ManilaSnapshotProtectionPlugin(plugin_config) cfg.CONF.set_default('manila_endpoint', 'http://127.0.0.1:8774/v2.1', 'manila_client') service_catalog = [ {'type': 'sharev2', 'endpoints': [{'publicURL': 'http://127.0.0.1:8774/v2.1/abcd'}], }, ] self.cntxt = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=service_catalog) self.manila_client = client_factory.ClientFactory.create_client( "manila", self.cntxt) self.checkpoint = FakeCheckpoint()
def setUp(self): super(VolumeFreezerProtectionPluginTest, self).setUp() plugin_config = cfg.ConfigOpts() plugin_config_fixture = self.useFixture(fixture.Config(plugin_config)) plugin_config_fixture.load_raw_values( group='freezer_protection_plugin', poll_interval=0, ) self.plugin = FreezerProtectionPlugin(plugin_config) self._public_url = 'http://127.0.0.1/v2.0' cfg.CONF.set_default('freezer_endpoint', self._public_url, 'freezer_client') # due to freezer client bug, auth_uri should be specified cfg.CONF.set_default('auth_uri', 'http://127.0.0.1/v2.0', 'freezer_client') self.cntxt = RequestContext(user_id='demo', project_id='fake_project_id', auth_token='fake_token') self.freezer_client = client_factory.ClientFactory.create_client( 'freezer', self.cntxt ) self.checkpoint = FakeCheckpoint()
def setUp(self): super(PodProtectionPluginTest, self).setUp() plugin_config = cfg.ConfigOpts() plugin_config_fixture = self.useFixture(fixture.Config(plugin_config)) plugin_config_fixture.load_raw_values( group='poll_interval', poll_interval=0, ) self.plugin = PodProtectionPlugin(plugin_config) k8s.register_opts(cfg.CONF) cfg.CONF.set_default('k8s_host', 'https://192.168.98.35:6443', 'k8s_client') cfg.CONF.set_default('k8s_ssl_ca_cert', '/etc/provider.d/server-ca.crt', 'k8s_client') cfg.CONF.set_default('k8s_cert_file', '/etc/provider.d/client-admin.crt', 'k8s_client') cfg.CONF.set_default('k8s_key_file', '/etc/provider.d/client-admin.key', 'k8s_client') self.cntxt = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=None) self.k8s_client = client_factory.ClientFactory.create_client( "k8s", self.cntxt) self.checkpoint = Checkpoint()
def setUp(self): super(CinderProtectionPluginTest, self).setUp() self.plugin = CinderProtectionPlugin() cfg.CONF.set_default('cinder_endpoint', 'http://127.0.0.1:8776/v2', 'cinder_client') self.cntxt = RequestContext(user_id='admin', project_id='abcd', auth_token='efgh') self.cinder_client = ClientFactory.create_client("cinder", 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()
def setUp(self): super(NovaProtectionPluginTest, self).setUp() self.cntxt = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh') self.plugin = NovaProtectionPlugin(cfg.CONF) self.glance_client = FakeGlanceClient() self.nova_client = FakeNovaClient() self.cinder_client = FakeCinderClient() self.neutron_client = FakeNeutronClient() self.checkpoint = Checkpoint()
def setUp(self): super(VolumeProtectablePluginTest, self).setUp() service_catalog = [ {'type': 'volumev3', 'endpoints': [{'publicURL': 'http://127.0.0.1:8776/v3/abcd'}], }, ] self._context = RequestContext(user_id='admin', project_id='abcd', auth_token='efgh', service_catalog=service_catalog)
def setUp(self): super(DatabaseInstanceProtectablePluginTest, self).setUp() service_catalog = [ { 'type': 'database', 'endpoints': [{ 'publicURL': 'http://127.0.0.1:8774/v2.1/abcd' }], }, ] self._context = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=service_catalog)
def setUp(self): super(NetworkProtectablePluginTest, self).setUp() service_catalog = [{ 'type': 'network', 'endpoints': [{'publicURL': 'http://127.0.0.1:9696'}] }, { 'type': 'compute', 'endpoints': [{'publicURL': 'http://127.0.0.1:8774/v2.1/abcd'}] }] self._context = RequestContext(user_id='admin', project_id='abcd', auth_token='efgh', service_catalog=service_catalog)
def setUp(self): super(NeutronProtectionPluginTest, self).setUp() self.plugin = NeutronProtectionPlugin(cfg.CONF) cfg.CONF.set_default('neutron_endpoint', 'http://127.0.0.1:9696', 'neutron_client') self.cntxt = RequestContext(user_id='admin', project_id='abcd', auth_token='efgh') self.neutron_client = client_factory.ClientFactory.create_client( "neutron", self.cntxt) self.checkpoint = FakeCheckpoint()
def setUp(self): super(NovaClientTest, self).setUp() service_catalog = [ { 'type': 'compute', 'name': 'nova', 'endpoints': [{ 'publicURL': 'http://127.0.0.1:8774/v2.1/abcd' }], }, ] self._context = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=service_catalog)
def setUp(self): super(ManilaClientTest, self).setUp() self._public_url = 'http://127.0.0.1:8776/v2/abcd' service_catalog = [ {'type': 'sharev2', 'name': 'manilav2', 'endpoints': [{'publicURL': self._public_url}], }, ] self._context = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=service_catalog)
def setUp(self): super(FreezerClientTest, self).setUp() self._public_url = 'http://127.0.0.1:9090' self._auth_url = 'http://127.0.0.1/v2.0' service_catalog = [ {'type': 'backup', 'name': 'freezer', 'endpoints': [{'publicURL': self._public_url}], }, ] self._context = RequestContext(user_id='demo', project_id='abcd', project_name='efgh', auth_token='ijkl', service_catalog=service_catalog)
def setUp(self): super(GlanceClientTest, self).setUp() service_catalog = [ { 'endpoints': [ {'publicURL': 'http://127.0.0.1:9292', } ], 'type': 'image', 'name': 'glance', }, ] self._context = RequestContext(user_id='admin', project_id='abcd', auth_token='efgh', service_catalog=service_catalog)
def setUp(self): super(NeutronClientTest, self).setUp() service_catalog = [ { 'endpoints': [{ 'publicURL': 'http://127.0.0.1:9696', }], 'type': 'network', 'name': 'neutron', }, ] self._context = RequestContext(user_id='admin', project_id='abcd', auth_token='efgh', service_catalog=service_catalog)
def setUp(self): super(CinderProtectionPluginTest, self).setUp() plugin_config = cfg.ConfigOpts() plugin_config_fixture = self.useFixture(fixture.Config(plugin_config)) plugin_config_fixture.load_raw_values( group='cinder_backup_protection_plugin', poll_interval=0, ) self.plugin = CinderBackupProtectionPlugin(plugin_config) cfg.CONF.set_default('cinder_endpoint', 'http://127.0.0.1:8776/v2', 'cinder_client') self.cntxt = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh') self.cinder_client = client_factory.ClientFactory.create_client( "cinder", self.cntxt)
def setUp(self): super(SwiftClientTest, self).setUp() service_catalog = [ { 'endpoints': [ {'publicURL': 'http://127.0.0.1:8080/v1/AUTH_abcd', } ], 'type': 'object-store', 'name': 'swift', }, ] self._context = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=service_catalog) self.conf = cfg.ConfigOpts() swift.register_opts(self.conf)
def setUp(self): super(KubernetesClientTest, self).setUp() self._context = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=None) self.conf = cfg.ConfigOpts() k8s.register_opts(self.conf) self.host_url = 'https://192.168.98.35:6443' self.conf.set_default('k8s_host', self.host_url, 'k8s_client') self.conf.set_override('k8s_ssl_ca_cert', '/etc/provider.d/server-ca.crt', 'k8s_client') self.conf.set_override('k8s_cert_file', '/etc/provider.d/client-admin.crt', 'k8s_client') self.conf.set_override('k8s_key_file', '/etc/provider.d/client-admin.key', 'k8s_client')
def setUp(self): super(ClientUtilsTest, self).setUp() self._service = '' self._public_url = 'http://127.0.0.1:8776/v3/abcd' service_catalog = [ { 'type': 'volumev3', 'name': 'cinderv3', 'endpoints': [{ 'publicURL': self._public_url }], }, ] self._context = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=service_catalog)
def setUp(self): super(ABClientTest, self).setUp() self._context = RequestContext(user_id='demo', project_id='asdf', auth_token='qwe', service_catalog=None)
def setUp(self): super(PodProtectablePluginTest, self).setUp() self._context = RequestContext(user_id='demo', project_id='abcd', auth_token='efgh', service_catalog=None)