diff options
author | 2016-05-24 15:41:51 +0000 | |
---|---|---|
committer | 2016-05-24 15:41:51 +0000 | |
commit | 5fec80057dbd799d52a4c1ff2f35a1c8cc5ad6ea (patch) | |
tree | fb621e88b7ad9bdd8d6b1edbecdcde1ff85ea5a0 /lib/python/apex-python-utils.py | |
parent | cefd51c360e3d3c4bc160844a467255d84c9f16c (diff) | |
parent | fb0f275cd373aec28a8a970ced0f1d20ca8abbfc (diff) |
Merge "Add pinning support"
Diffstat (limited to 'lib/python/apex-python-utils.py')
-rwxr-xr-x | lib/python/apex-python-utils.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/python/apex-python-utils.py b/lib/python/apex-python-utils.py index 1d5b4a7c..7e947ea6 100755 --- a/lib/python/apex-python-utils.py +++ b/lib/python/apex-python-utils.py @@ -7,7 +7,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## - import argparse import sys import apex @@ -21,6 +20,10 @@ def parse_net_settings(settings_args): settings_args.network_isolation) settings.dump_bash() +def parse_deploy_settings(settings_args): + settings = apex.DeploySettings(settings_args.path) + settings.dump_bash() + def find_ip(int_args): interface = apex.ip_utils.get_interface(int_args.interface, @@ -73,6 +76,12 @@ nic_template.add_argument('-af', '--address_family', type=int, default=4, help='IP address family') nic_template.set_defaults(func=build_nic_template) +deploy_settings = subparsers.add_parser('parse-deploy-settings', + help='Parse deploy settings file') +deploy_settings.add_argument('-f', '--path', default='deploy_settings.yaml', + help='path to deploy settings file') +deploy_settings.set_defaults(func=parse_deploy_settings) + args = parser.parse_args(sys.argv[1:]) if args.DEBUG: logging.basicConfig(level=logging.DEBUG) |