def Run(self, args):
    self._ValidateArgs(args)
    holder = base_classes.ComputeApiHolder(self.ReleaseTrack())
    container_mount_disk = instances_flags.GetValidatedContainerMountDisk(holder, args.container_mount_disk, args.disk, args.create_disk)
    client = holder.client
    source_instance_template = instance_utils.GetSourceInstanceTemplate(args, holder.resources, self.SOURCE_INSTANCE_TEMPLATE)
    skip_defaults = instance_utils.GetSkipDefaults(source_instance_template)
    scheduling = instance_utils.GetScheduling(args, client, skip_defaults)
    service_accounts = instance_utils.GetServiceAccounts(args, client, skip_defaults)
    user_metadata = instance_utils.GetValidatedMetadata(args, client)
    boot_disk_size_gb = instance_utils.GetBootDiskSizeGb(args)
    instance_refs = instance_utils.GetInstanceRefs(args, client, holder)
    network_interfaces = self.GetNetworkInterfaces(args, holder.resources, client, holder, instance_refs, skip_defaults)
    machine_type_uris = instance_utils.GetMachineTypeUris(args, client, holder, instance_refs, skip_defaults)
    image_uri = self.GetImageUri(args, client, holder, instance_refs)
    labels = containers_utils.GetLabelsMessageWithCosVersion(args.labels, image_uri, holder.resources, client.messages.Instance)
    can_ip_forward = instance_utils.GetCanIpForward(args, skip_defaults)
    tags = containers_utils.CreateTagsMessage(client.messages, args.tags)
    requests = []
    for (instance_ref, machine_type_uri) in zip(instance_refs, machine_type_uris):
        metadata = containers_utils.CreateKonletMetadataMessage(client.messages, args, instance_ref.Name(), user_metadata, container_mount_disk_enabled=True, container_mount_disk=container_mount_disk)
        disks = instance_utils.CreateDiskMessages(holder, args, boot_disk_size_gb, image_uri, instance_ref, skip_defaults, match_container_mount_disks=True)
        request = client.messages.ComputeInstancesInsertRequest(instance=client.messages.Instance(canIpForward=can_ip_forward, disks=disks, description=args.description, labels=labels, machineType=machine_type_uri, metadata=metadata, minCpuPlatform=args.min_cpu_platform, name=instance_ref.Name(), networkInterfaces=network_interfaces, serviceAccounts=service_accounts, scheduling=scheduling, tags=tags), sourceInstanceTemplate=source_instance_template, project=instance_ref.project, zone=instance_ref.zone)
        requests.append((client.apitools_client.instances, 'Insert', request))
    return client.MakeRequests(requests)
def Run(self, args):
    self._ValidateArgs(args)
    holder = base_classes.ComputeApiHolder(self.ReleaseTrack())
    container_mount_disk = instances_flags.GetValidatedContainerMountDisk(holder, args.container_mount_disk, args.disk, args.create_disk)
    client = holder.client
    source_instance_template = instance_utils.GetSourceInstanceTemplate(args, holder.resources, self.SOURCE_INSTANCE_TEMPLATE)
    skip_defaults = instance_utils.GetSkipDefaults(source_instance_template)
    scheduling = instance_utils.GetScheduling(args, client, skip_defaults)
    service_accounts = instance_utils.GetServiceAccounts(args, client, skip_defaults)
    user_metadata = instance_utils.GetValidatedMetadata(args, client)
    boot_disk_size_gb = instance_utils.GetBootDiskSizeGb(args)
    instance_refs = instance_utils.GetInstanceRefs(args, client, holder)
    network_interfaces = self.GetNetworkInterfaces(args, holder.resources, client, holder, instance_refs, skip_defaults)
    machine_type_uris = instance_utils.GetMachineTypeUris(args, client, holder, instance_refs, skip_defaults)
    image_uri = self.GetImageUri(args, client, holder, instance_refs)
    labels = containers_utils.GetLabelsMessageWithCosVersion(args.labels, image_uri, holder.resources, client.messages.Instance)
    can_ip_forward = instance_utils.GetCanIpForward(args, skip_defaults)
    tags = containers_utils.CreateTagsMessage(client.messages, args.tags)
    requests = []
    for (instance_ref, machine_type_uri) in zip(instance_refs, machine_type_uris):
        metadata = containers_utils.CreateKonletMetadataMessage(client.messages, args, instance_ref.Name(), user_metadata, container_mount_disk_enabled=True, container_mount_disk=container_mount_disk)
        disks = instance_utils.CreateDiskMessages(holder, args, boot_disk_size_gb, image_uri, instance_ref, skip_defaults, match_container_mount_disks=True)
        request = client.messages.ComputeInstancesInsertRequest(instance=client.messages.Instance(canIpForward=can_ip_forward, disks=disks, description=args.description, labels=labels, machineType=machine_type_uri, metadata=metadata, minCpuPlatform=args.min_cpu_platform, name=instance_ref.Name(), networkInterfaces=network_interfaces, serviceAccounts=service_accounts, scheduling=scheduling, tags=tags), sourceInstanceTemplate=source_instance_template, project=instance_ref.project, zone=instance_ref.zone)
        requests.append((client.apitools_client.instances, 'Insert', request))
    return client.MakeRequests(requests)