Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 3
0
  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
Exemplo n.º 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)
Exemplo n.º 5
0
    def Run(self, args):
        client = endpoints.EndpointsClient(self.GetReleaseTrack())
        endpoint_ref = args.CONCEPTS.endpoint.Parse()

        return client.Describe(endpoint_ref)
Exemplo n.º 6
0
  def Run(self, args):
    client = endpoints.EndpointsClient()
    endpoint_ref = args.CONCEPTS.endpoint.Parse()

    return client.Describe(endpoint_ref)
Exemplo n.º 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)