Monty Taylor
375e772a6e
Match version entry in __init__ with setup.cfg
...
The name listed in setup.cfg is the key and needs to match what's in
__init__.py.
Change-Id: Icf0cfed5ed79bf5e96c94e81cf70f7769ff5b498
2017-02-15 13:43:55 -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
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
de7019bd28
fix pep8 issue
...
Change-Id: If81a2a22af406b700ec5b71b0e738e481a470ee0
2017-01-19 08:41:48 -05:00
Sean Dague
2c8054020b
add the ability for raw line insert during merge
...
Some localrc stanzas, like enable/disable* need to come over during
merge. These lines will not have an = in them.
2017-01-17 15:57:40 -05:00
Sean Dague
dae9f3be8d
print when skipping merging lines
2017-01-17 11:03:13 -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
0366529cc9
initial take at merging local.conf code
2017-01-17 09:03:50 -05:00
Sean Dague
be8cb74021
add more cli support
...
Make it possible to create a blank local.conf
2017-01-17 08:31:49 -05:00
Sean Dague
36b1e0ff34
start adding parser, only support python3
...
python3 argparse adds native subparsers, which makes this much easier
to build without external dependencies (which improves load and run
time). 20ms for most operations means we can do 50 / sec. This will be
a slow down from the awk approach, but for larger gains in
readability.
2017-01-16 16:38:07 -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
7e7ffec87e
fix pep8 issue
2017-01-16 10:22:20 -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