Пример #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 = services.ServicesClient()
        service_ref = args.CONCEPTS.service.Parse()
        metadata = util.ParseMetadataArg(args.metadata, _RESOURCE_TYPE)
        log.CreatedResource(service_ref.servicesId, _RESOURCE_TYPE)

        return client.Create(service_ref, metadata)