tmetsch / occi-os

This is a clone and continuation of https://github.com/dizz/nova - it provides a python egg which can be easily deployed in OpenStack and will thereby add the 3rd party OCCI interface to OpenStack. For usage examples, see the OpenStack wiki.
Apache License 2.0
10 stars 23 forks source link

Alloc_floating_ip not working in master #65

Closed renebrandel closed 10 years ago

renebrandel commented 11 years ago

The action to allocate a floating ip is somehow not provisioned anymore and even if you associate a floating ip through Openstack directly, you can't see it listed in details of a vm.

tmetsch commented 11 years ago

Hi - floating ips are now realized through creating links to the public networking interface. You can see the details on the link now.

bhagemeier commented 10 years ago

Hi Thijs,

I didn't manage to follow these instructions. Is there any more detail documented anywhere? When browsing resources, links are given like this:

Link: </network/public>; rel="http://schemas.ogf.org/occi/infrastructure#network"; self="/network/interface/f4a16faa-6c96-4932-94f8-cc8a2175aec4"; category="http://schemas.ogf.org/occi/infrastructure#networkinterface http://schemas.ogf.org/occi/infrastructure/networkinterface#ipnetworkinterface"; occi.networkinterface.gateway="0.0.0.0"; occi.networkinterface.mac="aa:bb:cc:dd:ee:ff"; occi.networkinterface.interface="eth0"; occi.networkinterface.state="active"; occi.networkinterface.allocation="static"; occi.networkinterface.address="134.94.32.159"; occi.core.source="/compute/e2960e13-9d30-47aa-a01c-9e169213bdeb"; occi.core.target="/network/public"; occi.core.id="/network/interface/f4a16faa-6c96-4932-94f8-cc8a2175aec4"

Do I need to give all attributes? I've been trying to do it analogous to storage links, but failed.

Cheers, Björn

tmetsch commented 10 years ago

Hi,

What is the request and error message you are getting when creating the link?

Cheers,

-Thijs

bhagemeier commented 10 years ago

curl -X POST -H 'x-auth-token: *****' https://egi-cloud.zam.kfa-juelich.de:8787/network/interface/ -H 'Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"' -H 'x-occi-attribute: occi.core.source="/compute/b9cce1e6-1aec-472b-bfe7-15547cd46316"' -H 'x-occi-attribute: occi.core.target="/network/public"'

Could not find a valid kind.

tmetsch commented 10 years ago

can you add a -v parameter to the curl request and post all here? Might be a minor issue :-)

tmetsch commented 10 years ago

oh and try to add -H 'Content-Type: text/occi'

bhagemeier commented 10 years ago

Adding the content-type header yields the following:

"Both occi.core.[source, target] attributes need to be resources."

Well, I thought that both source and target were resources, as I can retrieve information about them with get requests. I have also tried the full URL including server as I did for linking a storage to a VM, but it returns the same message.

Björn

tmetsch commented 10 years ago

jah can you give the complete output f the curl vomman when adding the -v parameter?

bhagemeier commented 10 years ago

$ curl -v -X POST --capath /etc/grid-security/certificates/ -H 'x-auth-token: *****' https://egi-cloud.zam.kfa-juelich.de:8787/network/interface/ -H 'Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"' -H 'x-occi-attribute: occi.core.source="https://egi-cloud.zam.kfa-juelich.de:8787/compute/b9cce1e6-1aec-472b-bfe7-15547cd46316"' -H 'x-occi-attribute: occi.core.target="https://egi-cloud.zam.kfa-juelich.de:8787/network/public"' -H 'content-type: text/occi'

tmetsch commented 10 years ago

try using "X-OCCI-Attribute" instead of "x-occi-attribute"...

bhagemeier commented 10 years ago

On 07.01.2014 11:15, tmetsch wrote :

try using "X-OCCI-Attribute" instead of "x-occi-attribute"... Nope, still the same. Acc. to HTTP spec. it should not make a difference.

— Reply to this email directly or view it on GitHub https://github.com/tmetsch/occi-os/issues/65#issuecomment-31726217.

Dipl.-Inform. Björn Hagemeier Federated Systems and Data Juelich Supercomputing Centre Institute for Advanced Simulation

Phone: +49 2461 61 1584 Fax : +49 2461 61 6656 Email: b.hagemeier@fz-juelich.de Skype: bhagemeier WWW : http://www.fz-juelich.de/jsc

JSC is the coordinator of the John von Neumann Institute for Computing and member of the Gauss Centre for Supercomputing



Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


tmetsch commented 10 years ago

weird - stuff is tested here: https://github.com/tmetsch/occi-os/blob/master/tests/system_test.py#L326 with the exact stuff you are doing. must be sth we miss in the request. Will fire up an test instance later today to test for you.

bhagemeier commented 10 years ago

On 07.01.2014 11:35, tmetsch wrote :

weird - stuff is tested here: https://github.com/tmetsch/occi-os/blob/master/tests/system_test.py#L326 with the exact stuff you are doing. must be sth we miss in the request. Will fire up an test instance later today to test for you. Hi, I may be missing ipnetworkinterface. Will check later today.

— Reply to this email directly or view it on GitHub https://github.com/tmetsch/occi-os/issues/65#issuecomment-31727387.

Dipl.-Inform. Björn Hagemeier Federated Systems and Data Juelich Supercomputing Centre Institute for Advanced Simulation

Phone: +49 2461 61 1584 Fax : +49 2461 61 6656 Email: b.hagemeier@fz-juelich.de Skype: bhagemeier WWW : http://www.fz-juelich.de/jsc

JSC is the coordinator of the John von Neumann Institute for Computing and member of the Gauss Centre for Supercomputing



Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


tmetsch commented 10 years ago

That mixin shouldn't matter for now - I took your curl request from earlier + the content type and got an OK back....

$ curl -v -X POST -H 'X-Auth-token: '$KID localhost:8787/network/interface/ -H 'Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"' -H 'x-occi-attribute: occi.core.source="/compute/317813a2-3aa0-4d39-b4ea-53784a513a61"' -H 'x-occi-attribute: occi.core.target="/network/public"' -H 'Content-Type: text/occi'
* About to connect() to localhost port 8787 (#0)
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8787 (#0)
> POST /network/interface/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:8787
> Accept: */*
> X-Auth-token: [...]
> Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"
> x-occi-attribute: occi.core.source="/compute/317813a2-3aa0-4d39-b4ea-53784a513a61"
> x-occi-attribute: occi.core.target="/network/public"
> Content-Type: text/occi
> 
< HTTP/1.1 201 Created
< Content-Length: 2
< Content-Type: text/plain
< Location: http://localhost:8787/network/interface/60f278d3-c2e7-4acd-a306-d87ec4f8f76e
< Server: pyssf OCCI/1.1
< Date: Tue, 07 Jan 2014 12:29:03 GMT
< 
* Connection #0 to host localhost left intact
OK%     
bhagemeier commented 10 years ago

Hi Thijs,

finally works. Thanks for your help. Everything is ok with the implementation.

Cheers, Björn

On 07.01.2014 13:29, tmetsch wrote :

$ curl -v -X POST -H 'X-Auth-token: '$KID localhost:8787/network/interface/ -H 'Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"' -H 'x-occi-attribute: occi.core.source="/compute/317813a2-3aa0-4d39-b4ea-53784a513a61"' -H 'x-occi-attribute: occi.core.target="/network/public"' -H 'Content-Type: text/occi'

  • About to connect() to localhost port 8787 (#0)
  • Trying 127.0.0.1...
  • Connected to localhost (127.0.0.1) port 8787 (#0) > POST /network/interface/ HTTP/1.1 > User-Agent: curl/7.29.0 > Host: localhost:8787 > Accept: /// > X-Auth-token: [...] > Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind" > x-occi-attribute: occi.core.source="/compute/317813a2-3aa0-4d39-b4ea-53784a513a61" > x-occi-attribute: occi.core.target="/network/public" > Content-Type: text/occi > < HTTP/1.1 201 Created < Content-Length: 2 < Content-Type: text/plain < Location: http://localhost:8787/network/interface/60f278d3-c2e7-4acd-a306-d87ec4f8f76e < Server: pyssf OCCI/1.1 < Date: Tue, 07 Jan 2014 12:29:03 GMT <
  • Connection #0 to host localhost left intact OK%

— Reply to this email directly or view it on GitHub https://github.com/tmetsch/occi-os/issues/65#issuecomment-31733511.



Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


tmetsch commented 10 years ago

no problem - glad that it isn't a bug :-D Cheers!