diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-07-22 17:03:03 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-07-22 17:03:03 +0000 |
commit | 48cc806d22e68ad3f759b13697e83c440440eab5 (patch) | |
tree | d4b2995f00318eaa640114e358be0e3def55090a /nova/virt/netutils.py | |
parent | 777f4b17bfed38897424f0d4fb5ba20303a4e0cf (diff) | |
parent | ffd71a6c120aa1700f263c26f030445ed2579052 (diff) | |
download | nova-48cc806d22e68ad3f759b13697e83c440440eab5.tar.gz |
Merge "xenapi: Use netuils.get_injected_network_template"
Diffstat (limited to 'nova/virt/netutils.py')
-rw-r--r-- | nova/virt/netutils.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nova/virt/netutils.py b/nova/virt/netutils.py index be0b863823..c3319d3ced 100644 --- a/nova/virt/netutils.py +++ b/nova/virt/netutils.py @@ -66,8 +66,7 @@ def _get_first_network(network, version): pass -def get_injected_network_template(network_info, use_ipv6=CONF.use_ipv6, - template=CONF.injected_network_template, +def get_injected_network_template(network_info, use_ipv6=None, template=None, libvirt_virt_type=None): """Returns a rendered network template for the given network_info. @@ -79,6 +78,12 @@ def get_injected_network_template(network_info, use_ipv6=CONF.use_ipv6, :param libvirt_virt_type: The Libvirt `virt_type`, will be `None` for other hypervisors.. """ + if use_ipv6 is None: + use_ipv6 = CONF.use_ipv6 + + if not template: + template = CONF.injected_network_template + if not (network_info and template): return |