fix dsconf for setting localrc name=value

It's important when setting localrc name=value that there are no
spaces around the = sign, otherwise it doesn't work. Remember to treat
localrc special from the iniset portions.
This commit is contained in:
Sean Dague 2017-01-17 10:38:03 -05:00
parent 3ecd349bfe
commit dde87e097f
3 changed files with 21 additions and 21 deletions

View File

@ -222,11 +222,11 @@ class LocalConf(object):
if not os.path.exists(self.fname):
with open(self.fname, "w+") as writer:
writer.write("[[local|localrc]]\n")
writer.write("%s = %s\n" % (name, value))
writer.write("%s=%s\n" % (name, value))
return
def _do_set(writer, line):
writer.write("%s = %s\n" % (name, value))
writer.write("%s=%s\n" % (name, value))
self._at_insert_point_local(name, _do_set)
def _at_insert_point(self, group, conf, section, name, func):

View File

@ -25,9 +25,9 @@ from devstack import dsconf
BASIC = """
[[local|localrc]]
a = b
c = d
f = 1
a=b
c=d
f=1
[[post-config|$NEUTRON_CONF]]
[DEFAULT]
global_physnet_mtu=1450
@ -38,8 +38,8 @@ compute = auto
LC1 = """
[[local|localrc]]
a = 5
g = 2
a=5
g=2
[[post-config|$NEUTRON_CONF]]
[DEFAULT]
global_physnet_mtu=1400
@ -50,10 +50,10 @@ compute = auto
RESULT1 = """
[[local|localrc]]
a = 5
c = d
f = 1
g = 2
a=5
c=d
f=1
g=2
[[post-config|$NEUTRON_CONF]]
[DEFAULT]
global_physnet_mtu = 1400

View File

@ -24,9 +24,9 @@ from devstack import dsconf
BASIC = """
[[local|localrc]]
a = b
c = d
f = 1
a=b
c=d
f=1
[[post-config|$NEUTRON_CONF]]
[DEFAULT]
global_physnet_mtu=1450
@ -37,10 +37,10 @@ compute = auto
RESULT1 = """
[[local|localrc]]
a = b
c = d
f = 1
g = 2
a=b
c=d
f=1
g=2
[[post-config|$NEUTRON_CONF]]
[DEFAULT]
global_physnet_mtu=1450
@ -51,9 +51,9 @@ compute = auto
RESULT2 = """
[[local|localrc]]
a = 2
c = d
f = 1
a=2
c=d
f=1
[[post-config|$NEUTRON_CONF]]
[DEFAULT]
global_physnet_mtu=1450