.type = VSH_OT_STRING, \
.help = N_("auth secret usage to be used for underlying storage") \
}, \
+ {.name = "secret-uuid", \
+ .type = VSH_OT_STRING, \
+ .help = N_("auth secret UUID to be used for underlying storage") \
+ }, \
{.name = "adapter-name", \
.type = VSH_OT_STRING, \
.help = N_("adapter name to be used for underlying storage") \
*srcDev = NULL, *srcName = NULL, *srcFormat = NULL,
*target = NULL, *authType = NULL, *authUsername = NULL,
*secretUsage = NULL, *adapterName = NULL, *adapterParent = NULL,
- *adapterWwnn = NULL, *adapterWwpn = NULL;
+ *adapterWwnn = NULL, *adapterWwpn = NULL, *secretUUID = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ VSH_EXCLUSIVE_OPTIONS("secret-usage", "secret-uuid");
+
if (vshCommandOptStringReq(ctl, cmd, "name", &name) < 0)
goto cleanup;
if (vshCommandOptStringReq(ctl, cmd, "type", &type) < 0)
vshCommandOptStringReq(ctl, cmd, "auth-type", &authType) < 0 ||
vshCommandOptStringReq(ctl, cmd, "auth-username", &authUsername) < 0 ||
vshCommandOptStringReq(ctl, cmd, "secret-usage", &secretUsage) < 0 ||
+ vshCommandOptStringReq(ctl, cmd, "secret-uuid", &secretUUID) < 0 ||
vshCommandOptStringReq(ctl, cmd, "adapter-name", &adapterName) < 0 ||
vshCommandOptStringReq(ctl, cmd, "adapter-wwnn", &adapterWwnn) < 0 ||
vshCommandOptStringReq(ctl, cmd, "adapter-wwpn", &adapterWwpn) < 0 ||
virBufferAsprintf(&buf, "<adapter type='scsi_host' name='%s'/>\n",
adapterName);
}
- if (authType && authUsername && secretUsage) {
+ if (authType && authUsername && (secretUsage || secretUUID)) {
virBufferAsprintf(&buf, "<auth type='%s' username='%s'>\n",
authType, authUsername);
virBufferAdjustIndent(&buf, 2);
- virBufferAsprintf(&buf, "<secret usage='%s'/>\n", secretUsage);
+ if (secretUsage)
+ virBufferAsprintf(&buf, "<secret usage='%s'/>\n", secretUsage);
+ else
+ virBufferAsprintf(&buf, "<secret uuid='%s'/>\n", secretUUID);
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "</auth>\n");
}
=item B<pool-create-as> I<name> I<type>
[I<--source-host hostname>] [I<--source-path path>] [I<--source-dev path>]
[I<--source-name name>] [I<--target path>] [I<--source-format format>]
-[I<--auth-type authtype> I<--auth-username username> I<--secret-usage usage>]
+[I<--auth-type authtype> I<--auth-username username>
+[I<--secret-usage usage> | I<--secret-uuid uuid>]]
[[I<--adapter-name name>] | [I<--adapter-wwnn> I<--adapter-wwpn>]
[I<--adapter-parent parent>]]
[I<--build>] [[I<--overwrite>] | [I<--no-overwrite>]] [I<--print-xml>]
[I<--source-format format>] provides information about the format of the
pool (pool types fs, netfs, disk, logical).
-[I<--auth-type authtype> I<--auth-username username> I<--secret-usage usage>]
+[I<--auth-type authtype> I<--auth-username username>
+[I<--secret-usage usage> | I<--secret-uuid uuid>]]
provides the elements required to generate authentication credentials for
the storage pool. The I<authtype> is either chap for iscsi I<type> pools or
-ceph for rbd I<type> pools.
+ceph for rbd I<type> pools. Either the secret I<usage> or I<uuid> value may
+be provided, but not both.
[I<--adapter-name name>] defines the scsi_hostN adapter name to be used for
the scsi_host adapter type pool.
=item B<pool-define-as> I<name> I<type>
[I<--source-host hostname>] [I<--source-path path>] [I<--source-dev path>]
[I<--source-name name>] [I<--target path>] [I<--source-format format>]
-[I<--auth-type authtype> I<--auth-username username> I<--secret-usage usage>]
+[I<--auth-type authtype> I<--auth-username username>
+[I<--secret-usage usage> | I<--secret-uuid uuid>]]
[[I<--adapter-name name>] | [I<--adapter-wwnn> I<--adapter-wwpn>]
[I<--adapter-parent parent>]] [I<--print-xml>]