def main():
parser = argparse.ArgumentParser(
description=('Allocates IP addresses on nodes in an inventory file.'),
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('--inventory',
dest='inventory_file',
required=True,
help='The path to the inventory file.')
# Handle error cases before attempting to parse
# a command off the command line
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
allocate_ips(args.inventory_file)
allocate_ip_addresses.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录