def RunOVFImportBuild(args, compute_client, instance_name, source_uri, no_guest_environment, can_ip_forward, deletion_protection, description, labels, machine_type, network, network_tier, subnet, private_network_ip, no_restart_on_failure, os, tags, zone, project, output_filter, compute_release_track):
    'Run a OVF import build on Google Cloud Builder.\n\n  Args:\n    args: an argparse namespace. All the arguments that were provided to this\n      command invocation.\n    compute_client: Google Compute Engine client.\n    instance_name: Name of the instance to be imported.\n    source_uri: A GCS path to OVA or OVF package.\n    no_guest_environment: If set to True, Google Guest Environment won\'t be\n      installed on the boot disk of the VM.\n    can_ip_forward: If set to True, allows the instances to send and receive\n      packets with non-matching destination or source IP addresses.\n    deletion_protection: Enables deletion protection for the instance.\n    description: Specifies a textual description of the instances.\n    labels: List of label KEY=VALUE pairs to add to the instance.\n    machine_type: Specifies the machine type used for the instances.\n    network: Specifies the network that the instances will be part of.\n    network_tier: Specifies the network tier of the interface. NETWORK_TIER must\n      be one of: PREMIUM, STANDARD.\n    subnet: Specifies the subnet that the instances will be part of.\n    private_network_ip: Specifies the RFC1918 IP to assign to the instance.\n    no_restart_on_failure: The instances will NOT be restarted if they are\n      terminated by Compute Engine.\n    os: Specifies the OS of the boot disk being imported.\n    tags: A list of strings for adding tags to the Argo build.\n    zone: The GCP zone to tell Daisy to do work in. If unspecified, defaults to\n      wherever the Argo runner happens to be.\n    project: The Google Cloud Platform project name to use for OVF import.\n    output_filter: A list of strings indicating what lines from the log should\n      be output. Only lines that start with one of the strings in output_filter\n      will be displayed.\n    compute_release_track: release track to be used for Compute API calls. One\n      of - "alpha", "beta" or ""\n\n  Returns:\n    A build object that either streams the output or is displayed as a\n    link to the build.\n\n  Raises:\n    FailedBuildException: If the build is completed and not \'SUCCESS\'.\n  '
    project_id = projects_util.ParseProject(properties.VALUES.core.project.GetOrFail())
    _CheckIamPermissions(project_id)
    two_percent = int((args.timeout * 0.02))
    ovf_import_timeout = (args.timeout - min(two_percent, 300))
    ovf_importer_args = []
    AppendArg(ovf_importer_args, 'instance-names', instance_name)
    AppendArg(ovf_importer_args, 'client-id', 'gcloud')
    AppendArg(ovf_importer_args, 'ovf-gcs-path', source_uri)
    AppendBoolArg(ovf_importer_args, 'no-guest-environment', no_guest_environment)
    AppendBoolArg(ovf_importer_args, 'can-ip-forward', can_ip_forward)
    AppendBoolArg(ovf_importer_args, 'deletion-protection', deletion_protection)
    AppendArg(ovf_importer_args, 'description', description)
    if labels:
        AppendArg(ovf_importer_args, 'labels', ','.join(['{}={}'.format(k, v) for (k, v) in labels.items()]))
    AppendArg(ovf_importer_args, 'machine-type', machine_type)
    AppendArg(ovf_importer_args, 'network', network)
    AppendArg(ovf_importer_args, 'network-tier', network_tier)
    AppendArg(ovf_importer_args, 'subnet', subnet)
    AppendArg(ovf_importer_args, 'private-network-ip', private_network_ip)
    AppendBoolArg(ovf_importer_args, 'no-restart-on-failure', no_restart_on_failure)
    AppendArg(ovf_importer_args, 'os', os)
    if tags:
        AppendArg(ovf_importer_args, 'tags', ','.join(tags))
    AppendArg(ovf_importer_args, 'zone', zone)
    AppendArg(ovf_importer_args, 'timeout', ovf_import_timeout, '-{0}={1}s')
    AppendArg(ovf_importer_args, 'project', project)
    _AppendNodeAffinityLabelArgs(ovf_importer_args, args, compute_client.messages)
    if compute_release_track:
        AppendArg(ovf_importer_args, 'release-track', compute_release_track)
    build_tags = ['gce-ovf-import']
    backoff = (lambda elapsed: (2 if (elapsed < 30) else 15))
    return _RunCloudBuild(args, _OVF_IMPORT_BUILDER.format(args.docker_image_tag), ovf_importer_args, build_tags, output_filter, backoff=backoff)
Run a OVF import build on Google Cloud Builder.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.
  compute_client: Google Compute Engine client.
  instance_name: Name of the instance to be imported.
  source_uri: A GCS path to OVA or OVF package.
  no_guest_environment: If set to True, Google Guest Environment won't be
    installed on the boot disk of the VM.
  can_ip_forward: If set to True, allows the instances to send and receive
    packets with non-matching destination or source IP addresses.
  deletion_protection: Enables deletion protection for the instance.
  description: Specifies a textual description of the instances.
  labels: List of label KEY=VALUE pairs to add to the instance.
  machine_type: Specifies the machine type used for the instances.
  network: Specifies the network that the instances will be part of.
  network_tier: Specifies the network tier of the interface. NETWORK_TIER must
    be one of: PREMIUM, STANDARD.
  subnet: Specifies the subnet that the instances will be part of.
  private_network_ip: Specifies the RFC1918 IP to assign to the instance.
  no_restart_on_failure: The instances will NOT be restarted if they are
    terminated by Compute Engine.
  os: Specifies the OS of the boot disk being imported.
  tags: A list of strings for adding tags to the Argo build.
  zone: The GCP zone to tell Daisy to do work in. If unspecified, defaults to
    wherever the Argo runner happens to be.
  project: The Google Cloud Platform project name to use for OVF import.
  output_filter: A list of strings indicating what lines from the log should
    be output. Only lines that start with one of the strings in output_filter
    will be displayed.
  compute_release_track: release track to be used for Compute API calls. One
    of - "alpha", "beta" or ""

Returns:
  A build object that either streams the output or is displayed as a
  link to the build.

Raises:
  FailedBuildException: If the build is completed and not 'SUCCESS'.
def RunOVFImportBuild(args, compute_client, instance_name, source_uri, no_guest_environment, can_ip_forward, deletion_protection, description, labels, machine_type, network, network_tier, subnet, private_network_ip, no_restart_on_failure, os, tags, zone, project, output_filter, compute_release_track):
    'Run a OVF import build on Google Cloud Builder.\n\n  Args:\n    args: an argparse namespace. All the arguments that were provided to this\n      command invocation.\n    compute_client: Google Compute Engine client.\n    instance_name: Name of the instance to be imported.\n    source_uri: A GCS path to OVA or OVF package.\n    no_guest_environment: If set to True, Google Guest Environment won\'t be\n      installed on the boot disk of the VM.\n    can_ip_forward: If set to True, allows the instances to send and receive\n      packets with non-matching destination or source IP addresses.\n    deletion_protection: Enables deletion protection for the instance.\n    description: Specifies a textual description of the instances.\n    labels: List of label KEY=VALUE pairs to add to the instance.\n    machine_type: Specifies the machine type used for the instances.\n    network: Specifies the network that the instances will be part of.\n    network_tier: Specifies the network tier of the interface. NETWORK_TIER must\n      be one of: PREMIUM, STANDARD.\n    subnet: Specifies the subnet that the instances will be part of.\n    private_network_ip: Specifies the RFC1918 IP to assign to the instance.\n    no_restart_on_failure: The instances will NOT be restarted if they are\n      terminated by Compute Engine.\n    os: Specifies the OS of the boot disk being imported.\n    tags: A list of strings for adding tags to the Argo build.\n    zone: The GCP zone to tell Daisy to do work in. If unspecified, defaults to\n      wherever the Argo runner happens to be.\n    project: The Google Cloud Platform project name to use for OVF import.\n    output_filter: A list of strings indicating what lines from the log should\n      be output. Only lines that start with one of the strings in output_filter\n      will be displayed.\n    compute_release_track: release track to be used for Compute API calls. One\n      of - "alpha", "beta" or \n\n  Returns:\n    A build object that either streams the output or is displayed as a\n    link to the build.\n\n  Raises:\n    FailedBuildException: If the build is completed and not \'SUCCESS\'.\n  '
    project_id = projects_util.ParseProject(properties.VALUES.core.project.GetOrFail())
    _CheckIamPermissions(project_id)
    two_percent = int((args.timeout * 0.02))
    ovf_import_timeout = (args.timeout - min(two_percent, 300))
    ovf_importer_args = []
    AppendArg(ovf_importer_args, 'instance-names', instance_name)
    AppendArg(ovf_importer_args, 'client-id', 'gcloud')
    AppendArg(ovf_importer_args, 'ovf-gcs-path', source_uri)
    AppendBoolArg(ovf_importer_args, 'no-guest-environment', no_guest_environment)
    AppendBoolArg(ovf_importer_args, 'can-ip-forward', can_ip_forward)
    AppendBoolArg(ovf_importer_args, 'deletion-protection', deletion_protection)
    AppendArg(ovf_importer_args, 'description', description)
    if labels:
        AppendArg(ovf_importer_args, 'labels', ','.join(['{}={}'.format(k, v) for (k, v) in labels.items()]))
    AppendArg(ovf_importer_args, 'machine-type', machine_type)
    AppendArg(ovf_importer_args, 'network', network)
    AppendArg(ovf_importer_args, 'network-tier', network_tier)
    AppendArg(ovf_importer_args, 'subnet', subnet)
    AppendArg(ovf_importer_args, 'private-network-ip', private_network_ip)
    AppendBoolArg(ovf_importer_args, 'no-restart-on-failure', no_restart_on_failure)
    AppendArg(ovf_importer_args, 'os', os)
    if tags:
        AppendArg(ovf_importer_args, 'tags', ','.join(tags))
    AppendArg(ovf_importer_args, 'zone', zone)
    AppendArg(ovf_importer_args, 'timeout', ovf_import_timeout, '-{0}={1}s')
    AppendArg(ovf_importer_args, 'project', project)
    _AppendNodeAffinityLabelArgs(ovf_importer_args, args, compute_client.messages)
    if compute_release_track:
        AppendArg(ovf_importer_args, 'release-track', compute_release_track)
    build_tags = ['gce-ovf-import']
    backoff = (lambda elapsed: (2 if (elapsed < 30) else 15))
    return _RunCloudBuild(args, _OVF_IMPORT_BUILDER.format(args.docker_image_tag), ovf_importer_args, build_tags, output_filter, backoff=backoff)