From: Ben Pfaff Date: Fri, 12 Mar 2010 22:57:59 +0000 (-0800) Subject: vswitchd: Make names of Interface external_ids generic. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0f9490c24649855f36b9cb426decd600e5c3115;p=openvswitch vswitchd: Make names of Interface external_ids generic. Until now the names of the external_ids keys used for Interface records have implied that they are specific to XenServer, because they begin with "xs-". They are more generic in intent, however, so this commit removes the "xs-" prefix and explains them more generically. The Bridge record's external_ids still need renaming. --- diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 94b5972d..7cd32ebb 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -383,21 +383,29 @@ - Key-value pairs that identify this interface's role in external - systems. The currently defined key-value pairs are: +

Key-value pairs that identify this interface's role in external + systems. All of the currently defined key-value pairs specifically + apply to an interface that represents a virtual Ethernet interface + connected to a virtual machine. These key-value pairs should not be + present for other types of interfaces. Keys whose names end + in -uuid have values that uniquely identify the entity + in question. For a Citrix XenServer hypervisor, these values are + UUIDs in RFC 4122 format. Other hypervisors may use other + formats.

+

The currently defined key-value pairs are:

-
xs-vif-uuid
-
UUID of the Citrix XenServer VIF associated with this - interface.
-
xs-network-uuid
-
UUID of the Citrix XenServer network to which this interface is - attached.
-
xs-vif-vm-uuid
-
UUID of the Citrix XenServer VM to which this interface - belongs.
-
xs-vif-mac
-
The value of the "MAC" field in the Citrix XenServer VIF record - for this interface.
+
vif-uuid
+
The virtual interface associated with this interface.
+
network-uuid
+
The virtual network to which this interface is attached.
+
vm-uuid
+
The VM to which this interface belongs.
+
vif-mac
+
The MAC address programmed into the "virtual hardware" for this + interface, in the + form xx:xx:xx:xx:xx:xx. + For Citrix XenServer, this is the value of the MAC + field in the VIF record for this interface.
diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif index 02819045..ab9a56ee 100755 --- a/xenserver/etc_xensource_scripts_vif +++ b/xenserver/etc_xensource_scripts_vif @@ -92,7 +92,7 @@ handle_vswitch_vif_details() local vm_uuid=$(xenstore-read "$vm/uuid" 2>/dev/null) fi if [ -n "${vm_uuid}" ] ; then - set_vif_external_id "xs-vm-uuid" "${vm_uuid}" + set_vif_external_id "vm-uuid" "${vm_uuid}" fi local vif_uuid=$(xenstore-read "${PRIVATE}/vif-uuid" 2>/dev/null) @@ -100,7 +100,7 @@ handle_vswitch_vif_details() vif_uuid=$(xe vif-list --minimal vm-uuid="${vm_uuid}" device=$DEVID) fi if [ -n "${vif_uuid}" ] ; then - set_vif_external_id "xs-vif-uuid" "${vif_uuid}" + set_vif_external_id "vif-uuid" "${vif_uuid}" fi local vif_details= @@ -109,12 +109,12 @@ handle_vswitch_vif_details() net_uuid=$(xe vif-param-get uuid="${vif_uuid}" param-name=network-uuid) fi if [ -n "${net_uuid}" ] ; then - set_vif_external_id "xs-network-uuid" "${net_uuid}" + set_vif_external_id "network-uuid" "${net_uuid}" fi local address=$(xenstore-read "/local/domain/$DOMID/device/vif/$DEVID/mac" 2>/dev/null) if [ -n "${address}" ] ; then - set_vif_external_id "xs-vif-mac" "${address}" + set_vif_external_id "vif-mac" "${address}" fi }