forked from gnuoy/snap-openstack
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disconnect pylibjuju model connectors
pylibjuju model connections throw JujuRedirectExceptions when the default controller is changed. The errors did not stop further bootstrap procedure but they will be printed on the console. To avoid these printouts, gracefully close the connections. This should be done before bootstrapping a new controller which changes the default controller. pylibjuju provides 2 types of connections. One for the controller and second one at the model level. controller.get_model() creates a new connection. Access to any model entities like Application, Unit will be handled by the connection at the model level. Maintain a list of model connectors when new connections are opened and a disconnect method to disconnect the populated list of model connections. Additionally disconnect the controller connection in disconnect method. This is not an issue if the connections are opened with same default controller through out the process lifetime.
- Loading branch information
1 parent
a75fdb5
commit e99b0bd
Showing
4 changed files
with
41 additions
and
22 deletions.
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
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