@staticmethod
def get_ovs_interfaceid(vif):
    """Returns the interface id to set for a given VIF.

        When a VIF is plugged for an Open vSwitch, it needs to have the
        interface ID set in the OVS metadata.  This returns what the
        appropriate interface id is.

        :param vif: The Nova network interface.
        """
    return vif.get('ovs_interfaceid') or vif['id']
