Merge "Rename volume to block_store"
This commit is contained in:
commit
85872cd604
@ -13,12 +13,12 @@
|
||||
from openstack.auth import service_filter
|
||||
|
||||
|
||||
class VolumeService(service_filter.ServiceFilter):
|
||||
"""The volume service."""
|
||||
class BlockStoreService(service_filter.ServiceFilter):
|
||||
"""The block store service."""
|
||||
|
||||
valid_versions = [service_filter.ValidVersion('v2')]
|
||||
|
||||
def __init__(self, version=None):
|
||||
"""Create a volume service."""
|
||||
super(VolumeService, self).__init__(service_type='volume',
|
||||
version=version)
|
||||
"""Create a block store service."""
|
||||
super(BlockStoreService, self).__init__(service_type='volume',
|
||||
version=version)
|
@ -10,10 +10,10 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.block_store.v2 import snapshot
|
||||
from openstack.block_store.v2 import type
|
||||
from openstack.block_store.v2 import volume
|
||||
from openstack import proxy
|
||||
from openstack.volume.v2 import snapshot
|
||||
from openstack.volume.v2 import type
|
||||
from openstack.volume.v2 import volume
|
||||
|
||||
|
||||
class Proxy(proxy.BaseProxy):
|
@ -10,15 +10,15 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.block_store import block_store_service
|
||||
from openstack import resource
|
||||
from openstack.volume import volume_service
|
||||
|
||||
|
||||
class Snapshot(resource.Resource):
|
||||
resource_key = "snapshot"
|
||||
resources_key = "snapshots"
|
||||
base_path = "/snapshots"
|
||||
service = volume_service.VolumeService()
|
||||
service = block_store_service.BlockStoreService()
|
||||
|
||||
# capabilities
|
||||
allow_retrieve = True
|
@ -10,15 +10,15 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.block_store import block_store_service
|
||||
from openstack import resource
|
||||
from openstack.volume import volume_service
|
||||
|
||||
|
||||
class Type(resource.Resource):
|
||||
resource_key = "volume_type"
|
||||
resources_key = "volume_types"
|
||||
base_path = "/types"
|
||||
service = volume_service.VolumeService()
|
||||
service = block_store_service.BlockStoreService()
|
||||
|
||||
# capabilities
|
||||
allow_retrieve = True
|
@ -10,15 +10,15 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.block_store import block_store_service
|
||||
from openstack import resource
|
||||
from openstack.volume import volume_service
|
||||
|
||||
|
||||
class Volume(resource.Resource):
|
||||
resource_key = "volume"
|
||||
resources_key = "volumes"
|
||||
base_path = "/volumes"
|
||||
service = volume_service.VolumeService()
|
||||
service = block_store_service.BlockStoreService()
|
||||
|
||||
# capabilities
|
||||
allow_retrieve = True
|
@ -53,6 +53,7 @@ The resulting preference print out would look something like::
|
||||
|
||||
import six
|
||||
|
||||
from openstack.block_store import block_store_service
|
||||
from openstack.cluster import cluster_service
|
||||
from openstack.compute import compute_service
|
||||
from openstack.database import database_service
|
||||
@ -66,7 +67,6 @@ from openstack.network import network_service
|
||||
from openstack.object_store import object_store_service
|
||||
from openstack.orchestration import orchestration_service
|
||||
from openstack.telemetry import telemetry_service
|
||||
from openstack.volume import volume_service
|
||||
|
||||
|
||||
class Profile(object):
|
||||
@ -122,7 +122,7 @@ class Profile(object):
|
||||
serv = telemetry_service.TelemetryService()
|
||||
serv.set_visibility(None)
|
||||
self._services[serv.service_type] = serv
|
||||
serv = volume_service.VolumeService()
|
||||
serv = block_store_service.BlockStoreService()
|
||||
serv.set_visibility(None)
|
||||
self._services[serv.service_type] = serv
|
||||
serv = message_service.MessageService()
|
||||
|
@ -12,13 +12,13 @@
|
||||
|
||||
import testtools
|
||||
|
||||
from openstack.volume import volume_service
|
||||
from openstack.block_store import block_store_service
|
||||
|
||||
|
||||
class TestVolumeService(testtools.TestCase):
|
||||
class TestBlockStoreService(testtools.TestCase):
|
||||
|
||||
def test_service(self):
|
||||
sot = volume_service.VolumeService()
|
||||
sot = block_store_service.BlockStoreService()
|
||||
self.assertEqual("volume", sot.service_type)
|
||||
self.assertEqual("public", sot.visibility)
|
||||
self.assertIsNone(sot.region)
|
@ -10,11 +10,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.block_store.v2 import _proxy
|
||||
from openstack.block_store.v2 import snapshot
|
||||
from openstack.block_store.v2 import type
|
||||
from openstack.block_store.v2 import volume
|
||||
from openstack.tests.unit import test_proxy_base
|
||||
from openstack.volume.v2 import _proxy
|
||||
from openstack.volume.v2 import snapshot
|
||||
from openstack.volume.v2 import type
|
||||
from openstack.volume.v2 import volume
|
||||
|
||||
|
||||
class TestVolumeProxy(test_proxy_base.TestProxyBase):
|
@ -12,7 +12,7 @@
|
||||
|
||||
import testtools
|
||||
|
||||
from openstack.volume.v2 import snapshot
|
||||
from openstack.block_store.v2 import snapshot
|
||||
|
||||
FAKE_ID = "ffa9bc5e-1172-4021-acaf-cdcd78a9584d"
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
import testtools
|
||||
|
||||
from openstack.volume.v2 import type
|
||||
from openstack.block_store.v2 import type
|
||||
|
||||
FAKE_ID = "6685584b-1eac-4da6-b5c3-555430cf68ff"
|
||||
TYPE = {
|
@ -14,7 +14,7 @@ import copy
|
||||
|
||||
import testtools
|
||||
|
||||
from openstack.volume.v2 import volume
|
||||
from openstack.block_store.v2 import volume
|
||||
|
||||
FAKE_ID = "6685584b-1eac-4da6-b5c3-555430cf68ff"
|
||||
|
Loading…
Reference in New Issue
Block a user