Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Container: example(s) for long-running operations #3

@DazWilkin

Description

@DazWilkin

Please provide (reference) an example for converting container_v1.types.Operation into api_core.operation.Operation.

create_cluster (and other methods in the Cloud Client Library) return (long-running) Operation(s).

I assumed (hoped) this would be google.api_core.operation.Operation that I could operation.result() but, the method turns google.cloud.container_v1.types.Operation

[Spanner's Python Library, for example, returns google.api_core.operation.Operation in this case]

I'm struggling to connect this with (presumably?) Long-Running Operations documented in Core.

I'm unable to new an OperationsClient. The Example suggests operations_v1.OperationsClient() but this errors with TypeError: __init__() takes at least 2 arguments (1 given).

It's unclear what channel (grpc.Channel) I should provide.

Is this the correct approach? Having triggered the cluster creation, I'd like to track its progress to completion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: containerIssues related to the googleapis/python-container API.priority: p3Desirable enhancement or fix. May not be included in next release.type: docsImprovement to the documentation for an API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions