def _print_doc(self): if self._doc: print(self._doc) print() print("Available actions:") for doc in list(self._docs.values()): doc.print_doc() print() for (action, ctrl) in list(self._subcontrollers.items()): doc = ActionDoc(action, "<...>", """ """ + ctrl._doc) doc.print_doc()
def _print_doc(self): if self._doc: print self._doc print print "Available actions:" for doc in self._docs.values(): doc.print_doc() print for (action, ctrl) in self._subcontrollers.items(): doc = ActionDoc(action, "<...>", """ """ + ctrl._doc) doc.print_doc()
def _print_doc(self): if self._doc: print self._doc print print "Available actions:" for doc in self._docs.values(): doc.print_doc() print for (action, ctrl) in self._subcontrollers.items(): doc = ActionDoc(action, "<...>", """ """ + ctrl._doc) doc.print_doc()
def _tree_doc(self): return ActionDoc( "tree", "<org_name> [--secret] [--non-secret] [--key]", """ Get a tree of each setting in organization. --secret return only secret setting --non-secret return only non secret setting --key option add filter on setting key""")
def _list_setting_doc(self): return ActionDoc( "list", "<org_name> [--secret] [--non-secret] [--key]", """ List available settings. --secret return only secret settings --non-secret return only non secret setting --obfuscate obfuscate value for secret setting --key option add filter on setting key""")
def _tree_doc(self): return ActionDoc( "tree", "<org_name> ", """ Get a tree of each groups in environment.""")
def _impact_doc(self): return ActionDoc("impact", "<org_name> <action_name>", """ get impact action.""")
def _start_doc(self): return ActionDoc("start", "<org_name> <env_name> <host_name>", """ Start a host instance.""")
def _properties_doc(self): return ActionDoc("properties", "<org_name> <env_name> <host_name>", """ Show properties of a given host instance.""")
def _get_status_doc(self): return ActionDoc("get_status", "<org_name> <env_name> <host_name> <collection> <sensor>", """ Show a host's file content.""")
def _forget_doc(self): return ActionDoc("forget", "<org_name> <env_name> <host_name>", """ Forgets a host instance.""")
def _shutdown_doc(self): return ActionDoc("shutdown", "<org_name> <env_name> <host_name>", """ Shutdown a host instance.""")
def _clone_doc(self): return ActionDoc("clone", "<org_name> <res_name> <clone_name>", """ Clone an entity.""")
def _export_doc(self): return ActionDoc( "export", "<org_name> [<output_folder>] [--force]", """ Export organization onto disk. --force option causes existing files to be overwritten.""")
def _reset_secret_doc(self): return ActionDoc( "reset-secret", self._list_params(), """ Resets the secret key associated to the organization.""")
def _resume_doc(self): return ActionDoc("resume", "<org_name> <env_name> <host_name>", """ Resume a host instance.""")
def _render_tree_doc(self): return ActionDoc( "render-tree", "<org_name> <env_name> <res_name> <output_folder>", """ Render configuration files of given host.""")
def _poweroff_doc(self): return ActionDoc("poweroff", "<org_name> <env_name> <host_name>", """ Power-off a host instance.""")
def _clone_doc(self): return ActionDoc("clone", "<org_name> <env_name> <res_name>", """ Clone a given host.""")
def _show_file_doc(self): return ActionDoc("show_file", "<org_name> <env_name> <host_name> <path>", """ Show a host's file content.""")
def _provision_doc(self): return ActionDoc("provision", "<org_name> <env_name> <res_name>", """ Provision a host.""")
def _create_image_doc(self): return ActionDoc("create_image", "<org_name> <env_name> <host_name>", """ Creates an image from given host's instance.""")
def _vnc_doc(self): return ActionDoc( "vnc", "<org_name> <env_name> <res_name>", """ Executes configured VNC viewer for host's instance.""")
def _delete_doc(self): return ActionDoc("delete", "<org_name> <env_name> <host_name>", """ Delete a host instance.""")
def _import_doc(self): return ActionDoc( "import", "<src_folder> [--dry-run]", """ Import host from disk. With --dry-run, actions are displayed but not applied.""" )
def _change_doc(self): return ActionDoc("change", self._list_params(), """ Add, update or delete Settings.""")
def _delete_all_doc(self): return ActionDoc("delete-all", "<org_name> <env_name> <host_name>", """ Deletes all compliance errors.""")
def _run_doc(self): return ActionDoc("run", "<org_name> <env_name> <host_name> <action_name>", """ run action on given host.""")
def _list_all_doc(self): return ActionDoc("list-all", "<org_name> <env_name> <host_name>", """ Lists all changes (even processed ones).""")
def _tree_doc(self): return ActionDoc( "tree", "<org_name> ", """ Get a tree of each groups in organization.""")
def _pause_doc(self): return ActionDoc("pause", "<org_name> <env_name> <host_name>", """ Pause a host instance.""")