From 3a9e5029164ade94bac784fb3328db09a720ea3f Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 12 Jul 2012 12:18:55 +0200 Subject: [PATCH] review usage --- scripts/vsys_vnet_admin.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/vsys_vnet_admin.py b/scripts/vsys_vnet_admin.py index 8786f80..5dfeab4 100755 --- a/scripts/vsys_vnet_admin.py +++ b/scripts/vsys_vnet_admin.py @@ -50,16 +50,20 @@ if __name__ == "__main__": pl_url = "https://www.planet-lab.eu:443/PLCAPI/" pl_slice = os.environ.get('PL_SLICE') - usage = "usage: %prog -u -p -l -S --assign -b -n " + usage = """Usage: + %prog : displays and check current assignments +or %prog -a -S : assigns a range to slice """ parser = OptionParser(usage=usage) parser.add_option("-u", "--user", dest="pl_user", help="PlanetLab account user name", default=pl_user) parser.add_option("-p", "--password", dest="pl_pwd", help="PlanetLab account password", default=pl_pwd) - parser.add_option("-S", "--slice", dest="pl_slice", help="PlanetLab slice name", default=pl_slice) parser.add_option("-l", "--url", dest="pl_url", help="PlanetLab XMLRPC url", default=pl_url) - parser.add_option("-b", "--base", dest="basenet", help="Base network address to perform assignment (defaults to 10.0.0.0/8)", default="10.0.0.0/8") + parser.add_option("-b", "--base", dest="basenet", + help="Base network address to perform assignment (defaults to 10.0.0.0/8)", default="10.0.0.0/8") parser.add_option("-n", "--prefix", dest="prefix", help="Network prefix for segments (defaults to 21)", default = "21") parser.add_option("-a", "--assign", action="store_true", dest="assign", default=False, - help="If specified, assign next available network segment as a vsys_vnet tag to the user slice") + help="If specified, assign next available network segment as a vsys_vnet tag to the target slice") + parser.add_option("-S", "--slice", dest="pl_slice", default=pl_slice, + help="target PlanetLab slice name, for --assign", ) (options, args) = parser.parse_args() -- 2.43.0