Merge lp:~eeejay/mago/typed_args into lp:~mago-contributors/mago/mago-1.0
Proposed by
Eitan Isaacson
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~eeejay/mago/typed_args |
Merge into: | lp:~mago-contributors/mago/mago-1.0 |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~eeejay/mago/typed_args |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Javier Collado (community) | Approve | ||
Joker Wild (community) | Approve | ||
Nagappan Alagappan | Approve | ||
Review via email: mp+10219@code.launchpad.net |
To post a comment you must log in.
This branch adds the following features to suite/case argument parsing:
1. First attempt to parse argument values as integers, reverting to strings.
2. Allow nested dictionaries.
3. Allow lists.
The following XML args: partition_ device> /dev/sda< /partition_ device>
<fs> ext4</fs>
<mountpoint> /</mountpoint>
<size> 1234</size>
<primary> 1</primary>
</partition>
<fs> ext4</fs>
<mountpoint> /home</ mountpoint>
<size> 4321</size>
<primary> 1</primary>
</partition>
<args>
<
<table>
<partition>
<partition>
</table>
</args>
Will be parsed like this:
partition_device = '/dev/sda',
'mountpoint' : '/',
'primary' : 1,
'size' : 1234},
{'fs' : 'ext4',
'mountpoint' : '/home',
'primary' : 1,
'size' : 4321}]}}
table = {'partition': [{'fs': 'ext4',