16 Commits

Author SHA1 Message Date
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
1384ec992d add tests for merging lines beyond a=b
Change-Id: Id2af3b86e19c02fee4058d61e15eb6dd462c6e73
2017-01-19 09:18:11 -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
3ecd349bfe Fix merge of local.conf add tests 2017-01-17 09:22:18 -05:00
Sean Dague
671f526e41 fix pep8 2017-01-16 15:41:20 -05:00
Sean Dague
de574dc6a8 support localconf set 2017-01-16 14:20:58 -05:00
Sean Dague
925b1bc682 add functions to set items in local.conf 2017-01-16 13:31:53 -05:00
Sean Dague
a0f574ab97 add localrc extraction 2017-01-16 12:45:37 -05:00
Sean Dague
edd7cc1bcc tests for merging with existing ini files 2017-01-16 12:12:28 -05:00
Sean Dague
e7636a7714 make iniset work with files that do not yet exist
This allows the add and set commands to work when files do not yet
exist, which becomes important for extracting things like post config
files.
2017-01-16 12:07:10 -05:00
Sean Dague
79f8f551c3 add uncomment function 2017-01-16 10:18:53 -05:00
Sean Dague
6971e39e94 Add comment, set, has methods 2017-01-16 10:04:51 -05:00
Sean Dague
0c14c58913 add inifile add/remove code 2017-01-16 09:37:39 -05:00
Sean Dague
7955f99443 Initial Cookiecutter Commit. 2017-01-16 08:06:54 -05:00