Ejemplo n.º 1
0
 def __init__(self):
     super(NetworkGroupAction, self).__init__()
     self.args = (
         Args.get_env_arg(),
         Args.get_name_arg("Name of new network group."),
         Args.get_node_group_arg("ID of node group."),
         Args.get_release_arg("Release ID this network group belongs to."),
         Args.get_vlan_arg("VLAN of network."),
         Args.get_cidr_arg("CIDR of network."),
         Args.get_gateway_arg("Gateway of network."),
         Args.get_network_group_arg("ID of network group."),
         Args.get_meta_arg("Metadata in JSON format to override default "
                           "network metadata."),
         group(
             Args.get_create_network_arg(
                 "Create a new network group for the specified "
                 " node group."
             ),
             Args.get_delete_arg("Delete specified network groups."),
             Args.get_list_arg("List all network groups."),
             Args.get_set_arg("Set network group parameters.")
         )
     )
     self.flag_func_map = (
         ("create", self.create),
         ("delete", self.delete),
         ("set", self.set),
         (None, self.list),
     )
Ejemplo n.º 2
0
 def __init__(self):
     super(FactAction, self).__init__()
     self.args = [
         Args.get_env_arg(required=True),
         group(
             Args.get_delete_arg(
                 "Delete current {0} data.".format(self.action_name)
             ),
             Args.get_download_arg(
                 "Download current {0} data.".format(self.action_name)
             ),
             Args.get_upload_arg(
                 "Upload current {0} data.".format(self.action_name)
             ),
             Args.get_default_arg(
                 "Download default {0} data.".format(self.action_name)
             ),
             required=True
         ),
         Args.get_dir_arg(
             "Directory with {0} data.".format(self.action_name)
         ),
         Args.get_node_arg(
             "Node ids."
         ),
     ]
     self.flag_func_map = (
         ("default", self.default),
         ("upload", self.upload),
         ("delete", self.delete),
         ("download", self.download)
     )
Ejemplo n.º 3
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_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))
Ejemplo n.º 4
0
 def __init__(self):
     super(NetworkGroupAction, self).__init__()
     self.args = (
         Args.get_env_arg(),
         Args.get_name_arg("Name of new network group."),
         Args.get_node_group_arg("ID of node group."),
         Args.get_release_arg("Release ID this network group belongs to."),
         Args.get_vlan_arg("VLAN of network."),
         Args.get_cidr_arg("CIDR of network."),
         Args.get_gateway_arg("Gateway of network."),
         Args.get_network_group_arg("ID of network group."),
         Args.get_meta_arg("Metadata in JSON format to override default "
                           "network metadata."),
         group(
             Args.get_create_network_arg(
                 "Create a new network group for the specified "
                 " node group."),
             Args.get_delete_arg("Delete specified network groups."),
             Args.get_list_arg("List all network groups."),
             Args.get_set_arg("Set network group parameters.")))
     self.flag_func_map = (
         ("create", self.create),
         ("delete", self.delete),
         ("set", self.set),
         (None, self.list),
     )
Ejemplo n.º 5
0
    def __init__(self):
        super(OpenstackConfigAction, self).__init__()
        self.args = (
            Args.get_env_arg(),
            Args.get_file_arg("Openstack configuration file"),
            Args.get_single_node_arg("Node ID"),
            Args.get_single_role_arg("Node role"),
            Args.get_config_id_arg("Openstack config ID"),
            Args.get_deleted_arg("Get deleted configurations"),
            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)
        )
Ejemplo n.º 6
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)
     )
Ejemplo n.º 7
0
 def __init__(self):
     super(GraphAction, self).__init__()
     self.args = (
         Args.get_env_arg(),
         Args.get_render_arg(
             "Render graph from DOT to PNG"
         ),
         Args.get_download_arg(
             "Download graph of specific cluster"
         ),
         Args.get_dir_arg(
             "Select target dir to render graph."
         ),
         Args.group(
             Args.get_skip_tasks(),
             Args.get_tasks()
         ),
         Args.get_graph_endpoint(),
         Args.get_graph_startpoint(),
         Args.get_remove_type_arg(self.task_types),
         Args.get_parents_arg(),
     )
     self.flag_func_map = (
         ('render', self.render),
         ('download', self.download),
     )
Ejemplo n.º 8
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)
        )
Ejemplo n.º 9
0
 def __init__(self):
     super(ChangesAction, self).__init__()
     self.args = (
         Args.get_env_arg(required=True),
         Args.get_dry_run_deployment_arg(),
     )
     self.flag_func_map = ((None, self.deploy_changes), )
Ejemplo n.º 10
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))
Ejemplo n.º 11
0
 def __init__(self):
     super(VIPAction, self).__init__()
     # NOTE(aroma): 'serializer' attribute for action objects is
     # overwritten while building parser object
     # (fuelclient.cli.parser.Parser)
     self.file_serializer = serializers.FileFormatBasedSerializer()
     self.args = (
         Args.get_env_arg(required=True),
         Args.get_create_arg("Create VIP"),
         Args.get_upload_file_arg("Upload changed VIP configuration "
                                  "from given file"),
         Args.get_download_arg("Download VIP configuration"),
         Args.get_file_arg("Target file with vip data."),
         Args.get_ip_id_arg("IP address entity identifier"),
         Args.get_ip_address_arg("IP address string"),
         Args.get_network_id_arg("Network identifier"),
         Args.get_network_role_arg("Network role string"),
         Args.get_vip_name_arg("VIP name string"),
         Args.get_vip_namespace_arg("VIP namespace string"),
     )
     self.flag_func_map = (
         ("create", self.create),
         ("upload", self.upload),
         ("download", self.download)
     )
Ejemplo n.º 12
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_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."),
         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), ("create", self.create),
                           ("set", self.set), ("delete", self.delete),
                           ("update", self.update), (None, self.list))
Ejemplo n.º 13
0
 def __init__(self):
     super(InterruptAction, self).__init__()
     self.args = [
         Args.get_env_arg(required=True)
     ]
     self.flag_func_map = (
         (None, self.interrupt),
     )
Ejemplo n.º 14
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))
Ejemplo n.º 15
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)
        )
Ejemplo n.º 16
0
    def __init__(self):
        super(DeployChangesAction, self).__init__()
        self.args = (
            Args.get_env_arg(required=True),
        )

        self.flag_func_map = (
            (None, self.deploy_changes),
        )
Ejemplo n.º 17
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_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)
        )
Ejemplo n.º 18
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))
Ejemplo n.º 19
0
 def __init__(self):
     super(NetworkAction, self).__init__()
     self.args = (
         Args.get_env_arg(required=True),
         Args.get_dir_arg("Directory with network data."),
         group(Args.get_download_arg(
             "Download current network configuration."),
               Args.get_verify_arg("Verify current network configuration."),
               Args.get_upload_arg("Upload changed network configuration."),
               required=True))
     self.flag_func_map = (("upload", self.upload), ("verify", self.verify),
                           ("download", self.download))
Ejemplo n.º 20
0
 def __init__(self):
     super(NetworkAction, self).__init__()
     self.args = (
         Args.get_env_arg(required=True),
         Args.get_dir_arg("Directory with network data."),
         group(
             Args.get_download_arg("Download current network configuration."),
             Args.get_verify_arg("Verify current network configuration."),
             Args.get_upload_arg("Upload changed network configuration."),
             required=True,
         ),
     )
     self.flag_func_map = (("upload", self.upload), ("verify", self.verify), ("download", self.download))
Ejemplo n.º 21
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."))
     self.flag_func_map = (("upload", self.upload),
                           ("default", self.default), ("download",
                                                       self.download))
Ejemplo n.º 22
0
    def __init__(self):
        super(NetworkTemplateAction, self).__init__()
        self.args = (
            Args.get_env_arg(required=True),
            Args.get_dir_arg("Directory with network templates."),
            group(
                Args.get_download_arg("Download current network template configuration."),
                Args.get_upload_arg("Upload changed network template configuration."),
                Args.get_delete_arg("Delete network template configuration."),
                required=True,
            ),
        )

        self.flag_func_map = (("upload", self.upload), ("download", self.download), ("delete", self.delete))
Ejemplo n.º 23
0
 def __init__(self):
     super(NodeGroupAction, self).__init__()
     self.args = (
         Args.get_env_arg(), Args.get_list_arg("List all node groups."),
         Args.get_name_arg("Name of new node group."),
         Args.get_group_arg("ID of node group."),
         Args.get_node_arg("List of nodes to assign specified group to."),
         group(
             Args.get_create_arg(
                 "Create a new node group in the specified environment."),
             Args.get_assign_arg("Download current network configuration."),
             Args.get_delete_arg("Verify current network configuration."),
         ))
     self.flag_func_map = (("create", self.create), ("delete", self.delete),
                           ("assign", self.assign), (None, self.list))
Ejemplo n.º 24
0
 def __init__(self):
     super(VIPAction, self).__init__()
     self.args = (
         Args.get_env_arg(required=True),
         Args.get_upload_file_arg("Upload changed VIP configuration "
                                  "from given file"),
         Args.get_download_arg("Download VIP configuration"),
         Args.get_file_arg("Target file with vip data."),
         Args.get_ip_id_arg("IP address entity identifier"),
         Args.get_network_id_arg("Network identifier"),
         Args.get_network_role_arg("Network role string"),
     )
     self.flag_func_map = (
         ("upload", self.upload),
         ("download", self.download)
     )
Ejemplo n.º 25
0
    def __init__(self):
        super(NetworkTemplateAction, self).__init__()
        self.args = (
            Args.get_env_arg(required=True),
            Args.get_dir_arg("Directory with network templates."),
            group(
                Args.get_download_arg(
                    "Download current network template configuration."),
                Args.get_upload_arg(
                    "Upload changed network template configuration."),
                Args.get_delete_arg("Delete network template configuration."),
                required=True))

        self.flag_func_map = (("upload", self.upload),
                              ("download", self.download), ("delete",
                                                            self.delete))
Ejemplo n.º 26
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.")
         ),
         Args.get_dir_arg("Directory with configuration data.")
     )
     self.flag_func_map = (
         ("upload", self.upload),
         ("default", self.default),
         ("download", self.download)
     )
Ejemplo n.º 27
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_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"
         )
     ]
     self.flag_func_map = (
         ("create", self.create),
         ("set", self.set),
         ("delete", self.delete),
         ("update", self.update),
         (None, self.list)
     )
Ejemplo n.º 28
0
 def __init__(self):
     super(GraphAction, self).__init__()
     self.args = (
         Args.get_env_arg(),
         Args.get_render_arg("Render graph from DOT to PNG"),
         Args.get_download_arg("Download graph of specific cluster"),
         Args.get_dir_arg("Select target dir to render graph."),
         Args.group(Args.get_skip_tasks(), Args.get_tasks()),
         Args.get_graph_endpoint(),
         Args.get_graph_startpoint(),
         Args.get_remove_type_arg(self.task_types),
         Args.get_parents_arg(),
         Args.get_tred_arg("Apply transitive reduction filter for graph."),
     )
     self.flag_func_map = (
         ('render', self.render),
         ('download', self.download),
     )
Ejemplo n.º 29
0
 def __init__(self):
     super(FactAction, self).__init__()
     self.args = [
         Args.get_env_arg(required=True),
         group(Args.get_delete_arg("Delete current {0} data.".format(
             self.action_name)),
               Args.get_download_arg("Download current {0} data.".format(
                   self.action_name)),
               Args.get_upload_arg("Upload current {0} data.".format(
                   self.action_name)),
               Args.get_default_arg("Download default {0} data.".format(
                   self.action_name)),
               required=True),
         Args.get_dir_arg("Directory with {0} data.".format(
             self.action_name)),
         Args.get_node_arg("Node ids."),
     ]
     self.flag_func_map = (("default", self.default),
                           ("upload", self.upload), ("delete", self.delete),
                           ("download", self.download))
Ejemplo n.º 30
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_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)
        )
Ejemplo n.º 31
0
 def __init__(self):
     super(NodeGroupAction, self).__init__()
     self.args = (
         Args.get_env_arg(),
         Args.get_list_arg("List all node groups."),
         Args.get_name_arg("Name of new node group."),
         Args.get_group_arg("ID of node group."),
         Args.get_node_arg("List of nodes to assign specified group to."),
         group(
             Args.get_create_arg(
                 "Create a new node group in the specified environment."
             ),
             Args.get_assign_arg(
                 "Assign nodes to the specified node group."),
             Args.get_delete_arg(
                 "Delete specified node groups."),
         )
     )
     self.flag_func_map = (
         ("create", self.create),
         ("delete", self.delete),
         ("assign", self.assign),
         (None, self.list)
     )
Ejemplo n.º 32
0
 def __init__(self):
     super(InterruptAction, self).__init__()
     self.args = [Args.get_env_arg(required=True)]
     self.flag_func_map = ((None, self.interrupt),)