def extract_server_options(server, parsed_args): if isinstance(server, MongodServer): return extract_mongo_exe_options(parsed_args, SUPPORTED_MONGOD_OPTIONS) elif isinstance(server, MongosServer): return extract_mongo_exe_options(parsed_args, SUPPORTED_MONGOS_OPTIONS)
def extract_mongo_restore_options(parsed_args): return extract_mongo_exe_options(parsed_args, SUPPORTED_MONGO_RESTORE_OPTIONS)
def extract_mongo_shell_options(parsed_args): return extract_mongo_exe_options(parsed_args, SUPPORTED_MONGO_SHELL_OPTIONS)
def extract_mongo_dump_options(parsed_args): return extract_mongo_exe_options(parsed_args, SUPPORTED_MONGO_DUMP_OPTIONS)