-
Notifications
You must be signed in to change notification settings - Fork 166
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 #63 from remind101/simplify_action_execute
Simplify steps in plan/build action
- Loading branch information
Showing
7 changed files
with
171 additions
and
196 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
from .. import exceptions | ||
def not_implemented(method): | ||
raise NotImplementedError("Provider does not support '%s' " | ||
"method." % method) | ||
|
||
|
||
class BaseProvider(object): | ||
|
||
name = None | ||
|
||
def __init__(self, *args, **kwargs): | ||
if not self.name: | ||
raise exceptions.ImproperlyConfigured('Provider must have a ' | ||
'"name"') | ||
|
||
def _not_implemented_erorr(self, method): | ||
raise NotImplementedError('Provider "%s" does not support "%s"' % ( | ||
self.name, method)) | ||
|
||
def get_stack(self, stack_name, *args, **kwargs): | ||
self._not_implemented_erorr('get_stack') | ||
not_implemented("get_stack") | ||
|
||
def create_stack(self, *args, **kwargs): | ||
self._not_implemented_erorr('create_stack') | ||
not_implemented("create_stack") | ||
|
||
def update_stack(self, *args, **kwargs): | ||
self._not_implemented_erorr('update_stack') | ||
not_implemented("update_stack") | ||
|
||
def destroy_stack(self, *args, **kwargs): | ||
self._not_implemented_erorr('destroy_stack') | ||
not_implemented("destroy_stack") | ||
|
||
def get_stack_status(self, stack_name, *args, **kwargs): | ||
self._not_implemented_erorr('get_stack_status') | ||
not_implemented("get_stack_status") | ||
|
||
def get_outputs(self, stack_name, *args, **kwargs): | ||
not_implemented("get_outputs") | ||
|
||
def get_output(self, stack_name, output): | ||
return self.get_outputs(stack_name)[output] |
Oops, something went wrong.