def main():
    wsOpts = WSOpts()
    parser = wsOpts.get_common_opts()
    parser.add_option("--filepath",dest="filepath",help="path of file to map")
    (options, args) = parser.parse_args()
    wsOpts.setLogging(options.debug)

    if wsOpts.checkRequiredMissing(options, ('stream','filepath')):
        parser.print_help()
        sys.exit(-1)

    if not options.stream or not options.filepath:
        optionParser.error("Must specify both stream and filepath")

    configServiceClient = ConfigServiceClient(options)
    print configServiceClient.fileToComponent(options.filepath, options.stream)
def main():
    wsOpts = WSOpts()
    parser = wsOpts.get_common_opts()
    parser.add_option("--filepath",
                      dest="filepath",
                      help="path of file to map")
    (options, args) = parser.parse_args()
    wsOpts.setLogging(options.debug)

    if wsOpts.checkRequiredMissing(options, ('stream', 'filepath')):
        parser.print_help()
        sys.exit(-1)

    if not options.stream or not options.filepath:
        optionParser.error("Must specify both stream and filepath")

    configServiceClient = ConfigServiceClient(options)
    print configServiceClient.fileToComponent(options.filepath, options.stream)