1. SingletonMeta -> modified to allow handling multiple classes and moved to metaclasses too.
2. @logwrap : process asserts too
Changes reason:
@logwrap was changed during test debug (was assert in wrapped function
and stacktrace was not enough for reason understand) and moved out of
test changest due to not mandatory for this test.
Pros: Now assert, raised in wrapped function is recorded in log with
details.
SingletonMeta: was changed as "nice to have" during work on plugin
helpers. Later plugin helpers was moved out of SshManager, and all code
changes was moved to this changeset.
Pros: Single way for handling the same tasks in different places.
Previously SshManager used Metaclass, which could not be reused for
more, than one class and Environment used __new__ directly written
in class code.
Reviewed: https:/ /review. openstack. org/267508 /git.openstack. org/cgit/ openstack/ fuel-qa/ commit/ ?id=fec8282ec44 2571e251e509bc3 c3677dba6b7a5e
Committed: https:/
Submitter: Jenkins
Branch: master
commit fec8282ec442571 e251e509bc3c367 7dba6b7a5e
Author: Alexey Stepanov <email address hidden>
Date: Tue Jan 12 15:57:48 2016 +0300
Minor refactor
1. SingletonMeta -> modified to allow handling multiple classes and moved to metaclasses too.
2. @logwrap : process asserts too
Changes reason:
@logwrap was changed during test debug (was assert in wrapped function
and stacktrace was not enough for reason understand) and moved out of
test changest due to not mandatory for this test.
Pros: Now assert, raised in wrapped function is recorded in log with
details.
SingletonMeta: was changed as "nice to have" during work on plugin
helpers. Later plugin helpers was moved out of SshManager, and all code
changes was moved to this changeset.
Pros: Single way for handling the same tasks in different places.
Previously SshManager used Metaclass, which could not be reused for
more, than one class and Environment used __new__ directly written
in class code.
Related-Bug: #1518979
Related-Bug: #1519050
Change-Id: I79830287940074 7909229cc208f97 a669f25bbf3