summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>2011-06-20 15:55:02 +0100
committerSalvatore Orlando <salvatore.orlando@eu.citrix.com>2011-06-20 15:55:02 +0100
commit260af1f3edb7993a6b6374563ef2b46c7fa700df (patch)
tree3bb2e2a4e6071914210c1c81603ee098acd5db98
parentc2a8d0f1e2e9a25465100128bae4f60b532d16f5 (diff)
downloadnova-260af1f3edb7993a6b6374563ef2b46c7fa700df.tar.gz
nova-260af1f3edb7993a6b6374563ef2b46c7fa700df.tar.xz
nova-260af1f3edb7993a6b6374563ef2b46c7fa700df.zip
Enclosing tokens for xenapi filter in double quotes
-rw-r--r--nova/network/xenapi_net.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/network/xenapi_net.py b/nova/network/xenapi_net.py
index 709ef7f34..7976a7265 100644
--- a/nova/network/xenapi_net.py
+++ b/nova/network/xenapi_net.py
@@ -56,8 +56,10 @@ def ensure_vlan_bridge(vlan_num, bridge, net_attrs=None):
'other_config': {}}
network_ref = session.call_xenapi('network.create', network_rec)
# 2 - find PIF for VLAN
- expr = "field 'device' = '%s' and \
- field 'VLAN' = '-1'" % FLAGS.vlan_interface
+ # Note using double quotes inside single quotes as xapi filter
+ # only support tokens in double quotes
+ expr = 'field "device" = "%s" and \
+ field "VLAN" = "-1"' % FLAGS.vlan_interface
pifs = session.call_xenapi('PIF.get_all_records_where', expr)
pif_ref = None
# Multiple PIF are ok: we are dealing with a pool