예제 #1
0
    def Run(self, args):
        """Issues requests necessary to update Container."""
        holder = base_classes.ComputeApiHolder(self.ReleaseTrack())
        client = holder.client

        instance_ref = instances_flags.INSTANCE_ARG.ResolveAsResource(
            args,
            holder.resources,
            scope_lister=instances_flags.GetInstanceZoneScopeLister(client))

        instance = client.apitools_client.instances.Get(
            client.messages.ComputeInstancesGetRequest(
                **instance_ref.AsDict()))

        container_mount_disk = instances_flags.GetValidatedContainerMountDisk(
            holder,
            args.container_mount_disk,
            instance.disks, [],
            for_update=True,
            client=client.apitools_client)

        containers_utils.UpdateInstance(
            holder,
            client,
            instance_ref,
            instance,
            args,
            container_mount_disk_enabled=True,
            container_mount_disk=container_mount_disk)
예제 #2
0
  def Run(self, args):
    """Issues requests necessary to update Container."""
    holder = base_classes.ComputeApiHolder(self.ReleaseTrack())
    client = holder.client

    instance_ref = instances_flags.INSTANCE_ARG.ResolveAsResource(
        args,
        holder.resources,
        scope_lister=instances_flags.GetInstanceZoneScopeLister(client))

    instance = client.apitools_client.instances.Get(
        client.messages.ComputeInstancesGetRequest(**instance_ref.AsDict()))

    containers_utils.UpdateInstance(holder, client, instance_ref, instance,
                                    args)