Changeset 54ac968 in nscp for scripts/python
- Timestamp:
- 08/10/11 15:05:59 (22 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- afd42f1
- Parents:
- 04ef932
- File:
-
- 1 edited
-
scripts/python/test.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scripts/python/test.py
r04ef932 r54ac968 3 3 core = Core.get() 4 4 5 prefix = 'py_' 5 6 def test(arguments): 6 7 log('inside test') 7 8 for a in arguments: 8 9 log('Got argument: %s'%a) 9 (retcode, msg, perf) = core.simple_query(" normal", [])10 (retcode, msg, perf) = core.simple_query("%snormal"%prefix, []) 10 11 if msg != "ok got: ": 11 12 return (status.CRITICAL, "Test failed") 12 (retcode, msg, perf) = core.simple_query(" normal", ["hello"])13 (retcode, msg, perf) = core.simple_query("%snormal"%prefix, ["hello"]) 13 14 if msg != "ok got: hello": 14 15 return (status.CRITICAL, "Test failed") 15 (retcode, msg, perf) = core.simple_query(" normal", ["hello", "world"])16 (retcode, msg, perf) = core.simple_query("%snormal"%prefix, ["hello", "world"]) 16 17 if perf != "'args'=2": 17 18 return (status.CRITICAL, "Test failed: -%s-"%perf) … … 44 45 45 46 def init(alias): 46 prefix = 'py_'47 47 if alias: 48 48 prefix = '%s_'%alias
Note: See TracChangeset
for help on using the changeset viewer.








