Skip to content

Commit cc6c4e5

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add support for volume v2 commands"
2 parents 55d9eba + 96afb8b commit cc6c4e5

4 files changed

Lines changed: 722 additions & 2 deletions

File tree

‎openstackclient/tests/volume/v2/fakes.py‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from openstackclient.tests import fakes
1919
from openstackclient.tests.identity.v2_0 import fakes as identity_fakes
20+
from openstackclient.tests.image.v2 import fakes as image_fakes
2021
from openstackclient.tests import utils
2122

2223
volume_id = "ce26708d-a7f8-4b4b-9861-4a80256615a6"
@@ -26,8 +27,11 @@
2627
volume_size = 20
2728
volume_type = "fake_lvmdriver-1"
2829
volume_metadata = {
29-
"foo": "bar"
30+
'Alpha': 'a',
31+
'Beta': 'b',
32+
'Gamma': 'g',
3033
}
34+
volume_metadata_str = "Alpha='a', Beta='b', Gamma='g'"
3135
volume_snapshot_id = 1
3236
volume_availability_zone = "nova"
3337
volume_attachments = ["fake_attachments"]
@@ -169,6 +173,13 @@
169173
'associations': [qos_association]
170174
}
171175

176+
image_id = 'im1'
177+
image_name = 'graven'
178+
IMAGE = {
179+
'id': image_id,
180+
'name': image_name
181+
}
182+
172183

173184
class FakeVolumeClient(object):
174185
def __init__(self, **kwargs):
@@ -200,3 +211,7 @@ def setUp(self):
200211
endpoint=fakes.AUTH_URL,
201212
token=fakes.AUTH_TOKEN
202213
)
214+
self.app.client_manager.image = image_fakes.FakeImagev2Client(
215+
endpoint=fakes.AUTH_URL,
216+
token=fakes.AUTH_TOKEN
217+
)

0 commit comments

Comments
 (0)