summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanwent@gmail.com <>2011-08-28 12:53:32 -0700
committerdanwent@gmail.com <>2011-08-28 12:53:32 -0700
commit1bfc7ce80c3936a19434dfc45c44f8a1acfd65ed (patch)
tree7801bea735336dede151a212adbbfe1f0150f344
parentd5b489383710605b10067550417a4e62a5f4f3e1 (diff)
fix issue with setting 'Active' caused by Quantum API changes. Other misc fixes
-rw-r--r--nova/network/quantum/quantum_connection.py6
-rw-r--r--nova/virt/libvirt/vif.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/nova/network/quantum/quantum_connection.py b/nova/network/quantum/quantum_connection.py
index c0eaad1fd..a13867af2 100644
--- a/nova/network/quantum/quantum_connection.py
+++ b/nova/network/quantum/quantum_connection.py
@@ -65,7 +65,7 @@ class QuantumClientConnection:
def create_and_attach_port(self, tenant_id, net_id, interface_id):
LOG.debug("Connecting interface %s to net %s for %s" % \
(interface_id, net_id, tenant_id))
- port_data = {'port': {'port-state': 'ACTIVE'}}
+ port_data = {'port': {'state': 'ACTIVE'}}
resdict = self.client.create_port(net_id, port_data, tenant=tenant_id)
port_id = resdict["port"]["id"]
@@ -74,13 +74,13 @@ class QuantumClientConnection:
tenant=tenant_id)
def detach_and_delete_port(self, tenant_id, net_id, port_id):
- LOG.debug("Deleteing port %s on net %s for %s" % \
+ LOG.debug("Deleting port %s on net %s for %s" % \
(port_id, net_id, tenant_id))
self.client.detach_resource(net_id, port_id, tenant=tenant_id)
self.client.delete_port(net_id, port_id, tenant=tenant_id)
- # FIXME: this will be inefficient until API implements querying
+ # FIXME: (danwent) this will be inefficient until API implements querying
def get_port_by_attachment(self, tenant_id, attachment_id):
net_list_resdict = self.client.list_networks(tenant=tenant_id)
diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py
index 0b7438011..077c32474 100644
--- a/nova/virt/libvirt/vif.py
+++ b/nova/virt/libvirt/vif.py
@@ -101,7 +101,7 @@ class LibvirtOpenVswitchDriver(VIFDriver):
"""VIF driver for Open vSwitch."""
def get_dev_name(_self, iface_id):
- return "tap-" + iface_id[0:15]
+ return "tap" + iface_id[0:11]
def plug(self, instance, network, mapping):
iface_id = mapping['vif_uuid']