Esempio n. 1
0
class Context(object):
    '''Aggregates objects that provide a context for performing Lumberyard resource management operations.'''
    def __init__(self, metricsInterface, view_class=ViewContext):
        self.metrics = metricsInterface
        self.view = view_class(self)
        self.aws = AWSContext(self)
        self.stack = StackContext(self)
        self.config = ConfigContext(self)
        self.gem = GemContext(self)
        self.resource_groups = ResourceGroupContext(self)
        self.hooks = HookContext(self)

    def bootstrap(self, args):
        self.view.bootstrap(args)
        self.config.bootstrap(args)
        self.resource_groups.bootstrap(args)

    def initialize(self, args):
        self.view.initialize(args)
        self.aws.initialize(args)
        self.stack.initialize(args)
        self.config.initialize(args)
        self.resource_groups.initialize(args)

    def __str__(self):
        return '[ config: {config} ]'.format(config=self.config)
Esempio n. 2
0
 def __init__(self, metricsInterface, view_class=ViewContext):
     self.metrics = metricsInterface
     self.view = view_class(self)
     self.aws = AWSContext(self)
     self.stack = StackContext(self)
     self.config = ConfigContext(self)
     self.gem = GemContext(self)
     self.resource_groups = ResourceGroupContext(self)
     self.hooks = HookContext(self)
Esempio n. 3
0
 def __init__(self, metricsInterface, view_class=ViewContext):
     self.metrics = metricsInterface
     self.view = view_class(self)
     self.aws = AWSContext(self)
     self.stack = StackContext(self)
     self.config = ConfigContext(self)
     self.gem = GemContext(self)
     self.resource_group_controller = ResourceGroupController(self)
     self.resource_groups = self.resource_group_controller.resource_groups
     self.hooks = HookContext(self)
     self.resource_types = ResourceTypeContext(self)
     self.stack_info = StackInfoManagerContext(self)