Esempio n. 1
0
 def __init__(self, package_loader, context_manager, session=None):
     self._package_loader = package_loader
     self._context_manager = context_manager
     self._session = session
     self._attribute_store = attribute_store.AttributeStore()
     self._object_store = object_store.ObjectStore(self)
     self._locks = {}
     self._root_context_cache = {}
Esempio n. 2
0
 def setUp(self):
     super(TestAttributeStore, self).setUp()
     self.attribute_store = attribute_store.AttributeStore()
     self.fake_object = mock.MagicMock(object_id=mock.sentinel.oid)
     self.tagged_obj = dsl.MuranoObjectInterface(self.fake_object)
     self.owner_type = dsl_types.MuranoTypeReference(self.fake_object)
     self.owner_type.type.name = mock.sentinel.typename
     self.name = 'foobar'
Esempio n. 3
0
 def __init__(self, package_loader, context_manager, environment=None):
     self._package_loader = package_loader
     self._context_manager = context_manager
     self._environment = environment
     self._attribute_store = attribute_store.AttributeStore()
     self._object_store = object_store.ObjectStore(self)
     self._locks = {}
     self._root_context_cache = {}
Esempio n. 4
0
 def __init__(self, class_loader, environment=None):
     self._class_loader = class_loader
     self._object_store = object_store.ObjectStore(class_loader)
     self._attribute_store = attribute_store.AttributeStore()
     self._root_context = class_loader.create_root_context()
     self._root_context.set_data(self, '?executor')
     self._root_context.set_data(self._class_loader, '?classLoader')
     self._root_context.set_data(environment, '?environment')
     self._root_context.set_data(self._object_store, '?objectStore')
     self._root_context.set_data(self._attribute_store, '?attributeStore')
     self._locks = {}
     yaql_functions.register(self._root_context)
     self._root_context = yaql.context.Context(self._root_context)