Skip to content

Unable to create a registration resource #163

@Vulcainreo

Description

@Vulcainreo

Hello,
I expected an issue during creation of a registration resource.

This example code doesn't working (method not allowed):

print "Create a registration resource"
path = "rd?ep=node1&con=coap://local-proxy-old.example.com:5683&et=oic.d.sensor"
ct = {'content_type': defines.Content_types["application/link-format"]}
payload = '</sensors/temp>;ct=41;rt="temperature-c";if="sensor";anchor="coap://spurious.example.com:5683",' \
              '</sensors/light>;ct=41;rt="light-lux";if="sensor"'
response = client.post(path, payload, None, None, **ct)
location_path = response.location_path
print response.pretty_print()

About running instance :
python coapserver.py is started
python resourcedirectoryserver.py is also started
mongodb is also accessible by changing the coapthon/define.py file (remote host without password)

During execution of the code, I expected this error:

Create a registration resource
Source: ('127.0.0.1', 5683)
Destination: None
Type: ACK
MID: 50745
Code: METHOD_NOT_ALLOWED
Token: NM
Payload: 
None

Can you help me, I think I miss something during the coapserver + ressource directory launch ?
Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions