Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to define an OCCI extension? #63

Open
TrinhLK opened this issue May 19, 2020 · 1 comment
Open

How to define an OCCI extension? #63

TrinhLK opened this issue May 19, 2020 · 1 comment

Comments

@TrinhLK
Copy link

TrinhLK commented May 19, 2020

As mentioned in the usertextocci.md, we can define a new tags named "my_stuff" as below
curl -v -X PUT -H 'Category: my_stuff; scheme="http://example.com/occi/my_stuff#"; class="mixin"; location="/my_stuff/"' http://localhost:8080/-/
I tried to define a new tag named "mlamp" (for LAMP case study, and there are several resources of mlamp such as tomcat, apache, etc.) as follows:
curl -v -X PUT -H 'Category: mlamp; scheme="http://occiware.org/mlamp#"; class="kind"; location="/mlamp/"' http://localhost:8080/-/
However, the result is:
< HTTP/1.1 400 Bad Request < Date: Tue, 19 May 2020 17:05:57 GMT < Server: OCCIWare MART Server v1.0 OCCI/1.2 < Accept: text/occi;application/json;application/occi+json;text/plain;text/occi+plain < Content-Type: application/json < Content-Length: 65 < { "message" : "you cannot use interface query on PUT method" }
Could you explain it please?

@philippemerle
Copy link
Member

Replace class="kind" by class="mixin":
curl -v -X PUT -H 'Category: mlamp; scheme="http://occiware.org/mlamp#"; class="**mixin**"; location="/mlamp/"' http://localhost:8080/-/
The OCCI HTTP API only allows to create user mixins, i.e. mixins with no attributes.
To create mixins with attributes or kinds, you should develop an OCCI extension with the OCCIware Studio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants