Rename 'GenerateTapName' to 'GenerateKvmTapName'
authorJose A. Lopes <jabolopes@google.com>
Mon, 7 Apr 2014 14:56:20 +0000 (16:56 +0200)
committerJose A. Lopes <jabolopes@google.com>
Tue, 15 Apr 2014 15:34:33 +0000 (17:34 +0200)
This is an intermediary step before extracting most of the body of
'GenerateTapName' to a separate function that can be reused by the Xen
hypervisor as well.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

lib/hypervisor/hv_kvm/__init__.py

index 4a80b2d..2e1dd47 100644 (file)
@@ -1462,7 +1462,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
       raise errors.HypervisorError("Failed to start instance %s" % name)
 
   @staticmethod
-  def _GenerateTapName(nic):
+  def _GenerateKvmTapName(nic):
     """Generate a TAP network interface name for a NIC.
 
     This helper function generates a special TAP network interface
@@ -1595,7 +1595,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
 
       for nic_seq, nic in enumerate(kvm_nics):
         tapname, tapfd = OpenTap(vnet_hdr=vnet_hdr,
-                                 name=self._GenerateTapName(nic))
+                                 name=self._GenerateKvmTapName(nic))
         tapfds.append(tapfd)
         taps.append(tapname)
         if kvm_supports_netdev: