mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virsh: nodedev: ability to filter CSS capabilities
Allow to filter for CSS devices. Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com> Reviewed-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
This commit is contained in:
parent
05e6cdafa6
commit
ab655afa18
@ -420,6 +420,18 @@
|
||||
<dd>The device number.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><code>css</code></dt>
|
||||
<dd>Describes a Channel SubSystem (CSS) device commonly found on
|
||||
the S390 architecture. Sub-elements include:
|
||||
<dl>
|
||||
<dt><code>cssid</code></dt>
|
||||
<dd>The channel subsystem identifier.</dd>
|
||||
<dt><code>ssid</code></dt>
|
||||
<dd>The subchannel-set identifier.</dd>
|
||||
<dt><code>devno</code></dt>
|
||||
<dd>The device number.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -4964,7 +4964,7 @@ List all of the devices available on the node that are known by libvirt.
|
||||
separated by comma, e.g. --cap pci,scsi. Valid capability types include
|
||||
'system', 'pci', 'usb_device', 'usb', 'net', 'scsi_host', 'scsi_target',
|
||||
'scsi', 'storage', 'fc_host', 'vports', 'scsi_generic', 'drm', 'mdev',
|
||||
'mdev_types', 'ccw'.
|
||||
'mdev_types', 'ccw', 'css'.
|
||||
If *--tree* is used, the output is formatted in a tree representing parents of each
|
||||
node. *cap* and *--tree* are mutually exclusive.
|
||||
|
||||
|
@ -81,6 +81,7 @@ typedef enum {
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES = 1 << 13, /* Capable of mediated devices */
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV = 1 << 14, /* Mediated device */
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV = 1 << 15, /* CCW device */
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV = 1 << 16, /* CSS device */
|
||||
} virConnectListAllNodeDeviceFlags;
|
||||
|
||||
int virConnectListAllNodeDevices (virConnectPtr conn,
|
||||
|
@ -368,7 +368,8 @@ virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps);
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_DRM | \
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES | \
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV | \
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV)
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV | \
|
||||
VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV)
|
||||
|
||||
int
|
||||
virNodeDeviceGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host);
|
||||
|
@ -861,7 +861,8 @@ virNodeDeviceObjMatch(virNodeDeviceObjPtr obj,
|
||||
MATCH(DRM) ||
|
||||
MATCH(MDEV_TYPES) ||
|
||||
MATCH(MDEV) ||
|
||||
MATCH(CCW_DEV)))
|
||||
MATCH(CCW_DEV) ||
|
||||
MATCH(CSS_DEV)))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -101,6 +101,7 @@ virNodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags)
|
||||
* VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV_TYPES
|
||||
* VIR_CONNECT_LIST_NODE_DEVICES_CAP_MDEV
|
||||
* VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV
|
||||
* VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV
|
||||
*
|
||||
* Returns the number of node devices found or -1 and sets @devices to NULL in
|
||||
* case of error. On success, the array stored into @devices is guaranteed to
|
||||
|
@ -462,6 +462,8 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
|
||||
flags |= VIR_CONNECT_LIST_NODE_DEVICES_CAP_CCW_DEV;
|
||||
break;
|
||||
case VIR_NODE_DEV_CAP_CSS_DEV:
|
||||
flags |= VIR_CONNECT_LIST_NODE_DEVICES_CAP_CSS_DEV;
|
||||
break;
|
||||
case VIR_NODE_DEV_CAP_LAST:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user