Merge "Resync charmhelpers for py3 fixes."
This commit is contained in:
commit
42a4213505
@ -853,15 +853,6 @@ class NeutronContext(OSContextGenerator):
|
|||||||
for pkgs in self.packages:
|
for pkgs in self.packages:
|
||||||
ensure_packages(pkgs)
|
ensure_packages(pkgs)
|
||||||
|
|
||||||
def _save_flag_file(self):
|
|
||||||
if self.network_manager == 'quantum':
|
|
||||||
_file = '/etc/nova/quantum_plugin.conf'
|
|
||||||
else:
|
|
||||||
_file = '/etc/nova/neutron_plugin.conf'
|
|
||||||
|
|
||||||
with open(_file, 'wb') as out:
|
|
||||||
out.write(self.plugin + '\n')
|
|
||||||
|
|
||||||
def ovs_ctxt(self):
|
def ovs_ctxt(self):
|
||||||
driver = neutron_plugin_attribute(self.plugin, 'driver',
|
driver = neutron_plugin_attribute(self.plugin, 'driver',
|
||||||
self.network_manager)
|
self.network_manager)
|
||||||
@ -1006,7 +997,6 @@ class NeutronContext(OSContextGenerator):
|
|||||||
flags = config_flags_parser(alchemy_flags)
|
flags = config_flags_parser(alchemy_flags)
|
||||||
ctxt['neutron_alchemy_flags'] = flags
|
ctxt['neutron_alchemy_flags'] = flags
|
||||||
|
|
||||||
self._save_flag_file()
|
|
||||||
return ctxt
|
return ctxt
|
||||||
|
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ def save_script_rc(script_path="scripts/scriptrc", **env_vars):
|
|||||||
juju_rc_path = "%s/%s" % (charm_dir(), script_path)
|
juju_rc_path = "%s/%s" % (charm_dir(), script_path)
|
||||||
if not os.path.exists(os.path.dirname(juju_rc_path)):
|
if not os.path.exists(os.path.dirname(juju_rc_path)):
|
||||||
os.mkdir(os.path.dirname(juju_rc_path))
|
os.mkdir(os.path.dirname(juju_rc_path))
|
||||||
with open(juju_rc_path, 'wb') as rc_script:
|
with open(juju_rc_path, 'wt') as rc_script:
|
||||||
rc_script.write(
|
rc_script.write(
|
||||||
"#!/bin/bash\n")
|
"#!/bin/bash\n")
|
||||||
[rc_script.write('export %s=%s\n' % (u, p))
|
[rc_script.write('export %s=%s\n' % (u, p))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user