コード例 #1
0
 def __init__(self):
     super(EnvironmentAction, self).__init__()
     self.args = [
         Args.get_env_arg(),
         group(
             Args.get_list_arg(
                 "List all available environments"
             ),
             Args.get_set_arg(
                 "Set environment parameters (e.g name, deployment mode)"
             ),
             Args.get_delete_arg(
                 "Delete environment with specific env or name"
             ),
             Args.get_create_arg(
                 "Create a new environment with "
                 "specific release id and name"
             ),
             Args.get_update_arg(
                 "Update OS to specified release id for given env"
             )
         ),
         Args.get_release_arg(
             "Release id"
         ),
         Args.get_force_arg(
             "Do it anyway"
         ),
         Args.get_name_arg(
             "Environment name"
         ),
         Args.get_mode_arg(
             "Set deployment mode for specific environment"
         ),
         Args.get_net_arg(
             "Set network mode for specific environment"
         ),
         Args.get_nst_arg(
             "Set network segment type"
         ),
         Args.get_deployment_tasks_arg("Environment tasks configuration"),
         Args.get_attributes_arg("Environment attributes"),
         group(
             Args.get_download_arg(
                 "Download configuration of specific cluster"),
             Args.get_upload_arg(
                 "Upload configuration to specific cluster")
         ),
         Args.get_dir_arg(
             "Select directory to which download release attributes"),
     ]
     self.flag_func_map = (
         ("deployment-tasks", self.deployment_tasks),
         ("attributes", self.attributes),
         ("create", self.create),
         ("set", self.set),
         ("delete", self.delete),
         ("update", self.update),
         (None, self.list)
     )
コード例 #2
0
 def __init__(self):
     super(EnvironmentAction, self).__init__()
     self.args = [
         Args.get_env_arg(),
         group(
             Args.get_list_arg("List all available environments"),
             Args.get_set_arg("Set environment parameters e.g., its name"),
             Args.get_delete_arg(
                 "Delete environment with a specific id or name"),
             Args.get_create_arg("Create a new environment with "
                                 "specific release id and name"),
         ),
         Args.get_release_arg("Release id"),
         Args.get_force_arg("Do it anyway"),
         Args.get_name_arg("Environment name"),
         Args.get_nst_arg("Set network segment type"),
         Args.get_deployment_tasks_arg("Environment tasks configuration"),
         Args.get_attributes_arg("Environment attributes"),
         group(
             Args.get_download_arg(
                 "Download configuration of specific cluster"),
             Args.get_upload_arg(
                 "Upload configuration to specific cluster")),
         Args.get_dir_arg(
             "Select directory to which download release attributes"),
     ]
     self.flag_func_map = (("deployment-tasks", self.deployment_tasks),
                           ("attributes", self.attributes),
                           ("create", self.create), ("set", self.set),
                           ("delete", self.delete), (None, self.list))
コード例 #3
0
 def __init__(self):
     super(PluginAction, self).__init__()
     self.args = [
         Args.group(
             Args.get_list_arg(
                 "List of all registered plugins."),
             Args.get_plugin_install_arg(
                 "Install and register plugin package"),
             Args.get_plugin_remove_arg(
                 "Remove and unregister plugin"),
             Args.get_plugin_register_arg(
                 "Register installed plugin"),
             Args.get_plugin_unregister_arg(
                 "Unregister plugin"),
             Args.get_plugin_update_arg(
                 "Update installed plugin"),
             Args.get_plugin_downgrade_arg(
                 "Downgrade installed plugin"),
             Args.get_plugin_sync_arg(
                 "Synchronise plugins with API service")),
         Args.get_plugin_arg("Plugin id."),
         Args.get_force_arg("Force action")
     ]
     self.flag_func_map = (
         ("install", self.install),
         ("remove", self.remove),
         ("update", self.update),
         ("downgrade", self.downgrade),
         ("sync", self.sync),
         ("register", self.register),
         ("unregister", self.unregister),
         (None, self.list),
     )
コード例 #4
0
ファイル: node.py プロジェクト: koder-ua/fuel-cert
    def __init__(self):
        super(NodeAction, self).__init__()
        self.args = [
            Args.get_env_arg(),
            group(
                Args.get_list_arg("List all nodes."),
                Args.get_set_arg("Set role for specific node."),
                Args.get_delete_arg("Delete specific node from environment."),
                Args.get_network_arg("Node network configuration."),
                Args.get_disk_arg("Node disk configuration."),
                Args.get_deploy_arg("Deploy specific nodes."),
                Args.get_provision_arg("Provision specific nodes.")),
            group(
                Args.get_default_arg("Get default configuration of some node"),
                Args.get_download_arg(
                    "Download configuration of specific node"),
                Args.get_upload_arg("Upload configuration to specific node")),
            Args.get_dir_arg(
                "Select directory to which download node attributes"),
            Args.get_node_arg("Node id."),
            Args.get_force_arg("Bypassing parameter validation."),
            Args.get_all_arg("Select all nodes."),
            Args.get_role_arg("Role to assign for node.")
        ]

        self.flag_func_map = (("set", self.set), ("delete", self.delete),
                              ("network", self.attributes),
                              ("disk", self.attributes), ("deploy",
                                                          self.start),
                              ("provision", self.start), (None, self.list))
コード例 #5
0
    def __init__(self):
        super(OpenstackConfigAction, self).__init__()
        self.args = (
            Args.get_env_arg(),
            Args.get_file_arg("Openstack configuration file"),
            Args.get_node_arg("Node IDs list"),
            Args.get_single_role_arg("Node role"),
            Args.get_config_id_arg("Openstack config ID"),
            Args.get_deleted_arg("Get deleted configurations"),
            Args.get_force_arg("Force configuration update"),
            group(
                Args.get_list_arg("List openstack configurations"),
                Args.get_download_arg(
                    "Download current openstack configuration"),
                Args.get_upload_arg("Upload new openstack configuration"),
                Args.get_delete_arg("Delete openstack configuration"),
                Args.get_execute_arg("Apply openstack configuration"),
                required=True,
            )
        )

        self.flag_func_map = (
            ('list', self.list),
            ('download', self.download),
            ('upload', self.upload),
            ('delete', self.delete),
            ('execute', self.execute)
        )
コード例 #6
0
    def __init__(self):
        super(HealthCheckAction, self).__init__()
        self.args = (Args.get_env_arg(required=True),
                     Args.get_list_arg("List all available checks"),
                     Args.get_force_arg("Forced test run"),
                     Args.get_check_arg("Run check for some testset."))

        self.flag_func_map = (("check", self.check), (None, self.list))
コード例 #7
0
    def __init__(self):
        super(NodeAction, self).__init__()
        self.args = [
            Args.get_env_arg(),
            group(
                Args.get_list_arg("List all nodes."),
                Args.get_set_arg("Set role for specific node."),
                Args.get_delete_arg("Delete specific node from environment."),
                Args.get_attributes_arg("Node attributes."),
                Args.get_network_arg("Node network configuration."),
                Args.get_disk_arg("Node disk configuration."),
                Args.get_deploy_arg("Deploy specific nodes."),
                Args.get_hostname_arg("Set node hostname."),
                Args.get_node_name_arg("Set node name."),
                Args.get_delete_from_db_arg(
                    "Delete specific nodes only from fuel db.\n"
                    "User should still delete node from cobbler"),
                Args.get_provision_arg("Provision specific nodes."),
            ),
            group(
                Args.get_default_arg(
                    "Get default configuration of some node"),
                Args.get_download_arg(
                    "Download configuration of specific node"),
                Args.get_upload_arg(
                    "Upload configuration to specific node")
            ),
            Args.get_dir_arg(
                "Select directory to which download node attributes"),
            Args.get_node_arg("Node id."),
            Args.get_force_arg("Bypassing parameter validation."),
            Args.get_all_arg("Select all nodes."),
            Args.get_role_arg("Role to assign for node."),
            group(
                Args.get_skip_tasks(),
                Args.get_tasks()
            ),
            Args.get_graph_endpoint(),
            Args.get_graph_startpoint(),
        ]

        self.flag_func_map = (
            ("set", self.set),
            ("delete", self.delete),
            ("network", self.attributes),
            ("disk", self.attributes),
            ("deploy", self.start),
            ("provision", self.start),
            ("hostname", self.set_hostname),
            ("name", self.set_name),
            ("delete-from-db", self.delete_from_db),
            ("tasks", self.execute_tasks),
            ("skip", self.execute_tasks),
            ("end", self.execute_tasks),
            ("start", self.execute_tasks),
            ("attributes", self.node_attributes),
            (None, self.list)
        )
コード例 #8
0
ファイル: task.py プロジェクト: CGenie/python-fuelclient
 def __init__(self):
     super(TaskAction, self).__init__()
     self.args = [
         group(Args.get_list_arg("List all tasks"),
               Args.get_delete_arg("Delete task with some task-id.")),
         Args.get_force_arg("Force deletion"),
         Args.get_task_arg("Task id.")
     ]
     self.flag_func_map = (("delete", self.delete), (None, self.list))
コード例 #9
0
ファイル: node.py プロジェクト: sylwekb/python-fuelclient
    def __init__(self):
        super(NodeAction, self).__init__()
        self.args = [
            Args.get_env_arg(),
            group(
                Args.get_list_arg("List all nodes."),
                Args.get_set_arg("Set role for specific node."),
                Args.get_delete_arg("Delete specific node from environment."),
                Args.get_network_arg("Node network configuration."),
                Args.get_disk_arg("Node disk configuration."),
                Args.get_deploy_arg("Deploy specific nodes."),
                Args.get_hostname_arg("Set node hostname."),
                Args.get_node_name_arg("Set node name."),
                Args.get_delete_from_db_arg(
                    "Delete specific nodes only from fuel db.\n"
                    "User should still delete node from cobbler"),
                Args.get_provision_arg("Provision specific nodes."),
            ),
            group(
                Args.get_default_arg(
                    "Get default configuration of some node"),
                Args.get_download_arg(
                    "Download configuration of specific node"),
                Args.get_upload_arg(
                    "Upload configuration to specific node")
            ),
            Args.get_dir_arg(
                "Select directory to which download node attributes"),
            Args.get_node_arg("Node id."),
            Args.get_force_arg("Bypassing parameter validation."),
            Args.get_all_arg("Select all nodes."),
            Args.get_role_arg("Role to assign for node."),
            group(
                Args.get_skip_tasks(),
                Args.get_tasks()
            ),
            Args.get_graph_endpoint(),
            Args.get_graph_startpoint(),
        ]

        self.flag_func_map = (
            ("set", self.set),
            ("delete", self.delete),
            ("network", self.attributes),
            ("disk", self.attributes),
            ("deploy", self.start),
            ("provision", self.start),
            ("hostname", self.set_hostname),
            ("name", self.set_name),
            ("delete-from-db", self.delete_from_db),
            ("tasks", self.execute_tasks),
            ("skip", self.execute_tasks),
            ("end", self.execute_tasks),
            ("start", self.execute_tasks),
            (None, self.list)
        )
コード例 #10
0
ファイル: health.py プロジェクト: tinyxiao/python-fuelclient
    def __init__(self):
        super(HealthCheckAction, self).__init__()
        self.args = (
            Args.get_env_arg(required=True),
            Args.get_list_arg("List all available checks"),
            Args.get_force_arg("Forced test run"),
            Args.get_check_arg("Run check for some testset."),
        )

        self.flag_func_map = (("check", self.check), (None, self.list))
コード例 #11
0
 def __init__(self):
     super(PluginAction, self).__init__()
     self.args = [
         Args.get_list_arg("List all available plugins."),
         Args.get_plugin_install_arg("Install action"),
         Args.get_force_arg("Update action"),
     ]
     self.flag_func_map = (
         ("install", self.install),
         (None, self.list),
     )
コード例 #12
0
 def __init__(self):
     super(SettingsAction, self).__init__()
     self.args = (
         Args.get_env_arg(required=True),
         group(
             Args.get_download_arg("Modify current configuration."),
             Args.get_default_arg("Open default configuration."),
             Args.get_upload_arg("Save current changes in configuration."),
             required=True),
         Args.get_dir_arg("Directory with configuration data."),
         Args.get_force_arg("Force settings upload."))
     self.flag_func_map = (("upload", self.upload),
                           ("default", self.default), ("download",
                                                       self.download))
コード例 #13
0
ファイル: task.py プロジェクト: gdyuldin/python-fuelclient
 def __init__(self):
     super(TaskAction, self).__init__()
     self.args = [
         group(
             Args.get_list_arg("List all tasks"),
             Args.get_delete_arg("Delete task with some task-id")
         ),
         Args.get_force_arg("Force deletion"),
         Args.get_task_arg("Task id")
     ]
     self.flag_func_map = (
         ("delete", self.delete),
         (None, self.list)
     )
コード例 #14
0
 def __init__(self):
     super(SettingsAction, self).__init__()
     self.args = (
         Args.get_env_arg(required=True),
         group(
             Args.get_download_arg("Modify current configuration."),
             Args.get_default_arg("Open default configuration."),
             Args.get_upload_arg("Save current changes in configuration."),
             required=True
         ),
         Args.get_dir_arg("Directory with configuration data."),
         Args.get_force_arg("Force settings upload.")
     )
     self.flag_func_map = (
         ("upload", self.upload),
         ("default", self.default),
         ("download", self.download)
     )
コード例 #15
0
ファイル: node.py プロジェクト: sk4lf/fuel-web
    def __init__(self):
        super(NodeAction, self).__init__()
        self.args = [
            Args.get_env_arg(),
            group(
                Args.get_list_arg("List all nodes."),
                Args.get_set_arg("Set role for specific node."),
                Args.get_delete_arg("Delete specific node from environment."),
                Args.get_network_arg("Node network configuration."),
                Args.get_disk_arg("Node disk configuration."),
                Args.get_deploy_arg("Deploy specific nodes."),
                Args.get_provision_arg("Provision specific nodes.")
            ),
            group(
                Args.get_default_arg(
                    "Get default configuration of some node"),
                Args.get_download_arg(
                    "Download configuration of specific node"),
                Args.get_upload_arg(
                    "Upload configuration to specific node")
            ),
            Args.get_dir_arg(
                "Select directory to which download node attributes"),
            Args.get_node_arg("Node id."),
            Args.get_force_arg("Bypassing parameter validation."),
            Args.get_all_arg("Select all nodes."),
            Args.get_role_arg("Role to assign for node.")
        ]

        self.flag_func_map = (
            ("set", self.set),
            ("delete", self.delete),
            ("network", self.attributes),
            ("disk", self.attributes),
            ("deploy", self.start),
            ("provision", self.start),
            (None, self.list)
        )