X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=rwlaunchpad%2Fra%2Fpytest%2Fns%2Frestapitest%2Futils%2Futils.py;fp=rwlaunchpad%2Fra%2Fpytest%2Fns%2Frestapitest%2Futils%2Futils.py;h=c664572c33831a247b300c7585a7632a3ff93b7a;hb=4870d0ee29789b859931e4e2c73e13dcb29537d5;hp=0000000000000000000000000000000000000000;hpb=6f1a3fe149e4a6b9803382cb299c902f4cf58ec9;p=osm%2FSO.git diff --git a/rwlaunchpad/ra/pytest/ns/restapitest/utils/utils.py b/rwlaunchpad/ra/pytest/ns/restapitest/utils/utils.py new file mode 100644 index 00000000..c664572c --- /dev/null +++ b/rwlaunchpad/ra/pytest/ns/restapitest/utils/utils.py @@ -0,0 +1,28 @@ + +from .imports import * # noqa + + +def parse_cli(): + """Parse command line options + """ + + parser = argparse.ArgumentParser() + parser.add_argument("--confd-host", help="confd IP", + dest='confd_host', + default='127.0.0.1') + args = parser.parse_args() + + return args + + +def parse_input_data(file_name): + """ + open the input file and make into a python Dict Obj + """ + + data = '' + + with open(file_name, 'r') as ipf: + data = json.load(ipf) + + return data