aboutsummaryrefslogtreecommitdiffstats
path: root/moonclient
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2016-03-04 14:03:53 +0100
committerasteroide <thomas.duval@orange.com>2016-03-04 14:06:03 +0100
commite9740852791df63bdeac88d92958739a75145897 (patch)
tree24ee0abdee3785854653481f546216960588a44b /moonclient
parent7be2f3dfff8541051c641e5715d6d70705cab5f7 (diff)
Fix a bug in attribute naming.
Change-Id: I682e9c47a9767d51bd3ccd99339bf6b77b86643f
Diffstat (limited to 'moonclient')
-rw-r--r--moonclient/moonclient/subjects.py6
-rw-r--r--moonclient/moonclient/tests/tests_empty_policy_new_user.json12
-rw-r--r--moonclient/moonclient/tests/tests_subject_assignments.json4
3 files changed, 11 insertions, 11 deletions
diff --git a/moonclient/moonclient/subjects.py b/moonclient/moonclient/subjects.py
index 8203cd92..678caf5b 100644
--- a/moonclient/moonclient/subjects.py
+++ b/moonclient/moonclient/subjects.py
@@ -58,7 +58,7 @@ class SubjectsAdd(Command):
help='Subject description',
)
parser.add_argument(
- '--password',
+ '--subject_pass',
metavar='<password-str>',
help='Password for subject (if not given, user will be prompted for one)',
)
@@ -72,13 +72,13 @@ class SubjectsAdd(Command):
def take_action(self, parsed_args):
if not parsed_args.intraextension:
parsed_args.intraextension = self.app.intraextension
- if not parsed_args.password:
+ if not parsed_args.subject_pass:
parsed_args.password = getpass.getpass("Password for user {}:".format(parsed_args.subject_name))
data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subjects".format(parsed_args.intraextension),
post_data={
"subject_name": parsed_args.subject_name,
"subject_description": parsed_args.description,
- "subject_password": parsed_args.password,
+ "subject_password": parsed_args.subject_pass,
"subject_email": parsed_args.email
},
authtoken=True)
diff --git a/moonclient/moonclient/tests/tests_empty_policy_new_user.json b/moonclient/moonclient/tests/tests_empty_policy_new_user.json
index 7c1d08cd..69f4e161 100644
--- a/moonclient/moonclient/tests/tests_empty_policy_new_user.json
+++ b/moonclient/moonclient/tests/tests_empty_policy_new_user.json
@@ -98,7 +98,7 @@
},
{
"name": "add_subject",
- "command": "subject add admin --password nomoresecrete",
+ "command": "subject add admin --subject_pass nomoresecrete",
"result": "",
"description": "",
"command_options": ""
@@ -111,7 +111,7 @@
},
{
"name": "add_subject",
- "command": "subject add demo --password nomoresecrete",
+ "command": "subject add demo --subject_pass nomoresecrete",
"result": "",
"description": "",
"command_options": ""
@@ -927,7 +927,7 @@
{
"name": "add_subject",
- "command": "subject add admin --password nomoresecrete",
+ "command": "subject add admin --subject_pass nomoresecrete",
"result": "",
"description": "Add admin subject.",
"command_options": ""
@@ -3187,7 +3187,7 @@
},
{
"name": "add_subject",
- "command": "subject add demo --password nomoresecrete",
+ "command": "subject add demo --subject_pass nomoresecrete",
"result": "",
"description": "Add demo subject.",
"command_options": ""
@@ -3354,7 +3354,7 @@
},
{
"name": "add_subject",
- "command": "subject add demo --password nomoresecrete",
+ "command": "subject add demo --subject_pass nomoresecrete",
"result": "",
"description": "Add demo subject.",
"command_options": ""
@@ -3374,7 +3374,7 @@
},
{
"name": "demo: try to pause nova instance",
- "external_command": "nova --os-user-name demo pause $uuid_server",
+ "external_command": "nova --os-username demo pause $uuid_server",
"result": "^$",
"description": "Pausing the server must be impossible due to the current rules"
},
diff --git a/moonclient/moonclient/tests/tests_subject_assignments.json b/moonclient/moonclient/tests/tests_subject_assignments.json
index e91f1222..e4615500 100644
--- a/moonclient/moonclient/tests/tests_subject_assignments.json
+++ b/moonclient/moonclient/tests/tests_subject_assignments.json
@@ -62,7 +62,7 @@
},
{
"name": "add_subject",
- "command": "subject add alt_demo --password nomoresecrete",
+ "command": "subject add alt_demo --subject_pass nomoresecrete",
"result": "",
"description": "Add the new subject category alt_demo",
"command_options": ""
@@ -256,7 +256,7 @@
},
{
"name": "add_subject",
- "command": "subject add alt_demo --password nomoresecrete",
+ "command": "subject add alt_demo --subject_pass nomoresecrete",
"result": "",
"description": "Add the new subject category alt_demo",
"command_options": ""