Exemplo n.º 1
0
 def test_TD_M2M_NH_06_Create_AE(self):
     AE = ae()
     AE.set_api("Nk836-t071-fc022")
     AE.set_rr(True)
     AE.set_rn("TestAE")
     payload = AE.to_JSON()
     iotdm_api.create("coap://localhost:5683/ODL-oneM2M-Cse", 2, payload, origin="CSE3219/C9886", requestID="12345")
Exemplo n.º 2
0
 def test_TD_M2M_NH_08_Update_AE(self):
     AE = ae()
     AE.set_acpi(["ODL-oneM2M-Cse/TestAE/TestACP"])
     payload = AE.to_JSON()
     iotdm_api.update("coap://localhost:5683/ODL-oneM2M-Cse/TestAE",
                      payload,
                      origin="admin",
                      requestID="12345")
Exemplo n.º 3
0
 def test_TD_M2M_NH_06_Create_AE(self):
     AE = ae()
     AE.set_api("Nk836-t071-fc022")
     AE.set_rr(True)
     AE.set_rn("TestAE")
     payload = AE.to_JSON()
     iotdm_api.create("coap://localhost:5683/ODL-oneM2M-Cse",
                      2,
                      payload,
                      origin="CSE3219/C9886",
                      requestID="12345")
Exemplo n.º 4
0
from onem2m_xml_protocols.subscription import sub
from onem2m_xml_protocols.remotecse import csr
from onem2m_xml_protocols.acp import acp
from onem2m_xml_protocols.acp import acr
from onem2m_xml_protocols.group import grp
from onem2m_xml_protocols.node import nod
from onem2m_xml_protocols.firmware import fwr

# RestConf calls require admin access
iotdm_api.restConf('http://localhost', 'InCSE1', 'admin', 'admin')

# Clean-up of resource tree
iotdm_api.cleanup('http://localhost', 'admin', 'admin')

# CoAP Creation of an AE named "myAE" under the CSE base "InCSE1".
AE = ae()
AE.set_api("Nk836-t071-fc022")
AE.set_rr(True)
AE.set_rn("myAE")
payload = AE.to_JSON()
iotdm_api.create("coap://localhost:5683/InCSE1",
                 2,
                 payload,
                 origin="AE-ID",
                 requestID="12345")

# Creation of a Container named "mySubContainer" with a maximum number of instances of 5, under "myContainer".
container = cnt()
container.set_rn("mySubContainer")
container.set_mni(5)
payload = container.to_JSON()
Exemplo n.º 5
0
from onem2m_xml_protocols.acp import acp
from onem2m_xml_protocols.acp import acr
from onem2m_xml_protocols.group import grp
from onem2m_xml_protocols.node import nod
from onem2m_xml_protocols.firmware import fwr


# RestConf calls require admin access
iotdm_api.restConf('http://localhost', 'InCSE1', 'admin', 'admin')

# Clean-up of resource tree
iotdm_api.cleanup('http://localhost', 'admin', 'admin')


# CoAP Creation of an AE named "myAE" under the CSE base "InCSE1".
AE = ae()
AE.set_api("Nk836-t071-fc022")
AE.set_rr(True)
AE.set_rn("myAE")
payload = AE.to_JSON()
iotdm_api.create("coap://localhost:5683/InCSE1", 2, payload, origin="AE-ID", requestID="12345")


# Creation of a Container named "mySubContainer" with a maximum number of instances of 5, under "myContainer".
container = cnt()
container.set_rn("mySubContainer")
container.set_mni(5)
payload = container.to_JSON()
iotdm_api.create("http://localhost:8282/InCSE1/myAE/myContainer", 3, payload, origin="AE-ID", requestID="12345")

Exemplo n.º 6
0
 def test_TD_M2M_NH_08_Update_AE(self):
     AE = ae()
     AE.set_acpi(["ODL-oneM2M-Cse/TestAE/TestACP"])
     payload = AE.to_JSON()
     iotdm_api.update("coap://localhost:5683/ODL-oneM2M-Cse/TestAE", payload, origin="admin", requestID="12345")