def add_user(self, user="******"): user_to_add = endpoints_pb2.User(username=user, age=23) metadata = addMetadata() from jwt_token import service_account metadata.append(('authorization', 'Bearer ' + service_account('k8s'))) response = self.stub.addUser(user_to_add, metadata=metadata) return response
def delete_user(self, user="******"): user_to_delete = endpoints_pb2.User(username=user) metadata = addMetadata() response = self.stub.deleteUser(user_to_delete, metadata=metadata) return response
def get_user(self, user="******"): user_to_get = endpoints_pb2.User(username=user) metadata = addMetadata() response = self.stub.getUser(user_to_get, metadata=metadata) return response
def add_user(self, user="******"): user_to_add = endpoints_pb2.User(username=user, age=23) response = self.stub.addUser(user_to_add, metadata=addMetadata()) return response