nova/nova/virt
Victor Stinner 497bdfec93 Fix LibvirtGenericVIFDriver.get_config() for quota
When Nova is used with Neutron and Open vSwitch, network quotas on the
bandwidth are ignored by libvirt: the "<bandwidth>" tag is not generated in
libvirt.xml of the virtual machine. This change fixes this issue but also for
the network types: "bridge", "network" and "direct".

Commands to create the flavor with download limited to 1 MB/sec and create a
virtual machine with this flavor:
---
nova flavor-create --ephemeral=1 victor_test_vif 50 256 1 1
nova flavor-key victor_test_vif set quota:vif_inbound_average=1000
nova boot --flavor=victor_test_vif --image=cirros-0.3.1-x86_64-uec victor_test
---

Commands to upload a file to this virtual machine with SCP to check that the
bandwidth is limited to 1 MB/sec (replace 10.0.0.3 with the IP of the virtual
machine):
---
ip netns
sudo ip netns exec qrouter-128db593-a0db-40c3-84c7-e6383d40c75f bash

dd if=/dev/urandom of=random10MB bs=1024 count=10240
scp random10M cirros@10.0.3:
---

Change-Id: I0f0111fc79fe90900e38df022034b208f1129088
Closes-Bug: #1254664
2013-11-28 09:34:06 +01:00
..
baremetal Merge "Make baremetal support metadata for ephemeral block-device-mapping" 2013-11-26 11:51:32 +00:00
disk Fix up spelling mistake 2013-11-21 15:11:36 +11:00
docker docker: return hypervisor_version as an int rather than a string 2013-11-23 19:24:49 -08:00
hyperv Merge "Rename instance_type parameter in migrate_disk_and_power_off to flavor" 2013-11-26 22:56:27 +00:00
libvirt Fix LibvirtGenericVIFDriver.get_config() for quota 2013-11-28 09:34:06 +01:00
vmwareapi Merge "Rename instance_type parameter in migrate_disk_and_power_off to flavor" 2013-11-26 22:56:27 +00:00
xenapi Merge "Rename instance_type parameter in migrate_disk_and_power_off to flavor" 2013-11-26 22:56:27 +00:00
__init__.py In preparation for XenAPI support, refactor the interface between 2010-07-18 18:15:12 +01:00
block_device.py Add missing fields in DriverBlockDevice 2013-11-01 09:13:31 -04:00
configdrive.py clean up numeric expressions with byte constants 2013-10-27 05:26:41 -07:00
driver.py Pass Instance object to get_spice_console virt api 2013-11-26 19:24:14 -05:00
event.py Fix and enable H403 tests 2013-06-12 22:07:23 +02:00
fake.py Pass Instance object to get_spice_console virt api 2013-11-26 19:24:14 -05:00
firewall.py Make virt/firewall use objects for Security Groups and Rules 2013-10-30 07:34:58 -07:00
images.py Move flags in libvirt's imagebackend to the libvirt group 2013-11-25 13:06:08 +11:00
interfaces.template Port Cheetah templates to Jinja2 2013-09-02 16:03:34 +02:00
netutils.py Ensure that the netaddr import is in the 3rd party section 2013-10-08 02:07:56 -07:00
storage_users.py Fixes typos in virt files 2013-10-07 15:40:39 +02:00
virtapi.py Rename virtapi.instance_type_get to flavor_get 2013-11-13 13:59:10 -08:00