diff options
Diffstat (limited to 'moonclient')
-rw-r--r-- | moonclient/moonclient/intraextension.py | 15 | ||||
-rw-r--r-- | moonclient/setup.py | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/moonclient/moonclient/intraextension.py b/moonclient/moonclient/intraextension.py index 569a99ff..24286dd9 100644 --- a/moonclient/moonclient/intraextension.py +++ b/moonclient/moonclient/intraextension.py @@ -110,6 +110,21 @@ class IntraExtensionDelete(Command): authtoken=True) +class IntraExtensionInit(Command): + """Initialize the root Intra_Extension (if needed).""" + + log = logging.getLogger(__name__) + + def get_parser(self, prog_name): + parser = super(IntraExtensionInit, self).get_parser(prog_name) + return parser + + def take_action(self, parsed_args): + self.app.get_url("/v3/OS-MOON/intra_extensions/init", + method="GET", + authtoken=True) + + class IntraExtensionShow(ShowOne): """Show detail about one Intra_Extension.""" diff --git a/moonclient/setup.py b/moonclient/setup.py index e048bf97..71ea704b 100644 --- a/moonclient/setup.py +++ b/moonclient/setup.py @@ -73,6 +73,7 @@ setup( 'intraextension_list = moonclient.intraextension:IntraExtensionList', 'intraextension_delete = moonclient.intraextension:IntraExtensionDelete', 'intraextension_show = moonclient.intraextension:IntraExtensionShow', + 'intraextension_init = moonclient.intraextension:IntraExtensionInit', 'subject_list = moonclient.subjects:SubjectsList', 'subject_add = moonclient.subjects:SubjectsAdd', |