Being aligned with the core is a plus. One would have to document which method (action or protocol) would have precedence, in cases where needed.

Gary Mazz wrote:
Hi,

This is an interesting more interesting approach.. that opens up a larger new world for OCCI.

My motivation for bringing CRUD into the JSON spec was trying to avoid creating more specifications.  I felt that adding the higher order life-cycle verbs as a proposal to the JSON was a good way to vet ideas and if accepted, gain the advantage of compact form. I also believe this has ramifications to other projections, text, HTTP anything else down the line.   

In my view, the higher order life-cycle verbs (CRUD) should be treated no differently than other life-cycle verbs associated with Mixins and Kinds.  Until now, we have not had the opportunity to include higher order life-cycle verbs (associated with Categories) in any OCCI works.  

There is an impression that CRUD is only applicable to protocols. I don't agree with that assertion. CRUD may be implemented across different medias. Naturally, the semantic may require some adjustment supporting media characteristics. 

OCCI already supports Actions for resources inherited from Category, Kind and Mixin. The Actions are mutable, extensible and replaceable at the provider's discretion. The same is true for life-cycle states.

Using that precedence, I placed the higher order life-cycle verbs (CRUD) in the OCCI Action type.  Before I wrote the brief proposal, I reviewed the OCCI Core specification and the OCCI Infrastructure specification. Neither of these documents suggest or infer limiting the scope of Actions  to any specific verbs, life-cycle models, Mixins or Kinds.

The OCCI HTTP specification shows examples of verbs as part of the resource name space. ie rel="http://schemas.ogf.org/occi/infrastructure/compute/action#start"
However, there is no requirement that any verb must be part of a resource name space. The Action name space is only required to be associated with a Category, Kind or Mixin.

I would like to continue this discussion, but change venue.

Lets try to discuss the aspects of  higher order life-cycle verbs in terms of an extension to the OCCI Infrastructure specification. If accepted it will have implications, similar to the ones identified in the CRUD JSON proposal, to OCCI JSON,  OCCI HTTP and any future OCCI render specifications. It may pave the way for an opportunity to create a "JSON document" specification for OCCI.

cheers,
gary


On 5/3/2012 7:53 AM, Andy Edmonds wrote:
I'd also agree with Florian and Jamie.

The idea is interesting, however I would not propose that it go into the JSON spec as I feel that a dedicated spec on using OCCI with message-based protocol (e.g. AMQP) could be authored. That spec would be somewhat like the HTTP rendering spec only for, say, AMQP, where you can use the meta-data section to supply information like http headers or indeed the type of HTTP-like operation (CRUD). The URI of the resource could then just be a specific message exchange.

Andy
andy.edmonds.be


On Thu, May 3, 2012 at 3:13 PM, Jamie Marshall <ijm667@hotmail.com> wrote:
Hello All,

I agree with you Florian, CRUD is really just another set of words for the same things as REST which is the same thing as HTTP 1.1 anyway.
The verbs were put in place way back so we can use them as is. ( in my honest opinion )

Sincerely
Jamie



From: florian.feldhaus@gwdg.de
To: garymazzaferro@gmail.com
Date: Thu, 3 May 2012 12:10:24 +0000
CC: occi-wg@ogf.org
Subject: Re: [occi-wg] JSON Rendering Proposal to add CRUD Verb


Hi Gary,


 
that's an interesting idea, but from my point of view it may be a bit over the top. CRUD really is such a basic thing, that I don't think we need a dedicated action for it. I usually see the actions as being some kind of methods for the OCCI entities. Then create would be the initialize method and delete the destroy method. Both don't have to be implemented, because they are already implemented in some base class. Read and update are just getters and setters for the attributes and usually don't need to be implemented separately.


 
Cheers,
Florian
 
Am 03.05.2012 um 09:43 schrieb Gary Mazz:
 
> Hi,
> 
> I have a proposal for an addition to the OCCI JSON specification. This proposal is not limited to the JSON specification and may also impact the OCCI Core specification. 


> 
> The JSON specification has nearly fully decoupled OCCI information from the HTTP protocol.  OCCI information represented in JSON is a complete object (frame) serialization.  
> 
> To use the JSON as a declarative document (script)  or take advantage of agnostic transports (i.e. a messaging bus or workflow system) , we need a way to define CRUD operations in the JSON. 


> 
> The OCCI scheme has actions associated with category.  The CRUD actions are inherited by Kind and Mixin, which means inherited by Entity.
> 
> 
> I propose we associate CRUD with category actions. 


> 
> The ABNF is represented below:
> 
>   DeclarativeJSON = CRUD ; OCCI
>   CRUD = CREATE / RETRIEVE / UPDATE / DELETE 
> The definitions:
> 
> scheme  : http://schemas.ogf.org/occi/core/category/action


> term    : CREATE
> mutable : true
> required: false
> type    : string
> 
> scheme  : http://schemas.ogf.org/occi/core/category/action


> term    : RETRIEVE
> mutable : true
> required: false
> type    : string
> 
> scheme  : http://schemas.ogf.org/occi/core/category/action


> term    : UPDATE
> mutable : true
> required: false
> type    : string
> 
> scheme  : http://schemas.ogf.org/occi/core/category/action


> term    : DELETE
> mutable : true
> required: false
> type    : string
> 
> We would have three (3) presentations:  
> 1) The JSON "actions" encapsulating Resources, 


> 2) Resources showing inherited CRUD in JSON "actions" 
> 3) In classes' JSON "actions"
> Examples Below:
> 1) The JSON "actions" encapsulating Resources:
> {


>   "actions": [
>         "title": "CRUD Create Operation",
>         "rel": "http://schemas.ogf.org/occi/core/category/action#CREATE"


>         "resources":[.......]
>         ],
>         [
>         "title": "CRUD Delete Operation",
>         "rel": "http://schemas.ogf.org/occi/core/category/action#DELETE"


>         "resources":[.......]
>         ]
> }
> 
> 2) Resources showing inherited CRUD in JSON "actions":
> {
> "links": [
>      {
>          "title": "My disk",


>          "target": "http://myservice.tld/storage/456",
>          "rel": [ "http://schemas.ogf.org/occi/infrastructure#storage" ],


>          "kind": "http://schemas.ogf.org/occi/infrastructure#storagelink"
>           "attributes": { "occi.storagelink.deviceid": "ide:0:1" },


>           "actions": [
>                 "title": "CRUD Create Operation",
>                 "rel": "http://schemas.ogf.org/occi/core/category/action#CREATE"


>             ]
>      }
>  ]
> }
> 
> 3) In Classes' JSON "actions":
> {
>     "kinds": [
>     {
>         "term": "compute",155 "scheme": "http://schemas.ogf.org/occi/infrastructure#",


>         "title": "Compute Resource",
>         "related": [
>             "http://schemas.ogf.org/occi/core#resource"


>         ],
>         "attributes": {
>             "occi": {
>                 "compute": {
>                     "hostname": {
>                         "mutable": true,


>                         "required": false,
>                         "type": "string",
>                         "pattern": "(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*"


>                     },
>                     "state": {
>                         "mutable": false,
>                         "required": false,
>                         "type": "string",


>                         "pattern": "inactive|active|suspended|failed",
>                         "default": "inactive"
>                     },
>                     ...


>                 }
>             }
>         },
>         "actions": [
>             "http://schemas.ogf.org/occi/core/category/action#CREATE",


>             "http://schemas.ogf.org/occi/core/category/action#RETRIEVE",
>             "http://schemas.ogf.org/occi/core/category/action#UPDATE",


>             "http://schemas.ogf.org/occi/core/category/action#DELETE",
>             "http://schemas.ogf.org/occi/infrastructure/compute/action#start",


>             "http://schemas.ogf.org/occi/infrastructure/compute/action#stop",
>             "http://schemas.ogf.org/occi/infrastructure/compute/action#restart",


>             "http://schemas.ogf.org/occi/infrastructure/compute/action#suspend"
>         ],
>         "location": "/compute/"


>     },
>     ...
> ],
> "mixins": [
>     {
>         "term": "medium",
>         "scheme": "http://example.com/templates/resource#",


>         "title": "Medium VM",
>         "related": [
>             "http://schemas.ogf.org/occi/infrastructure#resource_tpl",


>             "http://schemas.ogf.org/occi/infrastructure#compute"
>         ],
>         "attributes": {


>             "occi": {
>                 "compute": {
>                     "speed": {
>                         "type": "number",
>                         "default": 2.8


>                     }
>                 }
>             }
>         },
>         "actions": [
>             "http://schemas.ogf.org/occi/core/category/action#CREATE",


>             "http://schemas.ogf.org/occi/core/category/action#RETRIEVE",
>             "http://schemas.ogf.org/occi/core/category/action#UPDATE",


>             "http://schemas.ogf.org/occi/core/category/action#DELETE",
>         ],
>     },
>     ...


> ],
> "actions": [
>     {
>         "term": "stop",
>         "scheme": "http://schemas.ogf.org/occi/infrastructure/compute/action#",


>         "title": "Stop Compute instance",
>         "attributes": {
>             "method": {
>                 "mutable": true,
>                 "required": false,


>                 "type": "string",
>                 "pattern": "graceful|acpioff|poweroff",
>                 "default": "poweroff"
>             }


>         }
>    },
>    {
>        "term": "CREATE",
>        "scheme": "http://schemas.ogf.org/occi/core/category/action#",


>        "title": "CREATE Compute instance",
>        "attributes": {
>            "method": {
>               "mutable": false,
>                "required": false,


>                "type": "string",
>            }
>        }
>    },
>    {
>        "term": "RETRIEVE",
>        "scheme": "http://schemas.ogf.org/occi/core/category/action#",


>        "title": "RETRIEVE Compute instance",
>        "attributes": {
>            "method": {
>               "mutable": false,
>                "required": false,


>                "type": "string",
>            }
>        }
>    },
>    {
>        "term": "UPDATE",
>        "scheme": "http://schemas.ogf.org/occi/core/category/action#",


>        "title": "RETRIEVE Compute instance",
>        "attributes": {
>            "method": {
>               "mutable": false,
>                "required": false,


>                "type": "string",
>            }
>        }
>    },
>    {
>        "term": "DELETE",
>        "scheme": "http://schemas.ogf.org/occi/core/category/action#",


>        "title": "DELETE Compute instance",
>        "attributes": {
>            "method": {
>               "mutable": false,
>                "required": false,


>                "type": "string",
>            }
>        }
>    },
>    ...
>    ]
> }
> 
> 
> -gary
> 
> _______________________________________________


> occi-wg mailing list
> occi-wg@ogf.org
> https://www.ogf.org/mailman/listinfo/occi-wg


 

_______________________________________________ occi-wg mailing list occi-wg@ogf.org https://www.ogf.org/mailman/listinfo/occi-wg

_______________________________________________
occi-wg mailing list
occi-wg@ogf.org
https://www.ogf.org/mailman/listinfo/occi-wg





_______________________________________________
occi-wg mailing list
occi-wg@ogf.org
https://www.ogf.org/mailman/listinfo/occi-wg