def initialize_api(args):
  """
  Initializes the global API instance using the given arguments.
  @param args: arguments provided to the script.
  """
  global api
  api = ApiResource(server_host=args.hostname, server_port=args.port,
                    username=args.username, password=args.password,
                    version=args.api_version, use_tls=args.use_tls)