summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwanghao <sxmatch1986@gmail.com>2018-05-21 17:01:35 +0800
committerwanghao <sxmatch1986@gmail.com>2018-05-22 09:44:26 +0800
commit7283dedb131e356290ceb384b30877f95d61aa5a (patch)
tree4862c2d9aa7fcf5a546143e7905566857b5f37e2
parent3f6aa2a64835c9984b744d9f9f9127fabb9cdd59 (diff)
downloadpython-cinderclient-7283dedb131e356290ceb384b30877f95d61aa5a.tar.gz
Remove useless args in create_group_from_src
Remove status, project_id and user_id args from create_group_from_src. Those args will cause error when using cinderclient since schema validation in Cinder side. Change-Id: Iba9a45625f9e6423e8e582425605ca184238cde9 Closes-Bug: #1772375
-rw-r--r--cinderclient/tests/unit/v3/test_groups.py6
-rw-r--r--cinderclient/tests/unit/v3/test_shell.py3
-rw-r--r--cinderclient/v3/groups.py5
3 files changed, 1 insertions, 13 deletions
diff --git a/cinderclient/tests/unit/v3/test_groups.py b/cinderclient/tests/unit/v3/test_groups.py
index c094ede..e776f0a 100644
--- a/cinderclient/tests/unit/v3/test_groups.py
+++ b/cinderclient/tests/unit/v3/test_groups.py
@@ -128,12 +128,9 @@ class GroupsTest(utils.TestCase):
grp = cs.groups.create_from_src('5678', None, name='group')
expected = {
'create-from-src': {
- 'status': 'creating',
'description': None,
- 'user_id': None,
'name': 'group',
'group_snapshot_id': '5678',
- 'project_id': None,
'source_group_id': None
}
}
@@ -146,12 +143,9 @@ class GroupsTest(utils.TestCase):
grp = cs.groups.create_from_src(None, '5678', name='group')
expected = {
'create-from-src': {
- 'status': 'creating',
'description': None,
- 'user_id': None,
'name': 'group',
'source_group_id': '5678',
- 'project_id': None,
'group_snapshot_id': None
}
}
diff --git a/cinderclient/tests/unit/v3/test_shell.py b/cinderclient/tests/unit/v3/test_shell.py
index cff2145..d7e97f1 100644
--- a/cinderclient/tests/unit/v3/test_shell.py
+++ b/cinderclient/tests/unit/v3/test_shell.py
@@ -680,9 +680,6 @@ class ShellTest(utils.TestCase):
def test_group_create_from_src(self, grp_snap_id, src_grp_id, src):
expected = {'create-from-src': {'name': 'test-1',
'description': 'test-1-desc',
- 'user_id': None,
- 'project_id': None,
- 'status': 'creating',
'group_snapshot_id': grp_snap_id,
'source_group_id': src_grp_id}}
cmd = ('--os-volume-api-version 3.14 '
diff --git a/cinderclient/v3/groups.py b/cinderclient/v3/groups.py
index 30280b5..d15e98e 100644
--- a/cinderclient/v3/groups.py
+++ b/cinderclient/v3/groups.py
@@ -114,10 +114,7 @@ class GroupManager(base.ManagerWithFind):
body = {'create-from-src': {'name': name,
'description': description,
'group_snapshot_id': group_snapshot_id,
- 'source_group_id': source_group_id,
- 'user_id': user_id,
- 'project_id': project_id,
- 'status': "creating", }}
+ 'source_group_id': source_group_id, }}
self.run_hooks('modify_body_for_action', body,
'create-from-src')