← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1370767] Re: Update driver metadata definitions to Juno

 

Reviewed:  https://review.openstack.org/126703
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=eec47084783e931248690a22c143af6f9030b293
Submitter: Jenkins
Branch:    proposed/juno

commit eec47084783e931248690a22c143af6f9030b293
Author: Travis Tripp <travis.tripp@xxxxxx>
Date:   Wed Sep 17 17:30:03 2014 -0600

    Update driver metadata definitions to Juno
    
    vmware and libvirt support different hw_vif_model settings.
    This patch updates them so that each namespace can specify
    the models they support.
    
    vmware api is updated with the vmware_disktype
    
    Change-Id: Iec5901097c9621a052a930b99d5cbe7872d4f3ff
    Closes-bug: 1370767
    (cherry picked from commit ebafdbeef6420d0fcc4922f245956096ca9e50b3)


** Changed in: glance
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1370767

Title:
  Update driver metadata definitions to Juno

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released

Bug description:
  vmware and libvirt support different hw_vif_model settings.  This
  patch updates them so that each namespace can specify the models they
  support.

  vmware api is updated with the vmware_disktype

  
  See below for references to source code.

  vmware:

  hw_vif_model:
  From: https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vm_util.py

  ALL_SUPPORTED_NETWORK_DEVICES = ['VirtualE1000', 'VirtualE1000e',
                                   'VirtualPCNet32', 'VirtualSriovEthernetCard',
                                   'VirtualVmxnet']

  And:

  def convert_vif_model(name):
      """Converts standard VIF_MODEL types to the internal VMware ones."""
      if name == network_model.VIF_MODEL_E1000:
          return 'VirtualE1000'
      if name == network_model.VIF_MODEL_E1000E:
          return 'VirtualE1000e'
      if name not in ALL_SUPPORTED_NETWORK_DEVICES:
          msg = _('%s is not supported.') % name
          raise exception.Invalid(msg)
      return name

  vmware disktype:

  https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/constants.py

  DISK_TYPE_SPARSE = 'sparse'
  SUPPORTED_FLAT_VARIANTS = ["thin", "preallocated", "thick", "eagerZeroedThick"]

  
  libvirt:
  From:  https://github.com/openstack/nova/blob/master/nova/virt/libvirt/vif.py

  def is_vif_model_valid_for_virt(virt_type, vif_model):
      valid_models = {
          'qemu': [network_model.VIF_MODEL_VIRTIO,
                   network_model.VIF_MODEL_NE2K_PCI,
                   network_model.VIF_MODEL_PCNET,
                   network_model.VIF_MODEL_RTL8139,
                   network_model.VIF_MODEL_E1000,
                   network_model.VIF_MODEL_SPAPR_VLAN],
          'kvm': [network_model.VIF_MODEL_VIRTIO,
                  network_model.VIF_MODEL_NE2K_PCI,
                  network_model.VIF_MODEL_PCNET,
                  network_model.VIF_MODEL_RTL8139,
                  network_model.VIF_MODEL_E1000,
                  network_model.VIF_MODEL_SPAPR_VLAN],
          'xen': [network_model.VIF_MODEL_NETFRONT,
                  network_model.VIF_MODEL_NE2K_PCI,
                  network_model.VIF_MODEL_PCNET,
                  network_model.VIF_MODEL_RTL8139,
                  network_model.VIF_MODEL_E1000],
          'lxc': [],
          'uml': [],
          }

  
  From:  https://github.com/openstack/nova/blob/master/nova/network/model.py

  VIF_MODEL_VIRTIO = 'virtio'
  VIF_MODEL_NE2K_PCI = 'ne2k_pci'
  VIF_MODEL_PCNET = 'pcnet'
  VIF_MODEL_RTL8139 = 'rtl8139'
  VIF_MODEL_E1000 = 'e1000'
  VIF_MODEL_E1000E = 'e1000e'
  VIF_MODEL_NETFRONT = 'netfront'
  VIF_MODEL_SPAPR_VLAN = 'spapr-vlan'

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1370767/+subscriptions


References