Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds support for optional dependencies using Keystone dependency injection. A new decorator for classes is provided. @dependency.optional('optional_api_1', 'optional_api_2') If there's a provider for the dependency, the attribute will be set to the provider instance, otherwise the attribute will be set to None. This can be used in combination with required dependencies. Related-bug: #1223524 Change-Id: I2b987f10a7bc85efab136ae9e84606e666494246
- Loading branch information
Brant Knudson
committed
Sep 16, 2013
1 parent
607b115
commit 5e04343
Showing
2 changed files
with
118 additions
and
11 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