Merge lp:~nick-moffitt/charm-helpers/commandant into lp:~mew/charm-helpers/commandant
Status: | Merged |
---|---|
Merged at revision: | 25 |
Proposed branch: | lp:~nick-moffitt/charm-helpers/commandant |
Merge into: | lp:~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:~nick-moffitt/charm-helpers/commandant |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthew Wedgwood | Pending | ||
Review via email:
|
Description of the change
$ bin/chlp --help
usage: chlp [-h] [--format FMT | -y | -p | -r | -j | -t | -c]
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
-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/
/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/
- [/sys/fs/cgroup, none]
- [/sys/fs/
- [/sys/kernel/debug, none]
- [/sys/kernel/
- [/run/lock, none]
- [/run/shm, none]
- [/run/user, none]
- [/sys/fs/
- [/sys/fs/
- [/sys/fs/
- [/sys/fs/
- [/sys/fs/
- [/sys/fs/
- [/sys/fs/
- [/sys/fs/
- [/sys/fs/
- [/proc/
- [/var/lib/
- [/var/lib/
- [/home/
- [/run/user/