コード例 #1
0
    def Run(self, args):
        client = endpoints.EndpointsClient()
        endpoint_ref = args.CONCEPTS.endpoint.Parse()
        metadata = util.ParseMetadataArg(args.metadata, _RESOURCE_TYPE)
        log.CreatedResource(endpoint_ref.endpointsId, _RESOURCE_TYPE)

        return client.Create(endpoint_ref, args.address, args.port, metadata)
コード例 #2
0
    def Run(self, args):
        client = endpoints.EndpointsClient(self.GetReleaseTrack())
        endpoint_ref = args.CONCEPTS.endpoint.Parse()

        result = client.Delete(endpoint_ref)
        log.DeletedResource(endpoint_ref.endpointsId, _RESOURCE_TYPE)

        return result
コード例 #3
0
ファイル: update.py プロジェクト: PrateekKhatri/gcloud_cli
  def Run(self, args):
    client = endpoints.EndpointsClient()
    endpoint_ref = args.CONCEPTS.endpoint.Parse()
    annotations = util.ParseAnnotationsArg(args.annotations, _RESOURCE_TYPE)

    result = client.Update(endpoint_ref, args.address, args.port, annotations)
    log.UpdatedResource(endpoint_ref.endpointsId, _RESOURCE_TYPE)

    return result
コード例 #4
0
    def Run(self, args):
        client = endpoints.EndpointsClient()
        service_ref = args.CONCEPTS.service.Parse()
        order_by = common_args.ParseSortByArg(args.sort_by)

        return client.List(service_ref, args.filter, order_by, args.page_size)
コード例 #5
0
    def Run(self, args):
        client = endpoints.EndpointsClient(self.GetReleaseTrack())
        endpoint_ref = args.CONCEPTS.endpoint.Parse()

        return client.Describe(endpoint_ref)
コード例 #6
0
  def Run(self, args):
    client = endpoints.EndpointsClient()
    endpoint_ref = args.CONCEPTS.endpoint.Parse()

    return client.Describe(endpoint_ref)
コード例 #7
0
    def Run(self, args):
        client = endpoints.EndpointsClient()
        endpoint_ref = args.CONCEPTS.endpoint.Parse()
        log.DeletedResource(endpoint_ref.endpointsId, _RESOURCE_TYPE)

        return client.Delete(endpoint_ref)