示例#1
0
def main_impl():
    args = utils.parse_args(REQUIRED_CONFIG_KEYS)
    config = args.config

    client = MongoClient(config['uri'])
    client.ReadPreference = ReadPreference.SECONDARY

    if args.discover:
        do_discover(client)
    elif args.properties:
        state = args.state or {}
        do_sync(client, args.properties, state)
    else:
        LOGGER.info("No properties were selected")