ceph-disk: add 'zap' command

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-06-13 11:03:37 -07:00
parent 99bd5c8f7b
commit 10ba60cd08

View File

@ -1869,6 +1869,9 @@ def main_suppress(args):
def main_unsuppress(args):
unset_suppress(args.path)
def main_zap(args):
for dev in args.dev:
zap(dev)
###########################
@ -2028,6 +2031,17 @@ def parse_args():
func=main_unsuppress,
)
zap_parser = subparsers.add_parser('zap', help='Zap/erase/destroy a device\'s partition table (and contents)')
zap_parser.add_argument(
'dev',
metavar='DEV',
nargs='*',
help='path to block device',
)
zap_parser.set_defaults(
func=main_zap,
)
args = parser.parse_args()
return args