[one-users] OCCI 3 Requests

Amine Ghrab ghrab.amine at gmail.com
Thu Sep 1 01:13:23 PDT 2011


On Thu, Sep 1, 2011 at 8:06 AM, Amine Ghrab <ghrab.amine at gmail.com> wrote:

> I wanted just to share step by step how I installed OCCI Server 0.3 on a
> just installed Ubuntu 10.04:
>
>  1.$ sudo gem install uuidtools sinatra
>>
>> 2.$ sudo apt-get install ruby1.8-dev
>>
>> 3.$ sudo gem install passenger
>>
>> 4.$ sudo apt-get install build-essential
>>
>> 5.$ sudo apt-get install libcurl4-openssl-dev
>>
>> 6.$ sudo apt-get install libssl-dev
>>
>> 7.$ sudo apt-get install zlib1g-dev
>>
>> 8.$ sudo gem install antlr3
>>
>>
>>> 9.Rename the folder ogf-occi/lib/OpenNebula to lib/opennebula
>>
>> 10.$ cd Desktop/ogf-occi/
>>
>> 11.$ /var/lib/gems/1.8/gems/passenger-3.0.8/bin/passenger start
>>
>>
> Regards,
>
> Amine
>
> On Thu, Sep 1, 2011 at 8:01 AM, Amine Ghrab <ghrab.amine at gmail.com> wrote:
>
>> The output of the log file after the *GET*, I've noticed that it's the
>> same as the terminal's output where I've started passenger :
>>
>>  D, [2011-09-01T07:58:27.291165 #1597] DEBUG -- : Requested location:
>>>> /network/
>>>
>>> D, [2011-09-01T07:58:27.292056 #1597] DEBUG -- : *  location:
>>>> storagelink : object: #<OCCI::Core::Kind:0xb6bd1490>
>>>
>>> D, [2011-09-01T07:58:27.292145 #1597] DEBUG -- : *  location:
>>>> networkinterface : object: #<OCCI::Core::Kind:0xb6bd42d0>
>>>
>>> D, [2011-09-01T07:58:27.292210 #1597] DEBUG -- : *  location: network :
>>>> object: #<OCCI::Core::Kind:0xb6bd8718>
>>>
>>> D, [2011-09-01T07:58:27.292271 #1597] DEBUG -- : *  location: compute :
>>>> object: #<OCCI::Core::Kind:0xb6bdfcd4>
>>>
>>> D, [2011-09-01T07:58:27.292350 #1597] DEBUG -- : *  location:
>>>> ipnetworking : object: #<OCCI::Core::Mixin:0xb6bc79a4>
>>>
>>> D, [2011-09-01T07:58:27.292413 #1597] DEBUG -- : *  location: storage :
>>>> object: #<OCCI::Core::Kind:0xb6bdb8f0>
>>>
>>> D, [2011-09-01T07:58:27.292955 #1597] DEBUG -- : *  location: link :
>>>> object: #<OCCI::Core::Kind:0xb6bd45dc>
>>>
>>> D, [2011-09-01T07:58:27.293070 #1597] DEBUG -- : *  context: _/hash/
>>>
>>> I, [2011-09-01T07:58:27.293210 #1597]  INFO -- : Kind / mixin exact
>>>> match for location [/network/]: #<OCCI::Core::Kind:0xb6bd8718>
>>>
>>> D, [2011-09-01T07:58:27.293708 #1597] DEBUG -- : ### Information on the
>>>> client ###
>>>
>>> D, [2011-09-01T07:58:27.293789 #1597] DEBUG -- : Client IP Adress:
>>>> 127.0.0.1
>>>
>>> D, [2011-09-01T07:58:27.293847 #1597] DEBUG -- : Client User Agent:
>>>> curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/
>>>> 1.2.3.3 libidn/1.15
>>>
>>> D, [2011-09-01T07:58:27.293991 #1597] DEBUG -- :
>>>> #################################
>>>
>>> D, [2011-09-01T07:58:27.294054 #1597] DEBUG -- : Accept type: */*
>>>
>>> D, [2011-09-01T07:58:27.294107 #1597] DEBUG -- : Content type:
>>>> text/plain
>>>
>>> D, [2011-09-01T07:58:27.294249 #1597] DEBUG -- : Response headers:
>>>> Content-Typetext/plainServerOCCI/1.1
>>>
>>> D, [2011-09-01T07:58:27.294305 #1597] DEBUG -- : Response body:
>>>
>>> 127.0.0.1 - - [01/Sep/2011 07:58:27] "GET /network/ " 200 - 0.0075
>>>
>>>
>>>
>> And here is the output after the *POST :*
>>
>>
>>>  D, [2011-09-01T07:41:23.701360 #1597] DEBUG -- : Requested location:
>>>> /network/
>>>
>>> D, [2011-09-01T07:41:23.701546 #1597] DEBUG -- : HTTP Category string:
>>>> network;scheme="http://schemas.ogf.org/occi/infrastructure#
>>>> ";class="kind";,ipnetwork;scheme="
>>>> http://schemas.ogf.org/occi/infrastructure/network#";class="kind";
>>>
>>>  D, [2011-09-01T07:41:23.701608 #1597] DEBUG -- : Request Location
>>>> /network/
>>>
>>> D, [2011-09-01T07:41:23.701661 #1597] DEBUG -- : Request query string
>>>
>>> W, [2011-09-01T07:41:23.715220 #1597]  WARN -- : line 1:74 mismatched
>>>> input "," expecting 'actions'
>>>
>>> W, [2011-09-01T07:41:23.716706 #1597]  WARN -- : line 0:-1 mismatched
>>>> input "<EOF>" expecting 'actions'
>>>
>>> D, [2011-09-01T07:41:23.717456 #1597] DEBUG -- :
>>>> #<OCCI::Core::Kind:0xb6bd8718 @term="network", @entities=[],
>>>> @related=[#<OCCI::Core::Kind:0xb6be31e0 @term="resource", @entities=[],
>>>> @related=[#<OCCI::Core::Kind:0xb6be37f8 @term="entity", @entities=[],
>>>> @related=[], @actions=[], @title="Entity",
>>>> @attributes={"occi.core.title"=>#<OCCI::Core::Attribute:0xb6be380c
>>>> @unique=true, @name="occi.core.title", @mandatory=false, @mutable=true>, "
>>>> occi.core.id"=>#<OCCI::Core::Attribute:0xb6be3834 @unique=true, @name="
>>>> occi.core.id", @mandatory=true, @mutable=false>},
>>>> @entity_type=OCCI::Core::Entity, @scheme="
>>>> http://schemas.ogf.org/occi/core#">], @actions=[], @title="Resource",
>>>> @attributes={"occi.core.summary"=>#<OCCI::Core::Attribute:0xb6be321c
>>>> @unique=true, @name="occi.core.summary", @mandatory=false, @mutable=true>,
>>>> "links"=>#<OCCI::Core::Attribute:0xb6be31f4 @unique=false, @name="links",
>>>> @mandatory=false, @mutable=true>}, @entity_type=OCCI::Core::Resource,
>>>> @scheme="http://schemas.ogf.org/occi/core#">],
>>>> @actions=[#<OCCI::Core::Action:0xb6bd8934
>>>> @category=#<OCCI::Core::Category:0xb6bd890c @term="down", @title="Network
>>>> Action Down", @attributes=[], @scheme="
>>>> http://schemas.ogf.org/occi/infrastructure/network/action#">>,
>>>> #<OCCI::Core::Action:0xb6bd88bc @category=#<OCCI::Core::Category:0xb6bd8894
>>>> @term="up", @title="Network Action Up", @attributes=[], @scheme="
>>>> http://schemas.ogf.org/occi/infrastructure/network/action#">>],
>>>> @title="Network Resource",
>>>> @attributes={"occi.network.label"=>#<OCCI::Core::Attribute:0xb6bd8754
>>>> @unique=true, @name="occi.network.label", @mandatory=false, @mutable=true>,
>>>> "occi.network.vlan"=>#<OCCI::Core::Attribute:0xb6bd877c @unique=true,
>>>> @name="occi.network.vlan", @mandatory=false, @mutable=true>,
>>>> "occi.network.state"=>#<OCCI::Core::Attribute:0xb6bd872c @unique=true,
>>>> @name="occi.network.state", @mandatory=true, @mutable=false>},
>>>> @entity_type=OCCI::Infrastructure::Network, @scheme="
>>>> http://schemas.ogf.org/occi/infrastructure#">
>>>
>>>  D, [2011-09-01T07:41:23.718080 #1597] DEBUG -- : Category found:
>>>> http://schemas.ogf.org/occi/infrastructure#network
>>>
>>> W, [2011-09-01T07:41:23.722971 #1597]  WARN -- : line 1:74 mismatched
>>>> input "," expecting 'actions'
>>>
>>> W, [2011-09-01T07:41:23.741109 #1597]  WARN -- : line 0:-1 mismatched
>>>> input "<EOF>" expecting 'actions'
>>>
>>> D, [2011-09-01T07:41:23.741816 #1597] DEBUG -- : Searching context:
>>>
>>> I, [2011-09-01T07:41:23.741943 #1597]  INFO -- : Creating resource...
>>>
>>> W, [2011-09-01T07:41:23.747023 #1597]  WARN -- : line 1:74 mismatched
>>>> input "," expecting 'actions'
>>>
>>> W, [2011-09-01T07:41:23.752805 #1597]  WARN -- : line 0:-1 mismatched
>>>> input "<EOF>" expecting 'actions'
>>>
>>> D, [2011-09-01T07:41:23.753958 #1597] DEBUG -- :
>>>> #<OCCI::Core::Kind:0xb6bd8718 @term="network", @entities=[],
>>>> @related=[#<OCCI::Core::Kind:0xb6be31e0 @term="resource", @entities=[],
>>>> @related=[#<OCCI::Core::Kind:0xb6be37f8 @term="entity", @entities=[],
>>>> @related=[], @actions=[], @title="Entity",
>>>> @attributes={"occi.core.title"=>#<OCCI::Core::Attribute:0xb6be380c
>>>> @unique=true, @name="occi.core.title", @mandatory=false, @mutable=true>, "
>>>> occi.core.id"=>#<OCCI::Core::Attribute:0xb6be3834 @unique=true, @name="
>>>> occi.core.id", @mandatory=true, @mutable=false>},
>>>> @entity_type=OCCI::Core::Entity, @scheme="
>>>> http://schemas.ogf.org/occi/core#">], @actions=[], @title="Resource",
>>>> @attributes={"occi.core.summary"=>#<OCCI::Core::Attribute:0xb6be321c
>>>> @unique=true, @name="occi.core.summary", @mandatory=false, @mutable=true>,
>>>> "links"=>#<OCCI::Core::Attribute:0xb6be31f4 @unique=false, @name="links",
>>>> @mandatory=false, @mutable=true>}, @entity_type=OCCI::Core::Resource,
>>>> @scheme="http://schemas.ogf.org/occi/core#">],
>>>> @actions=[#<OCCI::Core::Action:0xb6bd8934
>>>> @category=#<OCCI::Core::Category:0xb6bd890c @term="down", @title="Network
>>>> Action Down", @attributes=[], @scheme="
>>>> http://schemas.ogf.org/occi/infrastructure/network/action#">>,
>>>> #<OCCI::Core::Action:0xb6bd88bc @category=#<OCCI::Core::Category:0xb6bd8894
>>>> @term="up", @title="Network Action Up", @attributes=[], @scheme="
>>>> http://schemas.ogf.org/occi/infrastructure/network/action#">>],
>>>> @title="Network Resource",
>>>> @attributes={"occi.network.label"=>#<OCCI::Core::Attribute:0xb6bd8754
>>>> @unique=true, @name="occi.network.label", @mandatory=false, @mutable=true>,
>>>> "occi.network.vlan"=>#<OCCI::Core::Attribute:0xb6bd877c @unique=true,
>>>> @name="occi.network.vlan", @mandatory=false, @mutable=true>,
>>>> "occi.network.state"=>#<OCCI::Core::Attribute:0xb6bd872c @unique=true,
>>>> @name="occi.network.state", @mandatory=true, @mutable=false>},
>>>> @entity_type=OCCI::Infrastructure::Network, @scheme="
>>>> http://schemas.ogf.org/occi/infrastructure#">
>>>
>>>  D, [2011-09-01T07:41:23.754334 #1597] DEBUG -- : Category found:
>>>> http://schemas.ogf.org/occi/infrastructure#network
>>>
>>> W, [2011-09-01T07:41:23.759354 #1597]  WARN -- : line 1:74 mismatched
>>>> input "," expecting 'actions'
>>>
>>> W, [2011-09-01T07:41:23.760443 #1597]  WARN -- : line 0:-1 mismatched
>>>> input "<EOF>" expecting 'actions'
>>>
>>> D, [2011-09-01T07:41:23.760844 #1597] DEBUG -- :
>>>> #<OCCI::Core::Mixin:0xb6bc79a4 @term="ipnetwork", @entities=[], @related=[],
>>>> @actions=[], @title="IP Network Mixin",
>>>> @attributes={"occi.network.allocation"=>#<OCCI::Core::Attribute:0xb6bc79b8
>>>> @unique=true, @name="occi.network.allocation", @mandatory=true,
>>>> @mutable=true>, "occi.network.address"=>#<OCCI::Core::Attribute:0xb6bc7a08
>>>> @unique=true, @name="occi.network.address", @mandatory=true, @mutable=true>,
>>>> "occi.network.gateway"=>#<OCCI::Core::Attribute:0xb6bc79e0 @unique=true,
>>>> @name="occi.network.gateway", @mandatory=false, @mutable=true>}, @scheme="
>>>> http://schemas.ogf.org/occi/infrastructure/network#">
>>>
>>>  D, [2011-09-01T07:41:23.761055 #1597] DEBUG -- : Category found:
>>>> http://schemas.ogf.org/occi/infrastructure/network#ipnetwork
>>>
>>>  D, [2011-09-01T07:41:23.762422 #1597] DEBUG -- : OCCI ID:
>>>
>>> D, [2011-09-01T07:41:23.802715 #1597] DEBUG -- : Attributes definitions
>>>> to check against:
>>>> occi.network.allocationocci.core.titleocci.core.summaryocci.network.addressocci.core.idocci.network.labelocci.network.vlanocci.network.gatewaylinksocci.network.state
>>>
>>>  E, [2011-09-01T07:41:23.804078 #1597] ERROR -- : Mandatory attribute
>>>> [occi.network.allocation] not set! (RuntimeError)
>>>
>>> ./lib/occi/core/Entity.rb:111:in `check_attributes'
>>>
>>> ./lib/occi/core/Entity.rb:109:in `each'
>>>
>>> ./lib/occi/core/Entity.rb:109:in `check_attributes'
>>>
>>> ./lib/occi/core/Entity.rb:134:in `initialize'
>>>
>>> ./lib/occi/core/Resource.rb:54:in `initialize'
>>>
>>> ./lib/occi/infrastructure/Network.rb:65:in `initialize'
>>>
>>> ./lib/occi/rendering/http/Post.rb:105:in `new'
>>>
>>> ./lib/occi/rendering/http/Post.rb:105:in `resource_create'
>>>
>>> ./lib/occi/occi-server.rb:260:in `POST *'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1151:in `call'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1151:in
>>>> `compile!'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:724:in
>>>> `instance_eval'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:724:in
>>>> `route_eval'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:708:in `route!'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:758:in
>>>> `process_route'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:755:in `catch'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:755:in
>>>> `process_route'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:707:in `route!'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:706:in `each'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:706:in `route!'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:843:in
>>>> `dispatch!'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:644:in `call!'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in
>>>> `instance_eval'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `invoke'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `catch'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `invoke'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:644:in `call!'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:629:in `call'
>>>
>>> /var/lib/gems/1.8/gems/rack-1.3.2/lib/rack/head.rb:9:in `call'
>>>
>>> /var/lib/gems/1.8/gems/rack-1.3.2/lib/rack/commonlogger.rb:20:in `call'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/showexceptions.rb:21:in
>>>> `call'
>>>
>>> /var/lib/gems/1.8/gems/rack-1.3.2/lib/rack/methodoverride.rb:24:in `call'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1303:in
>>>> `synchronize'
>>>
>>> /var/lib/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/rack/request_handler.rb:96:in
>>>> `process_request'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:513:in
>>>> `accept_and_process_next_request'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:274:in
>>>> `main_loop'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:205:in
>>>> `start_request_handler'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:170:in
>>>> `send'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:170:in
>>>> `handle_spawn_application'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/utils.rb:479:in
>>>> `safe_fork'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:165:in
>>>> `handle_spawn_application'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in
>>>> `__send__'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in
>>>> `server_main_loop'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:206:in
>>>> `start_synchronously'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:180:in
>>>> `start'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb:128:in
>>>> `start'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:253:in
>>>> `spawn_rack_application'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:132:in
>>>> `lookup_or_add'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:246:in
>>>> `spawn_rack_application'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:82:in
>>>> `synchronize'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb:79:in
>>>> `synchronize'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:244:in
>>>> `spawn_rack_application'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:137:in
>>>> `spawn_application'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/spawn_manager.rb:275:in
>>>> `handle_spawn_application'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in
>>>> `__send__'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:357:in
>>>> `server_main_loop'
>>>
>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/lib/phusion_passenger/abstract_server.rb:206:in
>>>> `start_synchronously'
>>>
>>>
>>>> /home/ena/.passenger/standalone/3.0.8-x86-ruby1.8.7-linux-gcc4.4.3-1002/support/helper-scripts/passenger-spawn-server:99
>>>
>>> D, [2011-09-01T07:41:23.804589 #1597] DEBUG -- : ### Information on the
>>>> client ###
>>>
>>> D, [2011-09-01T07:41:23.804690 #1597] DEBUG -- : Client IP Adress:
>>>> 127.0.0.1
>>>
>>> D, [2011-09-01T07:41:23.804746 #1597] DEBUG -- : Client User Agent:
>>>> curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/
>>>> 1.2.3.3 libidn/1.15
>>>
>>> D, [2011-09-01T07:41:23.804836 #1597] DEBUG -- :
>>>> #################################
>>>
>>> D, [2011-09-01T07:41:23.804898 #1597] DEBUG -- : Accept type: */*
>>>
>>> D, [2011-09-01T07:41:23.804950 #1597] DEBUG -- : Content type:
>>>> text/plain
>>>
>>> D, [2011-09-01T07:41:23.805169 #1597] DEBUG -- : Response headers:
>>>> Content-Typetext/plainServerOCCI/1.1
>>>
>>> D, [2011-09-01T07:41:23.805263 #1597] DEBUG -- : Response body:
>>>
>>> 127.0.0.1 - - [01/Sep/2011 07:41:23] "POST /network/ " 400 - 0.1062
>>>
>>>
>> Regards,
>>
>> Amine
>>
>> On Thu, Sep 1, 2011 at 7:52 AM, <florian.feldhaus at tu-dortmund.de> wrote:
>>
>>>  Hi Amine,
>>>
>>>  you can find the log file of the OCCI server in the log dir (e.g.
>>> ogf-occi/log/passenger.3000.log
>>>
>>>  Could you send me the output? Then I can check what's wrong.
>>>
>>>  Cheers,
>>> Florian
>>>
>>>   Von: Amine Ghrab <ghrab.amine at gmail.com>
>>> Datum: Thu, 1 Sep 2011 07:48:29 +0100
>>> An: Florian Feldhaus <florian.feldhaus at tu-dortmund.de>
>>> Betreff: Re: [one-users] OCCI 3 Requests
>>>
>>>  Hi Florian,
>>>
>>> Thanks for the quick answer and sorry for the previous missing mail [?]
>>>
>>> In fact, the network is already created using CLI (onevnet) :
>>>
>>>   oneadmin at ena-desktop:~$ onevnet list
>>>>
>>>>    ID USER     GROUP    NAME              TYPE BRIDGE PUB  LEASES
>>>>
>>>>     0 oneadmin oneadmin Small network        F    br0  No       0
>>>>
>>>>  oneadmin at ena-desktop:~$ curl -X GET http://localhost:3000/network/
>>>>
>>>>  oneadmin at ena-desktop:~$ curl -v -X GET http://localhost:3000/network/
>>>>
>>>>  * About to connect() to localhost port 3000 (#0)
>>>>
>>>>  *   Trying ::1... Connection refused
>>>>
>>>>  *   Trying 127.0.0.1... connected
>>>>
>>>>  * Connected to localhost (127.0.0.1) port 3000 (#0)
>>>>
>>>>  > GET /network/ HTTP/1.1
>>>>
>>>>  > User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7
>>>>> OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
>>>>
>>>>  > Host: localhost:3000
>>>>
>>>>  > Accept: */*
>>>>
>>>>  >
>>>>
>>>>  < HTTP/1.1 200 OK
>>>>
>>>>  < Content-Type: text/plain
>>>>
>>>>  < Connection: keep-alive
>>>>
>>>>  < Status: 200
>>>>
>>>>  < X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.8
>>>>
>>>>  < Content-Length: 0
>>>>
>>>>  < Server: OCCI/1.1
>>>>
>>>>  <
>>>>
>>>>  * Connection #0 to host localhost left intact
>>>>
>>>>  * Closing connection #0
>>>>
>>>>
>>>>
>>>  For the POST request now, I've tried the following request :
>>>
>>>   oneadmin at ena-desktop:~$ curl -v -X POST --header
>>>>> 'Category:network;scheme="http://schemas.ogf.org/occi/infrastructure#
>>>>> ";class="kind";,ipnetwork;scheme="
>>>>> http://schemas.ogf.org/occi/infrastructure/network#";class="kind";'
>>>>> --header 'X-OCCI-Attribute:occi.core.title="My Network",
>>>>> occi.core.summary="A short summary",occi.network.address="
>>>>> 192.168.0.0/24",occi.network.allocation="dynamic",occi.network.vlan=1'
>>>>> http://localhost:3000/network/
>>>>> * About to connect() to localhost port 3000 (#0)
>>>>> *   Trying ::1... Connection refused
>>>>> *   Trying 127.0.0.1... connected
>>>>> * Connected to localhost (127.0.0.1) port 3000 (#0)
>>>>> > POST /network/ HTTP/1.1
>>>>> > User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7
>>>>> OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
>>>>> > Host: localhost:3000
>>>>> > Accept: */*
>>>>> > Category:network;scheme="http://schemas.ogf.org/occi/infrastructure#
>>>>> ";class="kind";,ipnetwork;scheme="
>>>>> http://schemas.ogf.org/occi/infrastructure/network#";class="kind";
>>>>> > X-OCCI-Attribute:occi.core.title="My Network",
>>>>> > occi.core.summary="A short summary",occi.network.address="
>>>>> 192.168.0.0/24",occi.network.allocation="dynamic",occi.network.vlan=1
>>>>> >
>>>>> < HTTP/1.1 400 Bad Request
>>>>> < Content-Type: text/plain
>>>>> < Connection: keep-alive
>>>>> < Status: 400
>>>>> < X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.8
>>>>> < Content-Length: 0
>>>>> < Server: OCCI/1.1
>>>>> <
>>>>> * Connection #0 to host localhost left intact
>>>>> * Closing connection #0
>>>>
>>>>
>>>>
>>>  But still get the 400 Error.
>>> BTW, is there a way to get more precise information about errors of the
>>> OCCI requests rather than HTTP responses codes.
>>> I've seen others facing the same problems,
>>> http://lists.opennebula.org/htdig.cgi/users-opennebula.org/2011-August/006176.html
>>>
>>>
>>>  Regards,
>>>
>>>  Amine.
>>>
>>> On Thu, Sep 1, 2011 at 7:26 AM, <florian.feldhaus at tu-dortmund.de> wrote:
>>>
>>>>  Hi Amine,
>>>>
>>>>  The GET commands you are issuing are returning a HTTP return code 200
>>>> OK. It will return nothing, if you didn't successfully create a network,
>>>> storage or compute object before. Regarding the POST: If you are using OCCI
>>>> v0.3, then you should use the attribute as described here:
>>>> http://dev.opennebula.org/projects/ogf-occi/wiki/Occi_03
>>>>
>>>>  The virtualnetwork mixin was necessary for OpenNebula 2.2 but we
>>>> decided to not support OpenNebula 2.2 anymore as it is missing some
>>>> important features (like VLAN) for successfully mapping OCCI attributes.
>>>> Thus, please use OpenNebula 3.0 together with OCCI v0.3 and then creating
>>>> networks shouldn't be a problem.
>>>>
>>>>  Cheers,
>>>> Florian
>>>>
>>>>   Von: Amine Ghrab <ghrab.amine at gmail.com>
>>>> Datum: Wed, 31 Aug 2011 20:12:13 +0100
>>>> An: <users at lists.opennebula.org>
>>>> Betreff: [one-users] OCCI 3 Requests
>>>>
>>>>  Hi all,
>>>>
>>>>  I'm trying to make requests to the occi server using curl command but
>>>> got no anwers:
>>>>
>>>>   oneadmin at ena-desktop:~$ curl -X GET http://localhost:3000
>>>>> oneadmin at ena-desktop:~$ curl -X GET http://localhost:3000/
>>>>> oneadmin at ena-desktop:~$ curl -X GET http://localhost:3000/network/
>>>>
>>>>
>>>>  The occi-server logs are : passenger.3000.log
>>>>
>>>>   D, [2011-08-31T20:02:33.963033 #1627] DEBUG -- :
>>>>> #################################
>>>>> D, [2011-08-31T20:02:33.963112 #1627] DEBUG -- : Accept type: */*
>>>>> D, [2011-08-31T20:02:33.963164 #1627] DEBUG -- : Content type:
>>>>> text/plain
>>>>> D, [2011-08-31T20:02:33.963481 #1627] DEBUG -- : Response headers:
>>>>> Content-Typetext/plainServerOCCI/1.1
>>>>> D, [2011-08-31T20:02:33.963535 #1627] DEBUG -- : Response body:
>>>>> 127.0.0.1 - - [31/Aug/2011 20:02:33] "POST /network/ " 400 - 0.0985
>>>>> D, [2011-08-31T20:06:36.532413 #1627] DEBUG -- : Requested location:
>>>>> /network/
>>>>> D, [2011-08-31T20:06:36.532667 #1627] DEBUG -- : *  location:
>>>>> storagelink : object: #<OCCI::Core::Kind:0xb6d264e4>
>>>>> D, [2011-08-31T20:06:36.532759 #1627] DEBUG -- : *  location:
>>>>> networkinterface : object: #<OCCI::Core::Kind:0xb6d29324>
>>>>> D, [2011-08-31T20:06:36.532820 #1627] DEBUG -- : *  location: network :
>>>>> object: #<OCCI::Core::Kind:0xb6d2d76c>
>>>>> D, [2011-08-31T20:06:36.532905 #1627] DEBUG -- : *  location: compute :
>>>>> object: #<OCCI::Core::Kind:0xb6d34d28>
>>>>> D, [2011-08-31T20:06:36.532976 #1627] DEBUG -- : *  location:
>>>>> ipnetworking : object: #<OCCI::Core::Mixin:0xb6d1c9f8>
>>>>> D, [2011-08-31T20:06:36.533057 #1627] DEBUG -- : *  location: storage :
>>>>> object: #<OCCI::Core::Kind:0xb6d30944>
>>>>> D, [2011-08-31T20:06:36.533136 #1627] DEBUG -- : *  location: link :
>>>>> object: #<OCCI::Core::Kind:0xb6d29630>
>>>>> D, [2011-08-31T20:06:36.533205 #1627] DEBUG -- : *  context: _/hash/
>>>>> I, [2011-08-31T20:06:36.533333 #1627]  INFO -- : Kind / mixin exact
>>>>> match for location [/network/]: #<OCCI::Core::Kind:0xb6d2d76c>
>>>>> D, [2011-08-31T20:06:36.533420 #1627] DEBUG -- : ### Information on the
>>>>> client ###
>>>>> D, [2011-08-31T20:06:36.533473 #1627] DEBUG -- : Client IP Adress:
>>>>> 127.0.0.1
>>>>> D, [2011-08-31T20:06:36.533547 #1627] DEBUG -- : Client User Agent:
>>>>> curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/
>>>>> 1.2.3.3 libidn/1.15
>>>>> D, [2011-08-31T20:06:36.533631 #1627] DEBUG -- :
>>>>> #################################
>>>>> D, [2011-08-31T20:06:36.533688 #1627] DEBUG -- : Accept type: */*
>>>>> D, [2011-08-31T20:06:36.533762 #1627] DEBUG -- : Content type:
>>>>> text/plain
>>>>> D, [2011-08-31T20:06:36.533864 #1627] DEBUG -- : Response headers:
>>>>> Content-Typetext/plainServerOCCI/1.1
>>>>> D, [2011-08-31T20:06:36.533938 #1627] DEBUG -- : Response body:
>>>>> 127.0.0.1 - - [31/Aug/2011 20:06:36] "GET /network/ " 200 - 0.0039
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Using the verbose mode I get :
>>>>
>>>>   oneadmin at ena-desktop:~$ curl -v -X GET http://localhost:3000/network/
>>>>>
>>>>>  * About to connect() to localhost port 3000 (#0)
>>>>>
>>>>>  *   Trying ::1... Connection refused
>>>>>
>>>>>  *   Trying 127.0.0.1... connected
>>>>>
>>>>>  * Connected to localhost (127.0.0.1) port 3000 (#0)
>>>>>
>>>>>  > GET /network/ HTTP/1.1
>>>>>
>>>>>  > User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7
>>>>>> OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
>>>>>
>>>>>  > Host: localhost:3000
>>>>>
>>>>>  > Accept: */*
>>>>>
>>>>>  >
>>>>>
>>>>>  < HTTP/1.1 200 OK
>>>>>
>>>>>  < Content-Type: text/plain
>>>>>
>>>>>  < Connection: keep-alive
>>>>>
>>>>>  < Status: 200
>>>>>
>>>>>  < X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.8
>>>>>
>>>>>  < Content-Length: 0
>>>>>
>>>>>  < Server: OCCI/1.1
>>>>>
>>>>>  <
>>>>>
>>>>>  * Connection #0 to host localhost left intact
>>>>>
>>>>>  * Closing connection #0
>>>>>
>>>>>
>>>>>
>>>>  POST Request also failed :
>>>>
>>>>  oneadmin at ena-desktop:~$ curl -v -X POST --header 'Category:
>>>>> network;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";,virtualnetwork;
>>>>> scheme="http://schemas.opennebula.org/occi/infrastructure#";class="mixin";'
>>>>> --header 'X-OCCI-Attribute: occi.core.title="My
>>>>> Network",occi.core.summary="A short summary", opennebula.network.size=256,
>>>>> opennebula.network.address="192.168.0.0",opennebula.network.bridge=virbr0,opennebula.network.public=YES,opennebula.network.type=RANGED'
>>>>> http://localhost:3000/network/
>>>>
>>>>  * About to connect() to localhost port 3000 (#0)
>>>>
>>>>  *   Trying ::1... Connection refused
>>>>
>>>>  *   Trying 127.0.0.1... connected
>>>>
>>>>  * Connected to localhost (127.0.0.1) port 3000 (#0)
>>>>
>>>>  > POST /network/ HTTP/1.1
>>>>
>>>>  > User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7
>>>>> OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
>>>>
>>>>  > Host: localhost:3000
>>>>
>>>>  > Accept: */*
>>>>
>>>>  > Category: network;scheme="
>>>>> http://schemas.ogf.org/occi/infrastructure#";class="kind";,virtualnetwork;
>>>>> scheme="http://schemas.opennebula.org/occi/infrastructure#
>>>>> ";class="mixin";
>>>>
>>>>  > X-OCCI-Attribute: occi.core.title="My Network",occi.core.summary="A
>>>>> short summary", opennebula.network.size=256,
>>>>> opennebula.network.address="192.168.0.0",opennebula.network.bridge=virbr0,opennebula.network.public=YES,opennebula.network.type=RANGED
>>>>
>>>>  >
>>>>
>>>>  < HTTP/1.1 400 Bad Request
>>>>
>>>>  < Content-Type: text/plain
>>>>
>>>>  < Connection: keep-alive
>>>>
>>>>  < Status: 400
>>>>
>>>>  < X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.8
>>>>
>>>>  < Content-Length: 0
>>>>
>>>>  < Server: OCCI/1.1
>>>>
>>>>  <
>>>>
>>>>  * Connection #0 to host localhost left intact
>>>>
>>>>  * Closing connection #0
>>>>
>>>>
>>>>  Any suggestions on how to make successful HTTP request ?
>>>>
>>>>  Regards,
>>>>
>>>>  Amine
>>>>   _______________________________________________ Users mailing list
>>>> Users at lists.opennebula.org
>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110901/ab1a53f4/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 655 bytes
Desc: not available
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110901/ab1a53f4/attachment-0002.png>


More information about the Users mailing list