resort.engine¶
Package containing engine classes.
-
class
resort.engine.ProfileManager(base_dir, work_dir, profiles)¶ Bases:
objectManager for profiles located in a directory.
Parameters: -
load(prof_name)¶ Load the profile with the given name.
Parameters: prof_name (str) – Profile name. Return type: ProfileStub Returns: An stub to loaded profile.
-
-
class
resort.engine.ProfileStub(base_dir, prof_name, prof, prof_dir)¶ Bases:
objectStub of a
Profilewith aComponentStubRegistry.Parameters: -
context()¶ Create an exectution context.
Return type: execution.Context Returns: The created execution context.
-
prepare(props)¶ Prepare stubbed profile and return its properties.
Parameters: props (dict) – Dictionary with previous properties. Return type: dict Returns: Properties dictionary.
-
component_list()¶ List of
ComponentStubinstances for this profile.Return type: list
-
component(comp_name)¶ Component with the specified name.
Parameters: comp_name (str) – Specified component name. Return type: ComponentStub Returns: The component stub with the specified name.
-
-
class
resort.engine.ComponentStub(comp_stub_reg, comp_name, prof)¶ Bases:
objectStub of a
Component.Parameters: - comp_stub_reg (ComponentStubRegistry) – Component stub registry.
- comp_name (str) – Component name.
- prof (Profile) – Owner profile.
-
dependencies()¶ Yield
ComponentStubof dependencies of this component.
-
insert(context, plan)¶ Include an insert operation to the given plan.
Parameters: - context (execution.Context) – Current execution context.
- plan (list) – List of
execution.Operationinstances.
-
delete(context, plan)¶ Include a delete operation to the given plan.
Parameters: - context (execution.Context) – Current execution context.
- plan (list) – List of
execution.Operationinstances.
-
class
resort.engine.ComponentStubRegistry(prof)¶ Bases:
objectRegistry of
ComponentStub.Parameters: prof (Profile) – Involved profile. -
get(comp_name)¶ Get the specified component.
Parameters: comp_name (str) – Specified component name. Return type: ComponentStub Returns: Specified component stub.
-