mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
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:
1 parent
361a98ca81
commit
08e7b7b809
2 files changed
+7
-7
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user