#include "virsh-pool.h"
#include "virsh.h"
#include "virstring.h"
+#include "virsh-volume.h"
char **
virshStorageVolNameCompleter(vshControl *ctl,
virshStoragePoolListFree(list);
return ret;
}
+
+char **
+virshStorageVolWipeAlgorithmCompleter(vshControl *ctl G_GNUC_UNUSED,
+ const vshCmd *cmd G_GNUC_UNUSED,
+ unsigned int flags)
+{
+ char **ret = NULL;
+ size_t i;
+
+ virCheckFlags(0, NULL);
+
+ ret = g_new0(char *, VIR_STORAGE_VOL_WIPE_ALG_LAST + 1);
+
+ for (i = 0; i < VIR_STORAGE_VOL_WIPE_ALG_LAST; i++)
+ ret[i] = g_strdup(virshStorageVolWipeAlgorithmTypeToString(i));
+
+ return ret;
+}
virshStorageVolKeyCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
+
+
+char **
+virshStorageVolWipeAlgorithmCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags);
VIRSH_COMMON_OPT_POOL_OPTIONAL,
{.name = "algorithm",
.type = VSH_OT_STRING,
+ .completer = virshStorageVolWipeAlgorithmCompleter,
.help = N_("perform selected wiping algorithm")
},
{.name = NULL}
};
-VIR_ENUM_DECL(virshStorageVolWipeAlgorithm);
VIR_ENUM_IMPL(virshStorageVolWipeAlgorithm,
VIR_STORAGE_VOL_WIPE_ALG_LAST,
"zero", "nnsa", "dod", "bsi", "gutmann", "schneier",
VIRSH_BYUUID | VIRSH_BYNAME)
extern const vshCmdDef storageVolCmds[];
+
+VIR_ENUM_DECL(virshStorageVolWipeAlgorithm);