-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #573 from cderici/reliable-unit-public-address
#573 ### Description Assigning a unit's public address may take a little time, which makes the result of `unit.public_address` depend on when it's called, thereby creating inconsistency. This PR adds a method, namely `get_public_address`, that waits (with a timeout) until the unit is assigned an address and returns the address when it's assigned. Fixes #551 Jira card [#141](https://warthogs.atlassian.net/browse/JUJU-141) ### QA Steps ```sh tox -e integration -- tests/integration/test_unit.py::test_unit_public_address ``` ### Notes & Discussion **A minor design decision:** is that in the case of a timeout, `get_public_address` returns a `None`, rather than a `TimeoutError`.
- Loading branch information
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters