def __init__(self):
     super(SnapshotAction, self).__init__()
     self.args = (
         Args.get_boolean_arg("conf",
                              help_="Provide this flag to generate conf"),
     )
     self.flag_func_map = (
         ('conf', self.get_snapshot_config),
         (None, self.create_snapshot),
     )
Example #2
0
 def __init__(self):
     super(SnapshotAction, self).__init__()
     self.args = (
         Args.get_dir_arg("Directory to which download snapshot."),
         Args.get_boolean_arg("conf",
                              help_="Provide this flag to generate conf")
     )
     self.flag_func_map = (
         ('conf', self.get_snapshot_config),
         (None, self.get_snapshot),
     )
Example #3
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),
        )