Example #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., 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))
Example #2
0
 def __init__(self):
     super(RoleAction, self).__init__()
     self.args = [
         Args.get_list_arg("List all roles for specific release"),
         Args.get_release_arg("Release id", required=True),
     ]
     self.flag_func_map = ((None, self.list),)
Example #3
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)
     )
 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),
     )
Example #5
0
 def __init__(self):
     super(ReleaseAction, self).__init__()
     self.args = [
         Args.get_release_arg("Specify particular release id"),
         Args.get_list_arg("List all available releases."),
     ]
     self.flag_func_map = ((None, self.list),)
Example #6
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),
     )
Example #7
0
 def __init__(self):
     super(RoleAction, self).__init__()
     self.args = [
         Args.get_list_arg("List all roles for specific release"),
         Args.get_release_arg("Release id", required=True)
     ]
     self.flag_func_map = ((None, self.list), )
Example #8
0
 def __init__(self):
     super(ReleaseAction, self).__init__()
     self.args = [
         Args.get_release_arg('Specify particular release id'),
         Args.get_list_arg("List all available releases."),
     ]
     self.flag_func_map = ((None, self.list), )
Example #9
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))
Example #10
0
 def __init__(self):
     super(ReleaseAction, self).__init__()
     self.args = [
         group(
             Args.get_list_arg("List all available releases."),
             Args.get_config_arg("Configure release with --release"),
         ),
         Args.get_release_arg("Specify release id to configure"),
         Args.get_username_arg("Username for release credentials"),
         Args.get_password_arg("Password for release credentials"),
         Args.get_satellite_arg("Satellite server hostname"),
         Args.get_activation_key_arg("activation key")
     ]
     self.flag_func_map = (("config", self.configure_release), (None,
                                                                self.list))
Example #11
0
 def __init__(self):
     super(ReleaseAction, self).__init__()
     self.args = [
         group(
             Args.get_list_arg("List all available releases."),
             Args.get_config_arg("Configure release with --release"),
         ),
         Args.get_release_arg("Specify release id to configure"),
         Args.get_username_arg("Username for release credentials"),
         Args.get_password_arg("Password for release credentials"),
         Args.get_satellite_arg("Satellite server hostname"),
         Args.get_activation_key_arg("activation key")
     ]
     self.flag_func_map = (
         ("config", self.configure_release),
         (None, self.list)
     )
Example #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"
         )
     ]
     self.flag_func_map = (
         ("create", self.create),
         ("set", self.set),
         ("delete", self.delete),
         ("update", self.update),
         (None, self.list)
     )
Example #13
0
 def __init__(self):
     super(ReleaseAction, self).__init__()
     self.args = [
         Args.get_release_arg('Specify particular release id'),
         Args.get_list_arg("List all available releases."),
         Args.get_network_arg("Node network configuration."),
         Args.get_dir_arg(
             "Select directory to which download release attributes"),
         group(
             Args.get_download_arg(
                 "Download configuration of specific release"),
             Args.get_upload_arg(
                 "Upload configuration to specific release")
         )
     ]
     self.flag_func_map = (
         ('network', self.network),
         (None, self.list),
     )
Example #14
0
 def __init__(self):
     # NOTE(dshulyak) this serializers are really messed up
     # it gets overwritten in several places
     self.file_serializer = FileFormatBasedSerializer()
     self.args = [
         Args.get_list_arg("List all roles"),
         Args.get_release_arg("Release id"),
         Args.get_str_arg("role", help="Name of the role"),
         Args.get_file_arg("File with role description"),
         group(Args.get_create_arg("Create role from file"),
               Args.get_boolean_arg("update", help="Update role from file"),
               Args.get_delete_arg("Delete role from fuel"))
     ]
     self.flag_func_map = (
         ("delete", self.delete),
         ("create", self.create),
         ("update", self.update),
         ("role", self.item),
         (None, self.list),
     )
Example #15
0
 def __init__(self):
     super(ReleaseAction, self).__init__()
     self.args = [
         Args.get_release_arg('Specify particular release id'),
         Args.get_list_arg("List all available releases."),
         Args.get_network_arg("Release network configuration."),
         Args.get_deployment_tasks_arg("Release tasks configuration."),
         Args.get_sync_deployment_tasks_arg(),
         Args.get_file_pattern_arg(),
         Args.get_dir_arg(
             "Select directory to which download release attributes"),
         group(
             Args.get_download_arg(
                 "Download configuration of specific release"),
             Args.get_upload_arg(
                 "Upload configuration to specific release"))
     ]
     self.flag_func_map = (
         ('sync-deployment-tasks', self.sync_deployment_tasks),
         ('deployment-tasks', self.deployment_tasks),
         ('network', self.network),
         (None, self.list),
     )
Example #16
0
    def __init__(self):
        # NOTE(dshulyak) this serializers are really messed up
        # it gets overwritten in several places
        self.file_serializer = FileFormatBasedSerializer()
        self.args = [
            Args.get_list_arg("List all roles"),

            Args.get_release_arg("Release id"),
            Args.get_str_arg("role", help="Name of the role"),
            Args.get_file_arg("File with role description"),

            group(
                Args.get_create_arg("Create role from file"),
                Args.get_boolean_arg("update", help="Update role from file"),
                Args.get_delete_arg("Delete role from fuel")
            )
        ]
        self.flag_func_map = (
            ("delete", self.delete),
            ("create", self.create),
            ("update", self.update),
            ("role", self.item),
            (None, self.list),
        )