Source code for stacker.providers.base

from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import object

[docs]def not_implemented(method): raise NotImplementedError("Provider does not support '%s' " "method." % method)
[docs]class BaseProviderBuilder(object):
[docs] def build(self, region=None): not_implemented("build")
[docs]class BaseProvider(object):
[docs] def get_stack(self, stack_name, *args, **kwargs): # pylint: disable=unused-argument not_implemented("get_stack")
[docs] def create_stack(self, *args, **kwargs): # pylint: disable=unused-argument not_implemented("create_stack")
[docs] def update_stack(self, *args, **kwargs): # pylint: disable=unused-argument not_implemented("update_stack")
[docs] def destroy_stack(self, *args, **kwargs): # pylint: disable=unused-argument not_implemented("destroy_stack")
[docs] def get_stack_status(self, stack_name, *args, **kwargs): # pylint: disable=unused-argument not_implemented("get_stack_status")
[docs] def get_outputs(self, stack_name, *args, **kwargs): # pylint: disable=unused-argument not_implemented("get_outputs")
[docs] def get_output(self, stack_name, output): # pylint: disable=unused-argument return self.get_outputs(stack_name)[output]
[docs]class Template(object): """A value object that represents a CloudFormation stack template, which could be optionally uploaded to s3. Presence of the url attribute indicates that the template was uploaded to S3, and the uploaded template should be used for CreateStack/UpdateStack calls. """ def __init__(self, url=None, body=None): self.url = url self.body = body