summaryrefslogtreecommitdiff
path: root/openstackclient/tests/volume
diff options
context:
space:
mode:
authorMatt Fischer <matt@mattfischer.com>2014-05-13 13:04:02 -0400
committerMatt Fischer <matt@mattfischer.com>2014-06-11 13:40:30 -0600
commit4ae4dc35bda42a972c1d1480e89cda67bf39636d (patch)
tree60bfb649e17e91ea25b735f0e63d253582d4c377 /openstackclient/tests/volume
parent7f6a901d011ae366a5dea6fa7e532ab941125e9e (diff)
downloadpython-openstackclient-4ae4dc35bda42a972c1d1480e89cda67bf39636d.tar.gz
Add support for extension list
- Add support in the common section for extension list. This only supports Identity for now. Once the APIs for volume and compute are supported in the respective APIs, they will be added. Once network is added to this client, it will be added (the API already supports it). - Include extension fakes for volume and compute for pre-enablement. Change-Id: Iebb0156a779887d2ab06488a2a27b70b56369376 Closes-Bug: #1319115
Diffstat (limited to 'openstackclient/tests/volume')
-rw-r--r--openstackclient/tests/volume/v1/fakes.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/openstackclient/tests/volume/v1/fakes.py b/openstackclient/tests/volume/v1/fakes.py
index 3567eca5..c0ffbd34 100644
--- a/openstackclient/tests/volume/v1/fakes.py
+++ b/openstackclient/tests/volume/v1/fakes.py
@@ -45,6 +45,26 @@ VOLUME = {
'metadata': volume_metadata,
}
+extension_name = 'SchedulerHints'
+extension_namespace = 'http://docs.openstack.org/'\
+ 'block-service/ext/scheduler-hints/api/v2'
+extension_description = 'Pass arbitrary key/value'\
+ 'pairs to the scheduler.'
+extension_updated = '2014-02-07T12:00:0-00:00'
+extension_alias = 'OS-SCH-HNT'
+extension_links = '[{"href":'\
+ '"https://github.com/openstack/block-api", "type":'\
+ ' "text/html", "rel": "describedby"}]'
+
+EXTENSION = {
+ 'name': extension_name,
+ 'namespace': extension_namespace,
+ 'description': extension_description,
+ 'updated': extension_updated,
+ 'alias': extension_alias,
+ 'links': extension_links,
+}
+
class FakeVolumev1Client(object):
def __init__(self, **kwargs):
@@ -52,6 +72,8 @@ class FakeVolumev1Client(object):
self.volumes.resource_class = fakes.FakeResource(None, {})
self.services = mock.Mock()
self.services.resource_class = fakes.FakeResource(None, {})
+ self.extensions = mock.Mock()
+ self.extensions.resource_class = fakes.FakeResource(None, {})
self.auth_token = kwargs['token']
self.management_url = kwargs['endpoint']