OCCI network post goes in the body without field name

git-svn-id: http://svn.opennebula.org/one/trunk@804 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
Constantino Vázquez Blanco committed 2009-09-25 14:34:23 +00:00
1 parent 361a98ca81
commit 08e7b7b809
2 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -275,8 +275,8 @@ post '/network' do
# Auth check
protected!
# Info retrieval from post params
if params['occixml']
network_info=Crack::XML.parse(params['occixml'])
if params
network_info=Crack::XML.parse(params.to_s)
else
halt 400, "OCCI XML representation of Virtual Network not present in the request"
end
+5 -5
View File
@@ -15,8 +15,8 @@ module ONEOCCIClient
#######################################################################
#
#
#######################################################################
# Initialized client library
# #######################################################################
def initialize(endpoint_str=nil, user=nil, pass=nil, debug_flag=false)
@debug = debug_flag
@@ -102,9 +102,7 @@ module ONEOCCIClient
xml=File.read(xmlfile)
begin
curl.http_post(
Curl::PostField.content('occixml', xml)
)
curl.http_post(xml)
rescue Exception => e
error = OpenNebula::Error.new(e.message)
return error
@@ -301,3 +299,5 @@ end