[one-users] configure OCCI for Opennebula

Daniel Molina Aranda danmolin at fdi.ucm.es
Mon Aug 2 03:22:45 PDT 2010


Hi Marwen,

1) The problem is the ruby version that you are using, I think that problem
is fixed for 1.8.6 >= p110. If you want to keep on using 1.8.5 version you
should make these changes:

diff --git a/src/cloud/occi/bin/occi-compute
b/src/cloud/occi/bin/occi-compute
index 76018c5..399d691 100755
--- a/src/cloud/occi/bin/occi-compute
+++ b/src/cloud/occi/bin/occi-compute
@@ -203,8 +203,6 @@ else
         exit(-1)
     end

-    str = ""
-    REXML::Formatters::Pretty.new(4).write(xml,str)
-    puts "\n" + str + "\n "
+    puts xml
 end

diff --git a/src/cloud/occi/bin/occi-network
b/src/cloud/occi/bin/occi-network
index 42b8d6e..6690ac8 100755
--- a/src/cloud/occi/bin/occi-network
+++ b/src/cloud/occi/bin/occi-network
@@ -196,7 +196,5 @@ else
         exit(-1)
     end

-    str = ""
-    REXML::Formatters::Pretty.new(4).write(xml,str)
-    puts "\n" + str + "\n "
+    puts xml
 end
diff --git a/src/cloud/occi/bin/occi-storage
b/src/cloud/occi/bin/occi-storage
index 4387b2a..b9250c1 100755
--- a/src/cloud/occi/bin/occi-storage
+++ b/src/cloud/occi/bin/occi-storage
@@ -197,7 +197,5 @@ else
         exit(-1)
     end

-    str = ""
-    REXML::Formatters::Pretty.new(4).write(xml,str)
-    puts "\n" + str + "\n "
+    puts xml
 end

2) The problem is the password. You have to use the Hashed SHA1 password
that you can get from the oneuser command instead of the plaintext one. (For
the occi commands you have to use the plaintext password)


Regards.

On 1 August 2010 17:35, marwen marwen <marwen.ensi at gmail.com> wrote:

> Hello
>
> we set up the OCCI interface for OpenNebula but I have two problem:
>
> *1) when we use (occi-network,occi-compute or occi-storage) I have this error
> *
>
> $occi-network -U oneadmin -P passwd list
> *uninitialized constant REXML::Formatters*
>
> and when I use onevnet I show this result
>
> $onevnet list
> ID USER      NAME              TYPE BRIDGE #LEASES
>   1 oneadmin LAN_XEN       Fixed     eth1       0
>   2 oneadmin LAN                Fixed     br1        3
> 25 oneadmin testnet            Ranged   br1        0
> how can I resolve this problem (I am using ruby 1.8.5 (2006-08-25)
> [x86_64-linux])
>
> 2) when we use curl I have this problem
>
> $curl -u oneadmin:passwd http://localhost:4567/compute
> *Invalid credentials*
>
> $cat $ONE_AUTH
> oneadmin:passwd
>
> Regards
> Marwen
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Daniel Molina, Cloud Technology Engineer/Researcher
DSA Research Group: web http://dsa-research.org and blog
http://blog.dsa-research.org
OpenNebula Open Source Toolkit for Cloud Computing:
http://www.OpenNebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20100802/4dc25859/attachment-0003.htm>


More information about the Users mailing list