diff options
| author | James Shubin <james@shubin.ca> | 2014-03-08 01:06:22 -0500 |
|---|---|---|
| committer | James Shubin <james@shubin.ca> | 2014-03-16 22:39:07 -0400 |
| commit | dd44a559d820c19f6df1cc66019fa8fb7cecb2c1 (patch) | |
| tree | 3b04dfb85e78f6b79d826e05ff2cef8651b7b279 /files | |
| parent | 2dd6acd1eeffbfdcf0436847ee115310198526f4 (diff) | |
| download | puppet-gluster-dd44a559d820c19f6df1cc66019fa8fb7cecb2c1.tar.gz puppet-gluster-dd44a559d820c19f6df1cc66019fa8fb7cecb2c1.tar.xz puppet-gluster-dd44a559d820c19f6df1cc66019fa8fb7cecb2c1.zip | |
Add support for volume set groups.
This adds support for setting volume set groups which are groups of
properties that are set all at once on a volume. This is managed in a
clever way, so that if the definition of what a certain group contains
gets updated by the package manager, your volumes will get updated too,
on the next puppet run.
Diffstat (limited to 'files')
| -rw-r--r-- | files/xml.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/files/xml.py b/files/xml.py index 27f39df..0650127 100644 --- a/files/xml.py +++ b/files/xml.py @@ -168,7 +168,14 @@ elif args.mode == 'stuck': elif args.mode == 'property': store = [] for i in root.findall('.//option'): - if str(i.find('name').text) == args.key: + + key = str(i.find('name').text) + # if the key requested has no '.' in the name, we match loosely + if args.key.find('.') == -1: # no '.' have been found + # try and match key without a '.' in the name... + key = key[key.find('.')+1:] # remove prefix! + + if key == args.key: store.append(i.find('value').text) if len(store) == 1: |
