Пример #1
0
    def _get_volume(self):
        volume = factories.VolumeFactory(
            service_project_link=self.fixture.spl,
            backend_id=None,
        )

        backend = OpenStackTenantBackend(self.settings)
        backend.create_volume(volume)
        return volume
Пример #2
0
    def _get_volume(self):
        volume = factories.VolumeFactory(
            service_settings=self.fixture.openstack_tenant_service_settings,
            project=self.fixture.project,
            backend_id=None,
        )

        backend = OpenStackTenantBackend(self.settings)
        backend.create_volume(volume)
        return volume
Пример #3
0
 def setUp(self):
     self.fixture = fixtures.OpenStackTenantFixture()
     self.settings = self.fixture.openstack_tenant_service_settings
     self.tenant = self.fixture.openstack_tenant_service_settings.scope
     self.tenant_backend = OpenStackTenantBackend(self.settings)
     self.neutron_client_mock = mock.Mock()
     self.cinder_client_mock = mock.Mock()
     self.nova_client_mock = mock.Mock()
     self.tenant_backend.neutron_client = self.neutron_client_mock
     self.tenant_backend.cinder_client = self.cinder_client_mock
     self.tenant_backend.nova_client = self.nova_client_mock