[ovs-dev] [PATCH 3/4] vswitchd: Make names of Interface external_ids generic.

Justin Pettit jpettit at nicira.com
Fri Mar 19 00:07:28 UTC 2010


D'oh.  You don't expect me to read every sentence of such a long commit message do you?

Thanks,

--Justin


On Mar 17, 2010, at 9:55 AM, Ben Pfaff wrote:

> Yes (hence the commit log comment).  That takes coordination with Ian
> though since XAPI sets xs-network-uuids, so I was putting it off.
> 
> On Tue, Mar 16, 2010 at 05:47:03PM -0700, Justin Pettit wrote:
>> Looks good.  Did you also want to rename the other "*xs-network-uuid"
>> fields used in the Bridge and Port tables?
>> 
>> --Justin
>> 
>> 
>> On Mar 12, 2010, at 3:08 PM, Ben Pfaff wrote:
>> 
>>> 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.
>>> ---
>>> vswitchd/vswitch.xml                |   36 +++++++++++++++++++++-------------
>>> xenserver/etc_xensource_scripts_vif |    8 +++---
>>> 2 files changed, 26 insertions(+), 18 deletions(-)
>>> 
>>> diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
>>> index 94b5972..7cd32eb 100644
>>> --- a/vswitchd/vswitch.xml
>>> +++ b/vswitchd/vswitch.xml
>>> @@ -383,21 +383,29 @@
>>> 
>>>    <group title="Other Features">
>>>      <column name="external_ids">
>>> -        Key-value pairs that identify this interface's role in external
>>> -        systems.  The currently defined key-value pairs are:
>>> +        <p>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 <code>-uuid</code> 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.</p>
>>> +        <p>The currently defined key-value pairs are:</p>
>>>        <dl>
>>> -          <dt><code>xs-vif-uuid</code></dt>
>>> -          <dd>UUID of the Citrix XenServer VIF associated with this
>>> -            interface.</dd>
>>> -          <dt><code>xs-network-uuid</code></dt>
>>> -          <dd>UUID of the Citrix XenServer network to which this interface is
>>> -            attached.</dd>
>>> -          <dt><code>xs-vif-vm-uuid</code></dt>
>>> -          <dd>UUID of the Citrix XenServer VM to which this interface
>>> -            belongs.</dd>
>>> -          <dt><code>xs-vif-mac</code></dt>
>>> -          <dd>The value of the "MAC" field in the Citrix XenServer VIF record
>>> -            for this interface.</dd>
>>> +          <dt><code>vif-uuid</code></dt>
>>> +          <dd>The virtual interface associated with this interface.</dd>
>>> +          <dt><code>network-uuid</code></dt>
>>> +          <dd>The virtual network to which this interface is attached.</dd>
>>> +          <dt><code>vm-uuid</code></dt>
>>> +          <dd>The VM to which this interface belongs.</dd>
>>> +          <dt><code>vif-mac</code></dt>
>>> +          <dd>The MAC address programmed into the "virtual hardware" for this
>>> +              interface, in the
>>> +              form <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
>>> +              For Citrix XenServer, this is the value of the <code>MAC</code>
>>> +              field in the VIF record for this interface.</dd>
>>>        </dl>
>>>      </column>
>>>    </group>
>>> diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif
>>> index f186f27..e8236c0 100755
>>> --- a/xenserver/etc_xensource_scripts_vif
>>> +++ b/xenserver/etc_xensource_scripts_vif
>>> @@ -102,7 +102,7 @@ handle_vswitch_vif_details()
>>>        fi
>>>    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=
>>> @@ -111,12 +111,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
>>> 
>>>    local vm=$(xenstore-read "/local/domain/$DOMID/vm" 2>/dev/null)
>>> @@ -124,7 +124,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
>>> }
>>> 
>>> -- 
>>> 1.6.6.1
>>> 
>>> 
>>> _______________________________________________
>>> dev mailing list
>>> dev at openvswitch.org
>>> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>> 





More information about the dev mailing list