Thanks for answering my question reguarding CREATE and DELETE. In all of my use cases it makes since that I CREATE the resource at the start of the service and don’t DELETE the resource because it represents a physical resource that is not going away.
This still leaves me wondering if there is an example that shows a reasonable use case for CREATE and DELETE. Even if we don’t have a reasonable use case for CREATE and DELETE, do we have any sample code that shows how to handle the creating and deleting resources? Thanks George Nash From: iotivity-dev-boun...@lists.iotivity.org [mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of Gregg Reynolds Sent: Wednesday, February 28, 2018 4:54 PM To: Macieira, Thiago <thiago.macie...@intel.com> Cc: iotivity-dev <iotivity-dev@lists.iotivity.org> Subject: Re: [dev] Regarding resource creation On Wed, Feb 28, 2018 at 4:09 PM, Thiago Macieira <thiago.macie...@intel.com<mailto:thiago.macie...@intel.com>> wrote: On Wednesday, 28 February 2018 12:19:48 PST Nash, George wrote: > So far in all of the services that I have developed I have always created > the resource as soon as the service is started. > > However, CRUDN is CREATE, READ, UPDATE, DELETE, NOTIFY. > > I CREATE the resource at service start as part of the initialization code. > Should I wait for a client action before creating a resource? > > What about DELETE? I don't think any of my services can delete resources. That's normal, for both situations. Some services will have create/delete interaction, most will not. You're going to see them usually only on non-physical services, like creating a group of devices, a scene, an ACL, etc. Is it possible to CREATE an ACL? Or more generally, an SVR? You can UPDATE /oic/sec/acl2, but CREATE is a 'nother story. The only use case I can see for CREATE (for applications) is "virtual" application-level stuff, like a "room" containing a bunch of sensors, etc. Or a "floor" containing rooms. I suppose theoretically you could CREATE a resource that manipulates SVR stuff indirectly (bypassing the OCF securiity mechanisms). What else does it make sense to CREATE? If you have a physical or fixed service, then it already exists and cannot be deleted (short of transferring ownership to another user) Cannot be CREATEd, ok, but why can I not DELETE whatever I please? g
_______________________________________________ iotivity-dev mailing list iotivity-dev@lists.iotivity.org https://lists.iotivity.org/mailman/listinfo/iotivity-dev