def main()

in marketplace/deployer_util/print_config.py [0:0]


def main():
  parser = ArgumentParser(description=_PROG_HELP)
  schema_values_common.add_to_argument_parser(parser)
  parser.add_argument(
      '--output',
      '-o',
      help=_OUTPUT_HELP,
      choices=[OUTPUT_SHELL_VARS, OUTPUT_YAML],
      default=OUTPUT_YAML)
  parser.add_argument(
      '--xtype',
      help='If specified, outputs the values of the given x-google-marketplace'
      ' property.')
  parser.add_argument(
      '--key', help='If specified, outputs the keys, rather than the values')
  args = parser.parse_args()

  schema = schema_values_common.load_schema(args)
  values = schema_values_common.load_values(args)

  try:
    if args.xtype:
      sys.stdout.write(output_xtype(values, schema, args.xtype, args.key))
      return

    if args.output == OUTPUT_SHELL_VARS:
      sys.stdout.write(output_shell_vars(values))
    elif args.output == OUTPUT_YAML:
      sys.stdout.write(output_yaml(values))
  finally:
    sys.stdout.flush()