Пример #1
0
 def create_password(self, object_id):
     # Work-around the race condition where the app is created but passwords cannot
     # be created yet.
     count = 0
     wait = 5
     timeout_seconds = 60
     while True:
         time.sleep(wait)
         count += 1
         password = add_application_password(object_id)
         if password:
             return password
         if count > timeout_seconds/wait:
             raise Exception("creating password failed, trying again")
Пример #2
0
 def create_password(self, object_id: UUID) -> Tuple[str, str]:
     return add_application_password(object_id, self.get_subscription_id())
Пример #3
0
 def create_password(self, object_id: UUID) -> Tuple[str, str]:
     return add_application_password(object_id)