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:
parent
3ecd349bfe
commit
dde87e097f
|
@ -222,11 +222,11 @@ class LocalConf(object):
|
||||||
if not os.path.exists(self.fname):
|
if not os.path.exists(self.fname):
|
||||||
with open(self.fname, "w+") as writer:
|
with open(self.fname, "w+") as writer:
|
||||||
writer.write("[[local|localrc]]\n")
|
writer.write("[[local|localrc]]\n")
|
||||||
writer.write("%s = %s\n" % (name, value))
|
writer.write("%s=%s\n" % (name, value))
|
||||||
return
|
return
|
||||||
|
|
||||||
def _do_set(writer, line):
|
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)
|
self._at_insert_point_local(name, _do_set)
|
||||||
|
|
||||||
def _at_insert_point(self, group, conf, section, name, func):
|
def _at_insert_point(self, group, conf, section, name, func):
|
||||||
|
|
|
@ -25,9 +25,9 @@ from devstack import dsconf
|
||||||
|
|
||||||
BASIC = """
|
BASIC = """
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
a = b
|
a=b
|
||||||
c = d
|
c=d
|
||||||
f = 1
|
f=1
|
||||||
[[post-config|$NEUTRON_CONF]]
|
[[post-config|$NEUTRON_CONF]]
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
global_physnet_mtu=1450
|
global_physnet_mtu=1450
|
||||||
|
@ -38,8 +38,8 @@ compute = auto
|
||||||
|
|
||||||
LC1 = """
|
LC1 = """
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
a = 5
|
a=5
|
||||||
g = 2
|
g=2
|
||||||
[[post-config|$NEUTRON_CONF]]
|
[[post-config|$NEUTRON_CONF]]
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
global_physnet_mtu=1400
|
global_physnet_mtu=1400
|
||||||
|
@ -50,10 +50,10 @@ compute = auto
|
||||||
|
|
||||||
RESULT1 = """
|
RESULT1 = """
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
a = 5
|
a=5
|
||||||
c = d
|
c=d
|
||||||
f = 1
|
f=1
|
||||||
g = 2
|
g=2
|
||||||
[[post-config|$NEUTRON_CONF]]
|
[[post-config|$NEUTRON_CONF]]
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
global_physnet_mtu = 1400
|
global_physnet_mtu = 1400
|
||||||
|
|
|
@ -24,9 +24,9 @@ from devstack import dsconf
|
||||||
|
|
||||||
BASIC = """
|
BASIC = """
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
a = b
|
a=b
|
||||||
c = d
|
c=d
|
||||||
f = 1
|
f=1
|
||||||
[[post-config|$NEUTRON_CONF]]
|
[[post-config|$NEUTRON_CONF]]
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
global_physnet_mtu=1450
|
global_physnet_mtu=1450
|
||||||
|
@ -37,10 +37,10 @@ compute = auto
|
||||||
|
|
||||||
RESULT1 = """
|
RESULT1 = """
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
a = b
|
a=b
|
||||||
c = d
|
c=d
|
||||||
f = 1
|
f=1
|
||||||
g = 2
|
g=2
|
||||||
[[post-config|$NEUTRON_CONF]]
|
[[post-config|$NEUTRON_CONF]]
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
global_physnet_mtu=1450
|
global_physnet_mtu=1450
|
||||||
|
@ -51,9 +51,9 @@ compute = auto
|
||||||
|
|
||||||
RESULT2 = """
|
RESULT2 = """
|
||||||
[[local|localrc]]
|
[[local|localrc]]
|
||||||
a = 2
|
a=2
|
||||||
c = d
|
c=d
|
||||||
f = 1
|
f=1
|
||||||
[[post-config|$NEUTRON_CONF]]
|
[[post-config|$NEUTRON_CONF]]
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
global_physnet_mtu=1450
|
global_physnet_mtu=1450
|
||||||
|
|
Loading…
Reference in New Issue