Esempio n. 1
0
 def test_TD_M2M_NH_24_Update_Subscription(self):
     subscription = sub()
     payload = subscription.to_JSON()
     iotdm_api.update(
         "coap://localhost:5683/ODL-oneM2M-Cse/TestAE/TestContainer/TestSubscription",
         payload,
         origin="CSE3219/C9886",
         requestID="12345")
Esempio n. 2
0
 def test_TD_M2M_NH_22_Create_Subscription(self):
     subscription = sub()
     subscription.set_nu(["http://localhost"])
     subscription.set_rn("TestSubscription")
     payload = subscription.to_JSON()
     iotdm_api.create(
         "coap://localhost:5683/ODL-oneM2M-Cse/TestAE/TestContainer",
         23,
         payload,
         origin="CSE3219/C9886",
         requestID="12345")
Esempio n. 3
0
# AE.set_rn("TestAE1")
# payload = AE.to_JSON()
# iotdm_api.create("http://localhost:8282/ODL-oneM2M-Cse", 2, payload, origin="//www.m2mprovider.com/CSE3219/C9886", requestID="12345")


'''Container Creation'''
# container = cnt()
# container.set_mbs(30)
# container.set_or("http://hey/you")
# container.set_lbl(["key1"])
# container.set_rn("TestContainer")
# payload = container.to_JSON()
# iotdm_api.create("http://localhost:8282/ODL-oneM2M-Cse/TestAE", 3, payload)

'''Content-instance Creation'''
subscription = sub()
subscription.set_nu(["http://localhost"])
subscription.set_rn("TestSubscription")
payload  = subscription.to_JSON()
iotdm_api.create("coap://localhost:5683/ODL-oneM2M-Cse/TestAE/TestContainer", 23, payload)


'''Subscription creation'''
# subscription = sub()
# subscription.set_nu(["10.195.131.12"])
# payload  = subscription.to_JSON()
# iotdm_api.create("coap://127.0.0.1:5683/ODL-oneM2M-Cse/AE/Container", 23, "sub1", payload)


'''Get'''
# iotdm_api.retrieve("http://localhost:8282/ODL-oneM2M-Cse?fu=1")
Esempio n. 4
0
# AE.set_apn("testAppName")
# AE.set_or("http://ontology/ref")
# AE.set_rr(True)
# AE.set_rn("TestAE1")
# payload = AE.to_JSON()
# iotdm_api.create("http://localhost:8282/ODL-oneM2M-Cse", 2, payload, origin="//www.m2mprovider.com/CSE3219/C9886", requestID="12345")
'''Container Creation'''
# container = cnt()
# container.set_mbs(30)
# container.set_or("http://hey/you")
# container.set_lbl(["key1"])
# container.set_rn("TestContainer")
# payload = container.to_JSON()
# iotdm_api.create("http://localhost:8282/ODL-oneM2M-Cse/TestAE", 3, payload)
'''Content-instance Creation'''
subscription = sub()
subscription.set_nu(["http://localhost"])
subscription.set_rn("TestSubscription")
payload = subscription.to_JSON()
iotdm_api.create("coap://localhost:5683/ODL-oneM2M-Cse/TestAE/TestContainer",
                 23, payload)
'''Subscription creation'''
# subscription = sub()
# subscription.set_nu(["10.195.131.12"])
# payload  = subscription.to_JSON()
# iotdm_api.create("coap://127.0.0.1:5683/ODL-oneM2M-Cse/AE/Container", 23, "sub1", payload)
'''Get'''
# iotdm_api.retrieve("http://localhost:8282/ODL-oneM2M-Cse?fu=1")
'''Delete'''
# iotdm_api.delete("http://127.0.0.1:8282/ODL-oneM2M-Cse/AE4")
'''Update'''
Esempio n. 5
0
 def test_TD_M2M_NH_24_Update_Subscription(self):
     subscription = sub()
     payload = subscription.to_JSON()
     iotdm_api.update("coap://localhost:5683/ODL-oneM2M-Cse/TestAE/TestContainer/TestSubscription", payload, origin="CSE3219/C9886", requestID="12345")
Esempio n. 6
0
 def test_TD_M2M_NH_22_Create_Subscription(self):
     subscription = sub()
     subscription.set_nu(["http://localhost"])
     subscription.set_rn("TestSubscription")
     payload = subscription.to_JSON()
     iotdm_api.create("coap://localhost:5683/ODL-oneM2M-Cse/TestAE/TestContainer", 23, payload, origin="CSE3219/C9886", requestID="12345")