Fix a bug in attribute naming. 67/10967/1
authorasteroide <thomas.duval@orange.com>
Fri, 4 Mar 2016 13:03:53 +0000 (14:03 +0100)
committerasteroide <thomas.duval@orange.com>
Fri, 4 Mar 2016 13:06:03 +0000 (14:06 +0100)
Change-Id: I682e9c47a9767d51bd3ccd99339bf6b77b86643f

moonclient/moonclient/subjects.py
moonclient/moonclient/tests/tests_empty_policy_new_user.json
moonclient/moonclient/tests/tests_subject_assignments.json

index 8203cd9..678caf5 100644 (file)
@@ -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)
index 7c1d08c..69f4e16 100644 (file)
@@ -98,7 +98,7 @@
       },
       {
         "name": "add_subject",
-        "command": "subject add admin --password nomoresecrete",
+        "command": "subject add admin --subject_pass nomoresecrete",
         "result": "",
         "description": "",
         "command_options": ""
       },
       {
         "name": "add_subject",
-        "command": "subject add demo --password nomoresecrete",
+        "command": "subject add demo --subject_pass nomoresecrete",
         "result": "",
         "description": "",
         "command_options": ""
 
       {
         "name": "add_subject",
-        "command": "subject add admin --password nomoresecrete",
+        "command": "subject add admin --subject_pass nomoresecrete",
         "result": "",
         "description": "Add admin subject.",
         "command_options": ""
       },
       {
         "name": "add_subject",
-        "command": "subject add demo --password nomoresecrete",
+        "command": "subject add demo --subject_pass nomoresecrete",
         "result": "",
         "description": "Add demo subject.",
         "command_options": ""
       },
       {
         "name": "add_subject",
-        "command": "subject add demo --password nomoresecrete",
+        "command": "subject add demo --subject_pass nomoresecrete",
         "result": "",
         "description": "Add demo subject.",
         "command_options": ""
       },
       {
         "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"
       },
index e91f122..e461550 100644 (file)
@@ -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": ""
       },
       {
         "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": ""