use the great method object_from_name() in emulator
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
2492d51f6f
commit
dcd3bcee32
1 changed files with 1 additions and 9 deletions
|
@ -154,15 +154,7 @@ class Emulator(object):
|
||||||
if len(requirement) == 0:
|
if len(requirement) == 0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
requirement_type_name, requirement_object_id = core.CdistObject.split_name(requirement)
|
self.cdist_object.object_from_name(requirement)
|
||||||
# Instantiate type which fails if type does not exist
|
|
||||||
requirement_type = core.CdistType(self.type_base_path,
|
|
||||||
requirement_type_name)
|
|
||||||
|
|
||||||
# Instantiate object, which fails if object id is broken
|
|
||||||
requirement_object = core.CdistObject(requirement_type,
|
|
||||||
self.object_base_path, requirement_object_id)
|
|
||||||
|
|
||||||
self.log.debug("Recording requirement: " + requirement)
|
self.log.debug("Recording requirement: " + requirement)
|
||||||
self.cdist_object.requirements.append(requirement)
|
self.cdist_object.requirements.append(requirement)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue