def Run(self, args): """Runs the describe command.""" with endpoint_util.GkemulticloudEndpointOverride( resource_args.ParseOperationResourceArg(args).locationsId, self.ReleaseTrack()): op_client = op_api_util.OperationsClient() op_ref = resource_args.ParseOperationResourceArg(args) return op_client.Get(op_ref)
def Run(self, args): """Runs the wait command.""" with endpoint_util.GkemulticloudEndpointOverride( resource_args.ParseOperationResourceArg(args).locationsId, self.ReleaseTrack()): op_client = op_api_util.OperationsClient() op_ref = resource_args.ParseOperationResourceArg(args) op_client.Wait( op_ref, 'Waiting for operation {} to complete'.format( op_ref.RelativeName())) return op_client.Get(op_ref)
def Run(self, args): """Runs the describe command.""" release_track = self.ReleaseTrack() location_ref = args.CONCEPTS.location.Parse() with endpoint_util.GkemulticloudEndpointOverride( location_ref.locationsId, release_track): op_client = op_api_util.OperationsClient() return op_client.List(location_ref, args.page_size, args.limit, parent_field='name')
def _LogAndWaitForOperation(op, async_, message): op_ref = _GetOperationResource(op) log.CreatedResource(op_ref, kind=constants.LRO_KIND) if not async_: op_client = op_api_util.OperationsClient() op_client.Wait(op_ref, message)