Remove spoc-image extract

This commit is contained in:
Disassembler 2020-02-11 16:22:37 +01:00
parent e4088372f4
commit 19425cece9
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

View File

@ -15,7 +15,6 @@ ACTION_DELETE = 3
ACTION_BUILD = 4 ACTION_BUILD = 4
ACTION_PUBLISH = 5 ACTION_PUBLISH = 5
ACTION_UNPUBLISH = 6 ACTION_UNPUBLISH = 6
ACTION_EXTRACT = 7
def get_image_name(filepath): def get_image_name(filepath):
# Read and return image name from image file # Read and return image name from image file
@ -73,9 +72,6 @@ def unpublish(image_name):
image = Image(image_name, False) image = Image(image_name, False)
image.unpublish() image.unpublish()
def extract(image_name, source, destination):
raise NotImplementedException() # TODO
parser = argparse.ArgumentParser(description='SPOC image manager') parser = argparse.ArgumentParser(description='SPOC image manager')
parser.set_defaults(action=None) parser.set_defaults(action=None)
subparsers = parser.add_subparsers() subparsers = parser.add_subparsers()
@ -107,12 +103,6 @@ parser_unpublish = subparsers.add_parser('unpublish')
parser_unpublish.set_defaults(action=ACTION_UNPUBLISH) parser_unpublish.set_defaults(action=ACTION_UNPUBLISH)
parser_unpublish.add_argument('image') parser_unpublish.add_argument('image')
parser_extract = subparsers.add_parser('extract')
parser_extract.set_defaults(action=ACTION_EXTRACT)
parser_extract.add_argument('image')
parser_extract.add_argument('source')
parser_extract.add_argument('destination')
args = parser.parse_args() args = parser.parse_args()
if args.action == ACTION_LIST: if args.action == ACTION_LIST:
@ -127,7 +117,5 @@ elif args.action == ACTION_PUBLISH:
publish(args.image, args.force) publish(args.image, args.force)
elif args.action == ACTION_UNPUBLISH: elif args.action == ACTION_UNPUBLISH:
publishreop.unpublish_image(args.image) publishreop.unpublish_image(args.image)
elif args.action == ACTION_EXTRACT:
extract(args.image, args.source, args.destination)
else: else:
parser.print_usage() parser.print_usage()