summaryrefslogtreecommitdiffstats
path: root/moonclient
diff options
context:
space:
mode:
Diffstat (limited to 'moonclient')
-rw-r--r--moonclient/moonclient/subjects.py17
-rw-r--r--moonclient/python_moonclient.egg-info/PKG-INFO37
-rw-r--r--moonclient/python_moonclient.egg-info/SOURCES.txt33
-rw-r--r--moonclient/python_moonclient.egg-info/dependency_links.txt1
-rw-r--r--moonclient/python_moonclient.egg-info/namespace_packages.txt1
-rw-r--r--moonclient/python_moonclient.egg-info/not-zip-safe1
-rw-r--r--moonclient/python_moonclient.egg-info/top_level.txt1
7 files changed, 16 insertions, 75 deletions
diff --git a/moonclient/moonclient/subjects.py b/moonclient/moonclient/subjects.py
index 6eebcfb8..29ce745d 100644
--- a/moonclient/moonclient/subjects.py
+++ b/moonclient/moonclient/subjects.py
@@ -7,6 +7,7 @@ import logging
from cliff.lister import Lister
from cliff.command import Command
+import getpass
class SubjectsList(Lister):
@@ -56,15 +57,29 @@ class SubjectsAdd(Command):
metavar='<description-str>',
help='Subject description',
)
+ parser.add_argument(
+ '--password',
+ metavar='<password-str>',
+ help='Password for subject (if not given, user will be prompted for one)',
+ )
+ parser.add_argument(
+ '--email',
+ metavar='<email-str>',
+ help='Email for the user',
+ )
return parser
def take_action(self, parsed_args):
if not parsed_args.intraextension:
parsed_args.intraextension = self.app.intraextension
+ if not parsed_args.password:
+ parsed_args.password = getpass.getpass("Password for user {}:".format(parsed_args.subject_name))
data = self.app.get_url("/v3/OS-MOON/intra_extensions/{}/subjects".format(parsed_args.intraextension),
post_data={
"subject_name": parsed_args.subject_name,
- "subject_description": parsed_args.description
+ "subject_description": parsed_args.description,
+ "subject_password": parsed_args.password,
+ "subject_email": parsed_args.email
},
authtoken=True)
return (
diff --git a/moonclient/python_moonclient.egg-info/PKG-INFO b/moonclient/python_moonclient.egg-info/PKG-INFO
deleted file mode 100644
index 1045d986..00000000
--- a/moonclient/python_moonclient.egg-info/PKG-INFO
+++ /dev/null
@@ -1,37 +0,0 @@
-Metadata-Version: 1.1
-Name: python-moonclient
-Version: 0.1
-Summary: Python Moon client
-Home-page: https://github.com/...
-Author: Thomas Duval
-Author-email: thomas.duval@orange.com
-License: UNKNOWN
-Download-URL: https://github.com/.../tarball/master
-Description: Moon Client
- ===========
-
- Installation
- ------------
-
- * `sudo python setup.py install`
-
- * `cd ~/devstack || source openrc admin`
-
-
- Manipulation
- ------------
-
- * `moon tenant list`
-
-
-
-Platform: Any
-Classifier: Development Status :: 3 - Alpha
-Classifier: License :: OSI Approved :: Apache Software License
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.2
-Classifier: Intended Audience :: Developers
-Classifier: Environment :: Console
diff --git a/moonclient/python_moonclient.egg-info/SOURCES.txt b/moonclient/python_moonclient.egg-info/SOURCES.txt
deleted file mode 100644
index 656a639e..00000000
--- a/moonclient/python_moonclient.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-MANIFEST.in
-README.rst
-setup.py
-moonclient/__init__.py
-moonclient/action_assignments.py
-moonclient/action_categories.py
-moonclient/action_scopes.py
-moonclient/actions.py
-moonclient/configuration.py
-moonclient/intraextension.py
-moonclient/logs.py
-moonclient/metarules.py
-moonclient/object_assignments.py
-moonclient/object_categories.py
-moonclient/object_scopes.py
-moonclient/objects.py
-moonclient/rules.py
-moonclient/shell.py
-moonclient/subject_assignments.py
-moonclient/subject_categories.py
-moonclient/subject_scopes.py
-moonclient/subjects.py
-moonclient/tenants.py
-moonclient/tests.py
-moonclient/tests/functional_tests.sh
-python_moonclient.egg-info/PKG-INFO
-python_moonclient.egg-info/SOURCES.txt
-python_moonclient.egg-info/dependency_links.txt
-python_moonclient.egg-info/entry_points.txt
-python_moonclient.egg-info/namespace_packages.txt
-python_moonclient.egg-info/not-zip-safe
-python_moonclient.egg-info/requires.txt
-python_moonclient.egg-info/top_level.txt \ No newline at end of file
diff --git a/moonclient/python_moonclient.egg-info/dependency_links.txt b/moonclient/python_moonclient.egg-info/dependency_links.txt
deleted file mode 100644
index 8b137891..00000000
--- a/moonclient/python_moonclient.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/moonclient/python_moonclient.egg-info/namespace_packages.txt b/moonclient/python_moonclient.egg-info/namespace_packages.txt
deleted file mode 100644
index 8b137891..00000000
--- a/moonclient/python_moonclient.egg-info/namespace_packages.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/moonclient/python_moonclient.egg-info/not-zip-safe b/moonclient/python_moonclient.egg-info/not-zip-safe
deleted file mode 100644
index 8b137891..00000000
--- a/moonclient/python_moonclient.egg-info/not-zip-safe
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/moonclient/python_moonclient.egg-info/top_level.txt b/moonclient/python_moonclient.egg-info/top_level.txt
deleted file mode 100644
index aeaf6094..00000000
--- a/moonclient/python_moonclient.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-moonclient