Ejemplo n.º 1
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.º 2
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.º 3
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.º 4
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.º 5
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),
     )
Ejemplo n.º 6
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),
        )