|
11 | 11 | #title = "test11" |
12 | 12 | #desc = "testing" |
13 | 13 | #tags = ["test1", "test2"] |
14 | | - #private = "false" |
| 14 | + #private = "true" |
15 | 15 | #res1 = test.device_add(title = title, desc = desc, tags = tags, private = private) |
16 | 16 | #print res1.content |
17 | 17 |
|
18 | 18 | # 更新设备 |
19 | | - #device_id = ******* |
| 19 | + #device_id = ********** |
20 | 20 | #title = "test_abs" |
21 | 21 | #private = 'true' |
22 | 22 | #res2 = test.device_update(device_id = device_id, title = title, private = private) |
23 | 23 | #print res2.content |
24 | 24 |
|
25 | 25 | # 查询设备 |
26 | | - #device_id = ******* |
| 26 | + #device_id = ********** |
27 | 27 | #res3 = test.device_info(device_id = device_id) |
28 | 28 | #print res3.content |
29 | 29 |
|
30 | 30 | # 删除设备 |
31 | | - device_id = ******* |
32 | | - res4 = test.device_del(device_id = device_id) |
| 31 | + #device_id = ********* |
| 32 | + #res4 = test.device_del(device_id = device_id) |
| 33 | + #print res4.content |
| 34 | + |
| 35 | + # 添加数据流 |
| 36 | + #device_id = ******** |
| 37 | + #res1 = test.datastream_add(device_id = device_id, datastream_id = 'test1') |
| 38 | + #print res1.content |
| 39 | + |
| 40 | + # 更新数据流 |
| 41 | + #device_id = ********* |
| 42 | + #res2 = test.datastream_update(device_id = device_id, datastream_id = 'test1',datastream = {"tags":["test1","test2"], "unit":"Celsius"}) |
| 43 | + #print res2.content |
| 44 | + |
| 45 | + # 删除数据流 |
| 46 | + #device_id = ********* |
| 47 | + #res3 = test.datastream_del(device_id = device_id, datastream_id = 'test1') |
| 48 | + #print res3.content |
| 49 | + |
| 50 | + # 增加触发器 |
| 51 | + #device_id = ******* |
| 52 | + #trigger = {"ds_id": "test1", "url": "http://xx.bb.com", "type":">=", "threshold":100} |
| 53 | + #res1 = test.trigger_add(trigger = trigger) |
| 54 | + #print res1.content |
| 55 | + |
| 56 | + # 更新触发器 |
| 57 | + #trigger_id = ****** |
| 58 | + #trigger = {"ds_id":"test1","title":"wen du jian kong", "url":"http://cc.bb.com", "type":"<", "threshold":60} |
| 59 | + #res2 = test.trigger_update(trigger_id = trigger_id, trigger = trigger) |
| 60 | + #print res2.content |
| 61 | + |
| 62 | + # 删除触发器 |
| 63 | + |
| 64 | + # 查看触发器 |
| 65 | + title = "wen du jian kong" |
| 66 | + page = 1 |
| 67 | + per_page = 10 |
| 68 | + res4 = test.trigger_list(title = title, page = page, per_page = 10) |
33 | 69 | print res4.content |
34 | 70 |
|
35 | 71 | # 添加数据 |
|
0 commit comments