begin rename Object => CdistObject
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
15fb097464
commit
4be37f6e93
9 changed files with 37 additions and 39 deletions
|
|
@ -126,7 +126,7 @@ class Emulator(object):
|
|||
self.object_id = self.object_id.lstrip('/')
|
||||
|
||||
# Instantiate the cdist object we are defining
|
||||
self.cdist_object = core.Object(self.cdist_type, self.object_base_path, self.object_id)
|
||||
self.cdist_object = core.CdistObject(self.cdist_type, self.object_base_path, self.object_id)
|
||||
|
||||
# Create object with given parameters
|
||||
self.parameters = {}
|
||||
|
|
@ -154,13 +154,13 @@ class Emulator(object):
|
|||
if len(requirement) == 0:
|
||||
continue
|
||||
|
||||
requirement_type_name, requirement_object_id = core.Object.split_name(requirement)
|
||||
requirement_type_name, requirement_object_id = core.CdistObject.split_name(requirement)
|
||||
# Instantiate type which fails if type does not exist
|
||||
requirement_type = core.Type(self.type_base_path, requirement_type_name)
|
||||
|
||||
if requirement_object_id:
|
||||
# Validate object_id if any
|
||||
core.Object.validate_object_id(requirement_object_id)
|
||||
core.CdistObject.validate_object_id(requirement_object_id)
|
||||
elif not requirement_type.is_singleton:
|
||||
# Only singeltons have no object_id
|
||||
raise IllegalRequirementError(requirement, "Missing object_id and type is not a singleton.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue