Resource & OS templates retrieving

Hi, My name is John Giannelos and I am currently working on an OCCI implementation. After reading the OCCI specifications, I have a question regarding the Resource and OS templates. After registering each Resource and OS template available, as a mixin related to the categories "resource_tpl" and "os_tpl", how can we retrieve them? The specification says that every OCCI implementation must support a filtering mechanism, which filters the provided categories of the query. But every resource and os template is registered as a category itself, thus cannot be retrieved using this filtering mechanism. I would appreciate some help. Thanks in advance, John

Hi John, All Kinds and Mixins must be made available through the servers "query interface". The HTTP Rendering document has details on how this is accomplished over HTTP. Please have a look at [1] for an example. A new os-template Mixin would end up here. [1] http://www.nyren.net/api/-/ regards, Ralf On Mon, 7 May 2012 12:53:53 +0300, John Giannelos <johngiannelos@gmail.com> wrote:
Hi,
My name is John Giannelos and I am currently working on an OCCI implementation. After reading the OCCI specifications, I have a question regarding the Resource and OS templates.
After registering each Resource and OS template available, as a mixin related to the categories "resource_tpl" and "os_tpl", how can we retrieve them? The specification says that every OCCI implementation must support a filtering mechanism, which filters the provided categories of the query. But every resource and os template is registered as a category itself, thus cannot be retrieved using this filtering mechanism.
I would appreciate some help.
Thanks in advance, John

I know that every Kind and Mixin would be available through the query interface, but how can we retrieve ONLY the mixins related to "os_tpl" or "resource_tpl"?

So you *should* be able to to issue a HTTP request like this:
GET /-/ HTTP/1.1 User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5 Host: 10.211.55.85:8787 Accept: */* Category: os_tpl; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="mixin"
Right now (using pyssf), the result of this request is that all categories are returned. So either I've a poor formulation, or I've a bug to go hunting for. Andy andy.edmonds.be On Mon, May 7, 2012 at 12:42 PM, John Giannelos <johngiannelos@gmail.com>wrote:
I know that every Kind and Mixin would be available through the query interface, but how can we retrieve ONLY the mixins related to "os_tpl" or "resource_tpl"?
_______________________________________________ occi-wg mailing list occi-wg@ogf.org https://www.ogf.org/mailman/listinfo/occi-wg

Ok - my bad. Bad formulation, I forgot the content type & accept.
GET /-/ HTTP/1.1 User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5 Host: 10.211.55.85:8787 X-Auth-User: admin Category: os_tpl; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="mixin" Content-Type: text/occi Accept: text/occi
< HTTP/1.1 200 OK *< Category: os_tpl; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="mixin"; location="http://10.211.55.85:8787/os_tpl/"* < Content-Length: 2 < Content-Type: text/occi < Server: pyssf OCCI/1.1 < Date: Mon, 07 May 2012 11:25:27 GMT < OK Now the only unclear (by the spec) is whether or not instances of this category (e.g. cirros-0.3.0-x86_64-uec) should be returned also (in my mind this would make sense). Andy andy.edmonds.be On Mon, May 7, 2012 at 1:22 PM, Andy Edmonds <andy@edmonds.be> wrote:
So you *should* be able to to issue a HTTP request like this:
GET /-/ HTTP/1.1 User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5 Host: 10.211.55.85:8787 Accept: */* Category: os_tpl; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="mixin"
Right now (using pyssf), the result of this request is that all categories are returned. So either I've a poor formulation, or I've a bug to go hunting for.
Andy andy.edmonds.be
On Mon, May 7, 2012 at 12:42 PM, John Giannelos <johngiannelos@gmail.com>wrote:
I know that every Kind and Mixin would be available through the query interface, but how can we retrieve ONLY the mixins related to "os_tpl" or "resource_tpl"?
_______________________________________________ occi-wg mailing list occi-wg@ogf.org https://www.ogf.org/mailman/listinfo/occi-wg

Thanks for the answers. Our OCCI implementation is still under development. You can find information about it in our documentation page [1] and the source code in our repository [2]. John [1] http://docs.dev.grnet.gr/snf-occi/latest/index.html [2] https://code.grnet.gr/projects/snf-occi

Hi John, that's great news! Do you intend to make your OCCI implementation open source? If so, is there a repository where we can check out your code? Regarding your question: All categories can be queried through the discovery interface by using GET /-/ Unfortunately, the OCCI HTTP Rendering specification is not very clear on the filtering: "If one or multiple Categories are provided in the request the server MUST only return the complete rendering of the requested Kinds or Mixins." If you interpret custom resource or OS templates as being derived from the resource or OS template category, then you can interpret the specification as follows: "If one or multiple Categories are provided in the request the server MUST only return the complete rendering of the requested Kinds, Mixins or Kinds and Mixins related to them." As we are currently in the process of revising the OCCI HTTP Rendering specification it would be a good idea to incorporate the above in it! Cheers, Florian Am 07.05.2012 um 11:53 schrieb John Giannelos:
Hi,
My name is John Giannelos and I am currently working on an OCCI implementation. After reading the OCCI specifications, I have a question regarding the Resource and OS templates.
After registering each Resource and OS template available, as a mixin related to the categories "resource_tpl" and "os_tpl", how can we retrieve them? The specification says that every OCCI implementation must support a filtering mechanism, which filters the provided categories of the query. But every resource and os template is registered as a category itself, thus cannot be retrieved using this filtering mechanism.
I would appreciate some help.
Thanks in advance, John
_______________________________________________ occi-wg mailing list occi-wg@ogf.org https://www.ogf.org/mailman/listinfo/occi-wg

If you interpret custom resource or OS templates as being derived from
On Mon, 7 May 2012 11:00:43 +0000, "Feldhaus, Florian" <florian.feldhaus@gwdg.de> wrote: the
resource or OS template category, then you can interpret the specification as follows: "If one or multiple Categories are provided in the request the server MUST only return the complete rendering of the requested Kinds, Mixins or Kinds and Mixins related to them."
The spec is indeed unclear on this but your interpretation above makes a lot more sense to me at least. Please note though that a Kind can only be related to other Kinds and a Mixin to other Mixins.
As we are currently in the process of revising the OCCI HTTP Rendering specification it would be a good idea to incorporate the above in it!
+1 regards, Ralf
Cheers, Florian
Am 07.05.2012 um 11:53 schrieb John Giannelos:
Hi,
My name is John Giannelos and I am currently working on an OCCI implementation. After reading the OCCI specifications, I have a question regarding the Resource and OS templates.
After registering each Resource and OS template available, as a mixin related to the categories "resource_tpl" and "os_tpl", how can we retrieve them? The specification says that every OCCI implementation must support a filtering mechanism, which filters the provided categories of the
query.
But every resource and os template is registered as a category itself, thus cannot be retrieved using this filtering mechanism.
I would appreciate some help.
Thanks in advance, John
_______________________________________________ occi-wg mailing list occi-wg@ogf.org https://www.ogf.org/mailman/listinfo/occi-wg
participants (4)
-
Andy Edmonds
-
Feldhaus, Florian
-
John Giannelos
-
Ralf Nyren