#!/usr/bin/python3

import sys
import argparse
from SystemLib import ogHelp
from ImageLib import ogGetSizeParameters

parser = argparse.ArgumentParser (add_help=False)
parser.add_argument ('disk')
parser.add_argument ('par')
parser.add_argument ('container')
parser.add_argument ('imgname')

if 2 == len (sys.argv) and 'help' == sys.argv[1]:
    #parser.print_help() sale en inglés aunque la locale indique otra cosa
    ogHelp ('ogGetSizeParameters', 'ogGetSizeParameters num_disk num_part str_repo path_imgname', ['read SIZEDATA SIZEREQUIRED SIZEFREE ISENOUGHSPACE <<< $(ogGetSizeParameters 1 2 REPO Windows10)', 'read SIZEDATA SIZEREQUIRED SIZEFREE ISENOUGHSPACE <<< $(ogGetSizeParameters 1 6 CACHE Ubuntu16'])
    sys.exit (0)

args = parser.parse_args()
sizedata, sizerequired, sizefree, isenoughspace = ogGetSizeParameters (args.disk, args.par, args.container, args.imgname)
print (' '.join ([str(sizedata), str(sizerequired), str(sizefree), str(isenoughspace)]))
