|
|
@ -34,7 +34,7 @@ class Emulator(object): |
|
|
|
self.stdin = stdin |
|
|
|
self.stdin = stdin |
|
|
|
self.env = env |
|
|
|
self.env = env |
|
|
|
|
|
|
|
|
|
|
|
self.object_id = False |
|
|
|
self.object_id = '' |
|
|
|
|
|
|
|
|
|
|
|
self.global_path = self.env['__global'] |
|
|
|
self.global_path = self.env['__global'] |
|
|
|
self.target_host = self.env['__target_host'] |
|
|
|
self.target_host = self.env['__target_host'] |
|
|
@ -54,10 +54,10 @@ class Emulator(object): |
|
|
|
"""Add hostname and object to logs via logging Filter""" |
|
|
|
"""Add hostname and object to logs via logging Filter""" |
|
|
|
|
|
|
|
|
|
|
|
prefix = self.target_host + ": (emulator)" |
|
|
|
prefix = self.target_host + ": (emulator)" |
|
|
|
|
|
|
|
prefix = '{0}: emulator {1}'.format( |
|
|
|
if self.object_id: |
|
|
|
self.target_host, |
|
|
|
prefix = prefix + " " + self.type_name + "/" + self.object_id |
|
|
|
core.CdistObject.join_name(self.type_name, self.object_id) |
|
|
|
|
|
|
|
) |
|
|
|
record.msg = prefix + ": " + record.msg |
|
|
|
record.msg = prefix + ": " + record.msg |
|
|
|
|
|
|
|
|
|
|
|
return True |
|
|
|
return True |
|
|
@ -122,9 +122,7 @@ class Emulator(object): |
|
|
|
|
|
|
|
|
|
|
|
def setup_object(self): |
|
|
|
def setup_object(self): |
|
|
|
# Setup object_id - FIXME: unset / do not setup anymore! |
|
|
|
# Setup object_id - FIXME: unset / do not setup anymore! |
|
|
|
if self.cdist_type.is_singleton: |
|
|
|
if not self.cdist_type.is_singleton: |
|
|
|
self.object_id = "singleton" |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
self.object_id = self.args.object_id[0] |
|
|
|
self.object_id = self.args.object_id[0] |
|
|
|
del self.args.object_id |
|
|
|
del self.args.object_id |
|
|
|
|
|
|
|
|
|
|
|