summaryrefslogtreecommitdiff
path: root/pycadf/reporterstep.py
diff options
context:
space:
mode:
authorGordon Chung <chungg@ca.ibm.com>2013-10-16 13:50:06 -0400
committerGordon Chung <chungg@ca.ibm.com>2013-10-17 14:17:21 -0400
commitd280b091320ab27a7de1325f1dc895016bb1c7a1 (patch)
tree28d3700a5c476af8f13c65b2bb17a0da503b78aa /pycadf/reporterstep.py
parent1f2ec374ea27a6ce4db4009b0a36097286908cef (diff)
downloadpycadf-d280b091320ab27a7de1325f1dc895016bb1c7a1.tar.gz
observer and reporter should be valid Resource
- fix observer and reporter attributes to be valid Resource type - add check that Resource id shortform for initiator and target do not reference themselves Fixes: Bug # 1240067 Change-Id: Iab5b6c129d512039073cc8c2ab7b75ac7c819624
Diffstat (limited to 'pycadf/reporterstep.py')
-rw-r--r--pycadf/reporterstep.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/pycadf/reporterstep.py b/pycadf/reporterstep.py
index 1f620b8..94c7d75 100644
--- a/pycadf/reporterstep.py
+++ b/pycadf/reporterstep.py
@@ -42,9 +42,7 @@ class Reporterstep(cadftype.CADFAbstractType):
lambda x: cadftype.is_valid_reporter_role(x))
reporter = cadftype.ValidatorDescriptor(
REPORTERSTEP_KEYNAME_REPORTER,
- (lambda x: isinstance(x, resource.Resource) or
- (isinstance(x, basestring) and
- (x == 'initiator' or x == 'target'))))
+ (lambda x: isinstance(x, resource.Resource) and x.is_valid()))
reporterId = cadftype.ValidatorDescriptor(
REPORTERSTEP_KEYNAME_REPORTERID, lambda x: identifier.is_valid(x))
reporterTime = cadftype.ValidatorDescriptor(