Env_vars to None by default
@@ -497,7 +497,7 @@ class LibvirtNodeDriver(NodeDriver):
def create_node(self, name, disk_size=4, ram=512,
cpu=1, image=None, disk_path=None, create_from_existing=None,
os_type='linux', networks=[], cloud_init=None, public_key=None,
- env_vars={}):
+ env_vars=None):
"""
Creates a VM
@@ -642,6 +642,7 @@ local-hostname: %s''' % (name, name)
net_name = network
init_env = ""
+ if env_vars:
for env_var in env_vars:
init_env += "<initenv name='%s'>%s</initenv>\n" % (env_var, env_vars[env_var])
conf = XML_CONF_TEMPLATE % (emu, name, ram, cpu, init_env, disk_path, image_conf, net_type, net_type, net_name)
