1
2
3 from starcluster import static
4
5 from base import CmdBase
6
7
9 """
10 listvolumes
11
12 List all EBS volumes
13 """
14 names = ['listvolumes', 'lv']
15
17 parser.add_option("-d", "--show-deleted", dest="show_deleted",
18 action="store_true", default=False,
19 help="show volumes that are being deleted")
20 parser.add_option("-v", "--volume-id", dest="volume_id",
21 action="store", type="string", default=None,
22 help="show a single volume with id VOLUME_ID")
23 parser.add_option("-s", "--size", dest="size", action="store",
24 type="string", default=None,
25 help="show all volumes of a particular size")
26 parser.add_option("-S", "--status", dest="status", action="store",
27 default=None, choices=static.VOLUME_STATUS,
28 help="show all volumes with status")
29 parser.add_option("-a", "--attach-status", dest="attach_status",
30 action="store", default=None,
31 choices=static.VOLUME_ATTACH_STATUS,
32 help="show all volumes with attachment status")
33 parser.add_option("-z", "--zone", dest="zone", action="store",
34 type="string", default=None,
35 help="show all volumes in zone")
36 parser.add_option("-i", "--snapshot-id", dest="snapshot_id",
37 action="store", type="string", default=None,
38 help="show all volumes created from snapshot")
39
42