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")
def create_password(self, object_id: UUID) -> Tuple[str, str]: return add_application_password(object_id, self.get_subscription_id())
def create_password(self, object_id: UUID) -> Tuple[str, str]: return add_application_password(object_id)