示例#1
0
 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()
示例#2
0
 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()
示例#3
0
 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""")
示例#6
0
 def _tree_doc(self):
     return ActionDoc(
         "tree", "<org_name>  ", """
     Get a tree of each groups in environment.""")
示例#7
0
 def _impact_doc(self):
     return ActionDoc("impact", "<org_name> <action_name>", """
     get impact action.""")
示例#8
0
 def _start_doc(self):
     return ActionDoc("start", "<org_name>  <env_name> <host_name>", """
     Start a host instance.""")
示例#9
0
 def _properties_doc(self):
     return ActionDoc("properties", "<org_name>  <env_name> <host_name>", """
     Show properties of a given host instance.""")
示例#10
0
 def _get_status_doc(self):
     return ActionDoc("get_status", "<org_name>  <env_name> <host_name> <collection> <sensor>", """
     Show a host's file content.""")
示例#11
0
 def _forget_doc(self):
     return ActionDoc("forget", "<org_name>  <env_name> <host_name>", """
     Forgets a host instance.""")
示例#12
0
 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.""")
示例#14
0
 def _export_doc(self):
     return ActionDoc(
         "export", "<org_name> [<output_folder>] [--force]", """
     Export organization onto disk. --force option causes existing files to
     be overwritten.""")
示例#15
0
 def _reset_secret_doc(self):
     return ActionDoc(
         "reset-secret", self._list_params(), """
     Resets the secret key associated to the organization.""")
示例#16
0
 def _resume_doc(self):
     return ActionDoc("resume", "<org_name>  <env_name> <host_name>", """
     Resume a host instance.""")
示例#17
0
 def _render_tree_doc(self):
     return ActionDoc(
         "render-tree", "<org_name> <env_name> <res_name> <output_folder>",
         """
     Render configuration files of given host.""")
示例#18
0
 def _poweroff_doc(self):
     return ActionDoc("poweroff", "<org_name>  <env_name> <host_name>", """
     Power-off a host instance.""")
示例#19
0
 def _clone_doc(self):
     return ActionDoc("clone", "<org_name> <env_name> <res_name>", """
     Clone a given host.""")
示例#20
0
 def _show_file_doc(self):
     return ActionDoc("show_file", "<org_name>  <env_name> <host_name> <path>", """
     Show a host's file content.""")
示例#21
0
 def _provision_doc(self):
     return ActionDoc("provision", "<org_name> <env_name> <res_name>", """
     Provision a host.""")
示例#22
0
 def _create_image_doc(self):
     return ActionDoc("create_image", "<org_name>  <env_name> <host_name>", """
     Creates an image from given host's instance.""")
示例#23
0
 def _vnc_doc(self):
     return ActionDoc(
         "vnc", "<org_name> <env_name> <res_name>", """
     Executes configured VNC viewer for host's instance.""")
示例#24
0
 def _delete_doc(self):
     return ActionDoc("delete", "<org_name>  <env_name> <host_name>", """
     Delete a host instance.""")
示例#25
0
 def _import_doc(self):
     return ActionDoc(
         "import", "<src_folder> [--dry-run]", """
         Import host from disk. With --dry-run, actions are displayed but not applied."""
     )
示例#26
0
 def _change_doc(self):
     return ActionDoc("change", self._list_params(), """
     Add, update or delete Settings.""")
示例#27
0
 def _delete_all_doc(self):
     return ActionDoc("delete-all", "<org_name> <env_name> <host_name>", """
     Deletes all compliance errors.""")
示例#28
0
 def _run_doc(self):
     return ActionDoc("run",
                      "<org_name> <env_name> <host_name> <action_name>", """
     run action on given host.""")
示例#29
0
 def _list_all_doc(self):
     return ActionDoc("list-all", "<org_name> <env_name> <host_name>", """
     Lists all changes (even processed ones).""")
示例#30
0
 def _tree_doc(self):
     return ActionDoc(
         "tree", "<org_name>  ", """
     Get a tree of each groups in organization.""")
示例#31
0
 def _pause_doc(self):
     return ActionDoc("pause", "<org_name>  <env_name> <host_name>", """
     Pause a host instance.""")