def contruct_parser(subparsers):
parser = subparsers.add_parser('lswitch', description="Functions for logical switches",
help="Functions for logical switches",
formatter_class=RawTextHelpFormatter)
parser.add_argument("command", help="""
create: create a new logical switch
read: return the virtual wire id of a logical switch
delete: delete a logical switch"
list: return a list of all logical switches
""")
parser.add_argument("-t",
"--transport_zone",
help="nsx transport zone")
parser.add_argument("-n",
"--name",
help="logical switch name, needed for create, read and delete")
parser.set_defaults(func=_lswitch_main)
评论列表
文章目录