FYI: some more info on PHP from Amine (thanks!)
From: Amine Ghrab [mailto:ghrab.amine@gmail.com]
Sent: Wednesday, August 24, 2011 10:39 AM
To: Edmonds, AndrewX
Cc: amine.ghrab@euranova.eu; Nam-Luc Tran
Subject: Re: [occi-wg] OCCI on OpenNebula
Hi Andy,
The client I wrote is still limited to the OpenNebula OCCI server implementation of OCCI 1.1, not yet fully compliant.
I plan to publish the sources soon, within few weeks.
But I can give you the way with basic cURL requests:
//GET Storage
$ch = curl_init("http://192.168.1.2:4567/storage/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
header('Content-type: text/plain; charset=utf-8');
curl_setopt($ch,CURLOPT_HEADER,true);
//CreateStorage
curl_setopt($ch, CURLOPT_HTTPHEADER,array('Category: storage;scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind";,image;scheme="http://schemas.opennebula.org/occi/infrastructure#";class="mixin";',
'X-OCCI-Attribute: occi.core.title="ImageDeTest",occi.core.summary="A short summary for Test",opennebula.image.type=OS,opennebula.image.public=YES,opennebula.image.persistent=NO,opennebula.image.dev_prefix=hd,opennebula.image.bus=ide,opennebula.image.path="/home/amine/testOFimage.img"'
));
curl_setopt($ch, CURLOPT_POST, 1);
$post = array("file"=>"@/home/amine/testStore.img");
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
print $response;
On Wed, Aug 24, 2011 at 10:12 AM, Edmonds, AndrewX <andrewx.edmonds@intel.com> wrote:
Amine – would you be willing to share the source code of your modified PHP scripts?
From: occi-wg-bounces@ogf.org [mailto:occi-wg-bounces@ogf.org] On Behalf Of Amine Ghrab
Sent: Tuesday, August 23, 2011 9:03 PM
To: occi-wg@ogf.org
Subject: [occi-wg] OCCI on OpenNebula
Hi,
I've written a php script to manage OpenNebula 2.2 using OCCI Server 0.2.
The following wiki page will help you : http://dev.opennebula.org/projects/ogf-occi/wiki/Occi_02
Just rewrite scripts using php cURL extension.
Amine
On Tue, Aug 23, 2011 at 8:13 PM, Piergiorgio Pennone <pennone@webassoluto.com> wrote:
hi, someone is using php and OCCI to connect with OpenNubula?
Where can i find some example?
tks
_______________________________________________
occi-wg mailing list
occi-wg@ogf.org
http://www.ogf.org/mailman/listinfo/occi-wg
-------------------------------------------------------------
Intel Ireland Limited (Branch)
Collinstown Industrial Park, Leixlip, County Kildare, Ireland
Registered Number: E902934
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.