Commit 640eecc4 by Feanil Patel

Accept a mongo uri instead of a host,port and password.

parent b736c5fd
...@@ -29,7 +29,7 @@ class MongoConnection: ...@@ -29,7 +29,7 @@ class MongoConnection:
def __init__(self): def __init__(self):
try: try:
mongo = MongoClient(host=args.mongo_host, port=args.mongo_port) mongo = MongoClient(host=args.mongo_uri)
except ConnectionFailure: except ConnectionFailure:
print "Unable to connect to the mongo database specified" print "Unable to connect to the mongo database specified"
sys.exit(1) sys.exit(1)
...@@ -166,15 +166,10 @@ def parse_args(): ...@@ -166,15 +166,10 @@ def parse_args():
default=5, default=5,
help="How long to delay message display from sqs " help="How long to delay message display from sqs "
"to ensure ordering") "to ensure ordering")
parser.add_argument("--mongo-host", required=False, parser.add_argument("--mongo-uri", required=False,
default=None, default=None,
help="Mongo host that contains the AMI collection") help="Mongo uri for the host that contains"
parser.add_argument("--mongo-pass", required=False, "the AMI collection")
default=None,
help="Mongo password")
parser.add_argument("--mongo-port", required=False,
default=27017,
help="Mongo port")
parser.add_argument("--mongo-db", required=False, parser.add_argument("--mongo-db", required=False,
default="test", default="test",
help="Mongo database") help="Mongo database")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment