mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
Merge branch 'feature-200' of dsa-research.org:one into feature-200
This commit is contained in:
commit
607638b425
2 files changed
+6
-6
No files matched your search
@@ -45,7 +45,7 @@ void RequestManager::ImageEnable::execute(
|
||||
|
||||
session = xmlrpc_c::value_string (paramList.getString(0));
|
||||
iid = xmlrpc_c::value_int (paramList.getInt(1));
|
||||
enable_flag = xmlrpc_c::value_boolean(paramList.getBoolean(1));
|
||||
enable_flag = xmlrpc_c::value_boolean(paramList.getBoolean(2));
|
||||
|
||||
// First, we need to authenticate the user
|
||||
rc = ImageEnable::upool->authenticate(session);
|
||||
@@ -78,6 +78,8 @@ void RequestManager::ImageEnable::execute(
|
||||
|
||||
}
|
||||
|
||||
ImageEnable::ipool->update(image);
|
||||
|
||||
image->unlock();
|
||||
|
||||
arrayData.push_back(xmlrpc_c::value_boolean(true));
|
||||
|
||||
@@ -45,7 +45,7 @@ void RequestManager::ImagePublish::execute(
|
||||
|
||||
session = xmlrpc_c::value_string (paramList.getString(0));
|
||||
iid = xmlrpc_c::value_int (paramList.getInt(1));
|
||||
publish_flag = xmlrpc_c::value_boolean(paramList.getBoolean(1));
|
||||
publish_flag = xmlrpc_c::value_boolean(paramList.getBoolean(2));
|
||||
|
||||
// First, we need to authenticate the user
|
||||
rc = ImagePublish::upool->authenticate(session);
|
||||
@@ -71,6 +71,8 @@ void RequestManager::ImagePublish::execute(
|
||||
}
|
||||
|
||||
image->publish(publish_flag);
|
||||
|
||||
ImagePublish::ipool->update(image);
|
||||
|
||||
image->unlock();
|
||||
|
||||
@@ -97,10 +99,6 @@ error_authorization:
|
||||
oss << "[ImagePublish] User not authorized to publish/unpublish image" <<
|
||||
", aborting call.";
|
||||
goto error_common;
|
||||
|
||||
error_remove_attribute:
|
||||
oss << "[ImagePublish] Cannot publish/unpublish image [" << iid << "]";
|
||||
goto error_common;
|
||||
|
||||
error_common:
|
||||
arrayData.push_back(xmlrpc_c::value_boolean(false)); // FAILURE
|
||||
|
||||
Reference in new issue
Block a user