Advertisement
Guest User

Untitled

a guest
Mar 9th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. from grpc.beta import implementations
  2.  
  3. import pwservice_pb2
  4.  
  5.  
  6. TIMEOUT_SECONDS = 10
  7.  
  8.  
  9. def run():
  10. channel = implementations.insecure_channel('localhost', 50051)
  11. stub = pwservice_pb2.beta_create_PasswordService_stub(channel)
  12. response = stub.ChangePassword(pwservice_pb2.ChangePasswordRequest(
  13. user='testuser', old_password='helloworld', new_password='newworld'),
  14. TIMEOUT_SECONDS)
  15. print "Password change response: ", response
  16.  
  17.  
  18. if __name__ == '__main__':
  19. run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement