Ejemplo n.º 1
0
 def __setitem__(self, key, resource):
     '''Set the resource with the specified name to a specific value.'''
     template = resource.stack.t
     resource.stack = self
     resource.t = template.resource_definitions(self)[key]
     resource.reparse()
     self.resources[key] = resource
Ejemplo n.º 2
0
 def __setitem__(self, key, resource):
     '''Set the resource with the specified name to a specific value.'''
     template = resource.stack.t
     resource.stack = self
     resource.t = template.resource_definitions(self)[key]
     resource.reparse()
     self.resources[key] = resource
Ejemplo n.º 3
0
 def add_resource(self, resource):
     '''Insert the given resource into the stack.'''
     template = resource.stack.t
     resource.stack = self
     definition = resource.t.reparse(self, template)
     resource.t = definition
     resource.reparse()
     self.resources[resource.name] = resource
     self.t.add_resource(definition)
     if self.t.id is not None:
         self.t.store(self.context)
Ejemplo n.º 4
0
 def add_resource(self, resource):
     '''Insert the given resource into the stack.'''
     template = resource.stack.t
     resource.stack = self
     definition = resource.t.reparse(self, template)
     resource.t = definition
     resource.reparse()
     self.resources[resource.name] = resource
     self.t.add_resource(definition)
     if self.t.id is not None:
         self.t.store(self.context)
Ejemplo n.º 5
0
 def __setitem__(self, key, resource):
     '''Set the resource with the specified name to a specific value.'''
     resource.stack = self
     resource.reparse()
     self.resources[key] = resource
Ejemplo n.º 6
0
 def __setitem__(self, key, resource):
     '''Set the resource with the specified name to a specific value.'''
     resource.stack = self
     resource.reparse()
     self.resources[key] = resource