Skip to content
Snippets Groups Projects
Commit ffba0a7a authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #8888: Changed TaskSpecification parameters from ({"OtdbID":x}) to (OtdbID=x)

parent 23b9f891
No related branches found
No related tags found
No related merge requests found
...@@ -56,31 +56,31 @@ if __name__ == "__main__": ...@@ -56,31 +56,31 @@ if __name__ == "__main__":
with RPC("StatusUpdateCmd", ForwardExceptions=True, busname=busname, timeout=5) as status_update_command: with RPC("StatusUpdateCmd", ForwardExceptions=True, busname=busname, timeout=5) as status_update_command:
# PIC # PIC
(data, status) = status_update_command(OtdbID=1099269, NewStatus='finished', UpdateTimestamps=True}) (data, status) = status_update_command(OtdbID=1099269, NewStatus='finished', UpdateTimestamps=True)
print status, data print status, data
# Template # Template
(data, status) = status_update_command(OtdbID=1099238, NewStatus='finished', UpdateTimestamps-True}) (data, status) = status_update_command(OtdbID=1099238, NewStatus='finished', UpdateTimestamps=True)
print status, data print status, data
# VIC # VIC
(data, status) = status_update_command(OtdbID=1099266, NewStatus='finished', UpdateTimestamps=True}) (data, status) = status_update_command(OtdbID=1099266, NewStatus='finished', UpdateTimestamps=True)
print status, data print status, data
# Nonexisting tree # Nonexisting tree
try: try:
(data, status) = status_update_command(OtdbID=10, NewStatus='finished', UpdateTimestamps=True}) (data, status) = status_update_command(OtdbID=10, NewStatus='finished', UpdateTimestamps=True)
except RPCException as e: except RPCException as e:
print "Caught expected exception on invalid treeID in status update" print "Caught expected exception on invalid treeID in status update"
# VIC tree: invalid status # VIC tree: invalid status
try: try:
(data, status) = status_update_command(OtdbID=1099266, NewStatus='what_happend', UpdateTimestamps=True}) (data, status) = status_update_command(OtdbID=1099266, NewStatus='what_happend', UpdateTimestamps=True)
except RPCException as e: except RPCException as e:
print "Caught expected exception on invalid status in status update" print "Caught expected exception on invalid status in status update"
with RPC("KeyUpdateCmd", ForwardExceptions=True, busname=busname, timeout=5) as key_update: with RPC("KeyUpdateCmd", ForwardExceptions=True, busname=busname, timeout=5) as key_update:
# VIC tree: valid # VIC tree: valid
(data, status) = key_update(OtdbID:1099266, (data, status) = key_update(OtdbID=1099266,
Updates={'LOFAR.ObsSW.Observation.ObservationControl.PythonControl.pythonHost':'NameOfTestHost'}) Updates={'LOFAR.ObsSW.Observation.ObservationControl.PythonControl.pythonHost':'NameOfTestHost'})
print status, data print status, data
...@@ -106,7 +106,7 @@ if __name__ == "__main__": ...@@ -106,7 +106,7 @@ if __name__ == "__main__":
# VIC tree: wrong key # VIC tree: wrong key
try: try:
(data, status) = key_update({OtdbID=1099266, (data, status) = key_update(OtdbID=1099266,
Updates={'LOFAR.ObsSW.Observation.ObservationControl.PythonControl.NoSuchKey':'NameOfTestHost'}) Updates={'LOFAR.ObsSW.Observation.ObservationControl.PythonControl.NoSuchKey':'NameOfTestHost'})
except RPCException as e: except RPCException as e:
print "Caught expected exception on invalid key in key update" print "Caught expected exception on invalid key in key update"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment