deb-murano/murano/dsl/principal_objects
Stan Lagun 0a835b87f0 Refactoring of the ObjectStore passing in DSL
ObjectStore is a container for all of the objects that are either
loaded from object model or created at runtime. Thus ObjectStore
instance is required in order to either use new() function or use
class() contract with object model snippet.

In current implementation each object had a object_store property
that was pointing to the ObjectStore instance used to create it (the
one that has the object). In order to create new object an ObjectStore
of the $this object was used for that purpose. This approach caused
several issues:
* There is no $this object in static methods and thus no way to obtain
   current ObjectStore
* Objects are bind to their stores so temporary ObjectStore instances
  cannot be used to load object graphs

 This refactoring moves ObjectStore instances to the thread-local attribute.
 Thus there is always a "current" ObjectStore.

 Also because ObjectStore has a reference to the MuranoDslExecutor instance
 it becomes possible to get current executor and everything else that it contains
 (current execution session, attribute store, package loader) from the local
 thread storage without passing it in the hidden context variables.

Change-Id: I19a08b391486c1ae1b98ca559c8d3fafaca6e1ef
2016-07-27 02:32:18 +00:00
..
__init__.py Package versioning 2015-09-03 12:06:42 +00:00
exception.py Migration to yaql 1.0 2015-08-25 16:08:08 +03:00
stack_trace.py Refactoring of the ObjectStore passing in DSL 2016-07-27 02:32:18 +00:00
sys_object.py Refactoring of the ObjectStore passing in DSL 2016-07-27 02:32:18 +00:00