From 8afa7fe487e4e79fef07a11ad5f0cb8f846a73ed Mon Sep 17 00:00:00 2001 From: Joy Lal Chattaraj Date: Tue, 19 Mar 2019 19:12:53 +0530 Subject: [PATCH] SDK-344: Enable use of port argument for DbTaps #267 --- qds_sdk/dbtaps.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qds_sdk/dbtaps.py b/qds_sdk/dbtaps.py index c5ded3c6..84941c21 100644 --- a/qds_sdk/dbtaps.py +++ b/qds_sdk/dbtaps.py @@ -72,8 +72,7 @@ def parsers(): help="Username") edit.add_argument("--password", dest="password", help="Password") - edit.add_argument("--port", dest="port", - help="Database Port") + edit.add_argument("--port", dest="port", help="Database Port") edit.add_argument("--type", dest="type", choices=["mysql","vertica","mongo","postgresql","redshift","sqlserver"], help="Type of database") edit.add_argument("--location", dest="location", choices=["us-east-1", "us-west-2", "ap-southeast-1", "eu-west-1", "on-premise"], @@ -107,7 +106,8 @@ def create(args): db_user=args.user, db_passwd=args.password, db_type=args.type, - db_location=args.location) + db_location=args.location, + port=args.port) return json.dumps(dbtap.attributes, sort_keys=True, indent=4) @@ -148,6 +148,8 @@ def edit(args): options["db_type"] = args.type if args.location is not None: options["db_location"] = args.location + if args.port is not None: + options["port"] = args.port tap = tap.edit(**options) return json.dumps(tap.attributes, sort_keys=True, indent=4)