Merge lp://qastaging/~nick-moffitt/charm-helpers/commandant into lp://qastaging/~mew/charm-helpers/commandant

Proposed by Nick Moffitt
Status: Merged
Merged at revision: 25
Proposed branch: lp://qastaging/~nick-moffitt/charm-helpers/commandant
Merge into: lp://qastaging/~mew/charm-helpers/commandant
Diff against target: 218 lines (+123/-12)
4 files modified
charmhelpers/cli/__init__.py (+69/-2)
charmhelpers/cli/host.py (+1/-3)
tests/cli/test_command_decorators.py (+46/-0)
tests/cli/test_function_signature_analysis.py (+7/-7)
To merge this branch: bzr merge lp://qastaging/~nick-moffitt/charm-helpers/commandant
Reviewer Review Type Date Requested Status
Matthew Wedgwood Pending
Review via email: mp+170642@code.qastaging.launchpad.net

Description of the change

$ bin/chlp --help
usage: chlp [-h] [--format FMT | -y | -p | -r | -j | -t | -c]
            {mounts,service} ...

Perform common charm tasks

positional arguments:
  {mounts,service} Commands

optional arguments:
  -h, --help show this help message and exit
  --format FMT Select output format for returned data, where FMT is one
                    of: ['yaml', 'python', 'raw', 'json', 'tab', 'csv']
  -y, --yaml Output data in YAML format
  -p, --python Output data as a nicely-formatted python data structure
  -r, --raw Output data as raw string
  -j, --json Output data in JSON format
  -t, --tab Output data in excel-compatible tab-delimited format
  -c, --csv Output data as excel-compatible CSV

$ bin/chlp --format=tab mounts | cut -f 2 | sort -u
/dev/disk/by-uuid/5237fceb-23d0-412d-84d9-b8f8b3bf28af
/home/nick/.Private
binfmt_misc
cgroup
devpts
gvfsd-fuse
none
proc
rootfs
sysfs
tmpfs
udev
$ ./chlp -y mounts
- [/, rootfs]
- [/sys, sysfs]
- [/proc, proc]
- [/dev, udev]
- [/dev/pts, devpts]
- [/run, tmpfs]
- [/, /dev/disk/by-uuid/5237fceb-23d0-412d-84d9-b8f8b3bf28af]
- [/sys/fs/cgroup, none]
- [/sys/fs/fuse/connections, none]
- [/sys/kernel/debug, none]
- [/sys/kernel/security, none]
- [/run/lock, none]
- [/run/shm, none]
- [/run/user, none]
- [/sys/fs/cgroup/cpuset, cgroup]
- [/sys/fs/cgroup/cpu, cgroup]
- [/sys/fs/cgroup/cpuacct, cgroup]
- [/sys/fs/cgroup/memory, cgroup]
- [/sys/fs/cgroup/devices, cgroup]
- [/sys/fs/cgroup/freezer, cgroup]
- [/sys/fs/cgroup/blkio, cgroup]
- [/sys/fs/cgroup/perf_event, cgroup]
- [/sys/fs/cgroup/hugetlb, cgroup]
- [/proc/sys/fs/binfmt_misc, binfmt_misc]
- [/var/lib/schroot/mount/lp0-0b9ed0ed-191c-4195-a6ff-ae429d90f821, /dev/disk/by-uuid/5237fceb-23d0-412d-84d9-b8f8b3bf28af]
- [/var/lib/schroot/mount/lp0-efa0ce0d-8b91-445b-ad51-69336f1b59c2, /dev/disk/by-uuid/5237fceb-23d0-412d-84d9-b8f8b3bf28af]
- [/home/nick/Private, /home/nick/.Private]
- [/run/user/nick/gvfs, gvfsd-fuse]

To post a comment you must log in.
26. By Nick Moffitt

fix tests

27. By Nick Moffitt

Begin testing the command-wrapping decorators. Fixed the optional argument syntax to include dashes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: