N_("type of storage pool sources to find")},
{"host", VSH_OT_DATA, VSH_OFLAG_NONE, N_("optional host to query")},
{"port", VSH_OT_DATA, VSH_OFLAG_NONE, N_("optional port to query")},
+ {"initiator", VSH_OT_DATA, VSH_OFLAG_NONE, N_("optional initiator IQN to use for query")},
{NULL, 0, 0, NULL}
};
char *type, *host;
char *srcSpec = NULL;
char *srcList;
+ char *initiator;
int found;
type = vshCommandOptString(cmd, "type", &found);
host = vshCommandOptString(cmd, "host", &found);
if (!found)
host = NULL;
+ initiator = vshCommandOptString(cmd, "initiator", &found);
+ if (!found)
+ initiator = NULL;
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
if (port)
virBufferVSprintf(&buf, " port='%s'", port);
virBufferAddLit(&buf, "/>\n");
+ if (initiator) {
+ virBufferAddLit(&buf, " <initiator>\n");
+ virBufferVSprintf(&buf, " <iqn name='%s'/>\n", initiator);
+ virBufferAddLit(&buf, " </initiator>\n");
+ }
virBufferAddLit(&buf, "</source>\n");
if (virBufferError(&buf)) {
vshError(ctl, "%s", _("Out of memory"));