remote: Wire up the remote protocol

Like virNodeDeviceCreateXML, virNodeDeviceLookupSCSIHostByWWN
has to be treated specially when generating the RPC codes. Also
new rules are added in fixup_name to keep the name SCSIHostByWWN.
This commit is contained in:
Osier Yang 2013-02-04 21:03:10 +08:00
parent efed366eb7
commit 39758e7567
4 changed files with 26 additions and 2 deletions

View File

@ -6359,6 +6359,7 @@ static virDeviceMonitor dev_monitor = {
.listDevices = remoteNodeListDevices, /* 0.5.0 */
.listAllNodeDevices = remoteConnectListAllNodeDevices, /* 0.10.2 */
.deviceLookupByName = remoteNodeDeviceLookupByName, /* 0.5.0 */
.deviceLookupSCSIHostByWWN = remoteNodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */
.deviceGetXMLDesc = remoteNodeDeviceGetXMLDesc, /* 0.5.0 */
.deviceGetParent = remoteNodeDeviceGetParent, /* 0.5.0 */
.deviceNumOfCaps = remoteNodeDeviceNumOfCaps, /* 0.5.0 */

View File

@ -1852,6 +1852,16 @@ struct remote_node_device_lookup_by_name_ret {
remote_nonnull_node_device dev;
};
struct remote_node_device_lookup_scsi_host_by_wwn_args {
remote_nonnull_string wwnn;
remote_nonnull_string wwpn;
unsigned int flags;
};
struct remote_node_device_lookup_scsi_host_by_wwn_ret {
remote_nonnull_node_device dev;
};
struct remote_node_device_get_xml_desc_args {
remote_nonnull_string name;
unsigned int flags;
@ -3049,7 +3059,8 @@ enum remote_procedure {
REMOTE_PROC_NODE_GET_CPU_MAP = 293, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_FSTRIM = 294, /* autogen autogen */
REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL = 295, /* autogen autogen */
REMOTE_PROC_DOMAIN_OPEN_CHANNEL = 296 /* autogen autogen | readstream@2 */
REMOTE_PROC_DOMAIN_OPEN_CHANNEL = 296, /* autogen autogen | readstream@2 */
REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN = 297 /* autogen autogen priority:high */
/*
* Notice how the entries are grouped in sets of 10 ?

View File

@ -1400,6 +1400,14 @@ struct remote_node_device_lookup_by_name_args {
struct remote_node_device_lookup_by_name_ret {
remote_nonnull_node_device dev;
};
struct remote_node_device_lookup_scsi_host_by_wwn_args {
remote_nonull_string wwnn;
remote_nonull_string wwpn;
unsigned int flags;
};
struct remote_node_device_lookup_scsi_host_by_wwn_ret {
remote_nonnull_node_device dev;
};
struct remote_node_device_get_xml_desc_args {
remote_nonnull_string name;
u_int flags;
@ -2453,4 +2461,5 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_FSTRIM = 294,
REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL = 295,
REMOTE_PROC_DOMAIN_OPEN_CHANNEL = 296,
REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN = 297,
};

View File

@ -45,6 +45,8 @@ sub fixup_name {
$name =~ s/Nmi$/NMI/;
$name =~ s/Pm/PM/;
$name =~ s/Fstrim$/FSTrim/;
$name =~ s/Scsi/SCSI/;
$name =~ s/Wwn$/WWN/;
return $name;
}
@ -402,7 +404,8 @@ elsif ($opt_b) {
# node device is special, as it's identified by name
if ($argtype =~ m/^remote_node_device_/ and
!($argtype =~ m/^remote_node_device_lookup_by_name_/) and
!($argtype =~ m/^remote_node_device_create_xml_/)) {
!($argtype =~ m/^remote_node_device_create_xml_/) and
!($argtype =~ m/^remote_node_device_lookup_scsi_host_by_wwn_/)) {
$has_node_device = 1;
push(@vars_list, "virNodeDevicePtr dev = NULL");
push(@getters_list,