Commit Graph

8 Commits

Author SHA1 Message Date
Sean Dague c5626f3b4b support local.conf files with no [[local]] section yet
Previously if we tried to added content to a local.conf file without a
local section, we actually inserted that content in the wrong place at
the end of the file. This fixes that, with unit tests.

Change-Id: Ib886d78ce5f3718def784db59ba9abf41bdb0e7b
2017-02-27 10:08:48 -05:00
Mikhail S Medvedev ae73f278a1 add set_local_raw_multiline test
setlc_raw can be used to set several lines at once. The test checks that
it works as expected. See I565f5420743fbd95e9d744010c488953c54dd8a4
for some context of why that is useful.

Change-Id: I21bd78fa6169002a70fa9074d56d985bfc0b833f
2017-02-22 14:46:24 -06:00
Sean Dague cf9093ec58 rename set_local_raw to set_local
set_local_raw is the new set_local, adjust the code to use the better
name.

Change-Id: I0f16ca647ada37049bdaf570b4695a73b60007ec
2017-02-10 17:01:42 -05:00
Sean Dague de46354ed3 new localrc set strategy
the localrc is really just executable shell, which means there are
tons of edgecases where you can't treat it the same as simple
assignment a=b.

Instead of trying to be smart about things and reduce duplication in
the localrc files, just do the naive thing and stack up all the shell
declarations in order. When evaluated in shell they will end up
stacking up as expected.

Change-Id: I231d130b24b02cdd79618f85472cee21905884e0
2017-02-10 16:57:34 -05:00
Sean Dague 20ab477eae add setlc_raw to the cli
This allows the devstack_localrc command from grenade be ported to
dsconf.

Change-Id: Iea8e826205ad402d0cf6fd6688860171b6f0a391
2017-01-19 09:11:14 -05:00
Sean Dague dde87e097f 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.
2017-01-17 10:38:03 -05:00
Sean Dague 671f526e41 fix pep8 2017-01-16 15:41:20 -05:00
Sean Dague 925b1bc682 add functions to set items in local.conf 2017-01-16 13:31:53 -05:00