mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
feature #1304: Fix signature for XML-RPC methods. Remove publish methods for OCA
This commit is contained in:
parent
cb9e8bdb82
commit
9da2602949
@ -31,9 +31,8 @@ class RequestManagerDelete: public Request
|
||||
{
|
||||
protected:
|
||||
RequestManagerDelete(const string& method_name,
|
||||
const string& help,
|
||||
const string& signature="A:si")
|
||||
:Request(method_name,signature,help)
|
||||
const string& help)
|
||||
:Request(method_name, "A:si", help)
|
||||
{
|
||||
auth_op = AuthRequest::MANAGE;
|
||||
|
||||
@ -279,8 +278,7 @@ class DocumentDelete : public RequestManagerDelete
|
||||
public:
|
||||
DocumentDelete():
|
||||
RequestManagerDelete("DocumentDelete",
|
||||
"Deletes a generic document",
|
||||
"A:sii")
|
||||
"Deletes a generic document")
|
||||
{
|
||||
Nebula& nd = Nebula::instance();
|
||||
pool = nd.get_docpool();
|
||||
|
@ -30,9 +30,8 @@ class RequestManagerInfo: public Request
|
||||
{
|
||||
protected:
|
||||
RequestManagerInfo(const string& method_name,
|
||||
const string& help,
|
||||
const string& signature = "A:si")
|
||||
:Request(method_name,signature,help)
|
||||
const string& help)
|
||||
:Request(method_name, "A:si", help)
|
||||
{
|
||||
auth_op = AuthRequest::USE;
|
||||
};
|
||||
@ -240,8 +239,7 @@ class DocumentInfo : public RequestManagerInfo
|
||||
public:
|
||||
DocumentInfo():
|
||||
RequestManagerInfo("DocumentInfo",
|
||||
"Returns generic document information",
|
||||
"A:sii")
|
||||
"Returns generic document information")
|
||||
{
|
||||
Nebula& nd = Nebula::instance();
|
||||
pool = nd.get_docpool();
|
||||
|
@ -30,9 +30,8 @@ class RequestManagerUpdateTemplate: public Request
|
||||
{
|
||||
protected:
|
||||
RequestManagerUpdateTemplate(const string& method_name,
|
||||
const string& help,
|
||||
const string& signature = "A:sis")
|
||||
:Request(method_name,signature,help)
|
||||
const string& help)
|
||||
:Request(method_name, "A:sis", help)
|
||||
{
|
||||
auth_op = AuthRequest::MANAGE;
|
||||
};
|
||||
@ -161,8 +160,7 @@ class DocumentUpdateTemplate : public RequestManagerUpdateTemplate
|
||||
public:
|
||||
DocumentUpdateTemplate():
|
||||
RequestManagerUpdateTemplate("DocumentUpdateTemplate",
|
||||
"Updates a document template",
|
||||
"A:sisi")
|
||||
"Updates a document template")
|
||||
{
|
||||
Nebula& nd = Nebula::instance();
|
||||
pool = nd.get_docpool();
|
||||
|
@ -84,7 +84,7 @@ module OpenNebula
|
||||
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
||||
# otherwise
|
||||
def info()
|
||||
super(DOCUMENT_METHODS[:info], 'DOCUMENT', TYPE)
|
||||
super(DOCUMENT_METHODS[:info], 'DOCUMENT')
|
||||
end
|
||||
|
||||
# Allocates a new Document in OpenNebula
|
||||
@ -102,7 +102,7 @@ module OpenNebula
|
||||
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
||||
# otherwise
|
||||
def delete()
|
||||
return call(DOCUMENT_METHODS[:delete], @pe_id, TYPE)
|
||||
return call(DOCUMENT_METHODS[:delete], @pe_id)
|
||||
end
|
||||
|
||||
# Replaces the template contents
|
||||
@ -112,23 +112,7 @@ module OpenNebula
|
||||
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
||||
# otherwise
|
||||
def update(new_template)
|
||||
super(DOCUMENT_METHODS[:update], new_template, TYPE)
|
||||
end
|
||||
|
||||
# Publishes the Document, to be used by other users
|
||||
#
|
||||
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
||||
# otherwise
|
||||
def publish
|
||||
set_publish(true)
|
||||
end
|
||||
|
||||
# Unplubishes the Document
|
||||
#
|
||||
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
||||
# otherwise
|
||||
def unpublish
|
||||
set_publish(false)
|
||||
super(DOCUMENT_METHODS[:update], new_template)
|
||||
end
|
||||
|
||||
# Changes the owner/group
|
||||
|
@ -203,10 +203,10 @@ module OpenNebula
|
||||
#
|
||||
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
||||
# otherwise
|
||||
def info(xml_method, root_element, *args)
|
||||
def info(xml_method, root_element)
|
||||
return Error.new('ID not defined') if !@pe_id
|
||||
|
||||
rc = @client.call(xml_method, @pe_id, *args)
|
||||
rc = @client.call(xml_method, @pe_id)
|
||||
|
||||
if !OpenNebula.is_error?(rc)
|
||||
initialize_xml(rc, root_element)
|
||||
|
Loading…
Reference in New Issue
Block a user