1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

feature #203: Changing RM log message codes

This commit is contained in:
Tino Vázquez 2010-07-13 19:26:43 +02:00
parent 7d4b9375d2
commit 24ec057a9c
9 changed files with 19 additions and 18 deletions

View File

@ -184,7 +184,7 @@ private:
<< " to perform " << action << " on " << object;
if ( id != (int)NULL )
if ( id != -1 )
{
oss << " [" << id << "].";
}
@ -215,7 +215,7 @@ private:
oss << "[" << method << "]" << " Error getting " <<
object;
if ( id != (int)NULL )
if ( id != -1 )
{
oss << " [" << id << "].";
}
@ -238,18 +238,20 @@ private:
oss << "[" << method << "]" << " Error trying to " << action << " "
<< object;
if ( id != (int)NULL )
if ( id != -1 )
{
oss << " [" << id << "].";
}
else
{
oss << " Pool.";
}
if ( rc != (int)NULL )
{
oss << " .Returned error code [" << rc << "].";
oss << " Returned error code [" << rc << "].";
}
NebulaLog::log("RM",Log::ERROR,oss);
return oss.str();
}

View File

@ -81,7 +81,7 @@ error_authenticate:
goto error_common;
error_allocate:
oss.str(action_error(method_name, "CREATE", "VM", NULL, rc));
oss.str(action_error(method_name, "CREATE", "VM", -1, rc));
goto error_common;
error_common:

View File

@ -95,7 +95,7 @@ error_authorize:
goto error_common;
error_cluster_allocate:
oss.str(action_error(method_name, "CREATE", "CLUSTER", NULL, rc));
oss.str(action_error(method_name, "CREATE", "CLUSTER", -1, rc));
goto error_common;
error_common:

View File

@ -76,7 +76,7 @@ error_authenticate:
goto error_common;
error_dump:
oss.str(get_error(method_name, "CLUSTER", NULL));
oss.str(get_error(method_name, "CLUSTER", -1));
goto error_common;
error_common:

View File

@ -101,11 +101,11 @@ error_authenticate:
goto error_common;
error_authorize:
oss.str(authorization_error(method_name, "CREATE", "HOST", rc, NULL));
oss.str(authorization_error(method_name, "CREATE", "HOST", rc, -1));
goto error_common;
error_host_allocate:
oss.str(action_error(method_name, "CREATE", "HOST", NULL, rc));
oss.str(action_error(method_name, "CREATE", "HOST", -1, rc));
goto error_common;
error_common:

View File

@ -133,8 +133,8 @@ error_authorize:
goto error_common;
error_delete:
oss.str(action_error(method_name, "DELETE", "IMAGE", iid, rc));
oss << " VMs might be running on it.";
oss << action_error(method_name, "DELETE", "IMAGE", iid, rc)
<< ". Reason: VMs might be running on it.";
image->unlock();
goto error_common;

View File

@ -109,16 +109,16 @@ error_authenticate:
goto error_common;
error_authorize:
oss.str(authorization_error(method_name, "CREATE", "USER", rc, NULL));
oss.str(authorization_error(method_name, "CREATE", "USER", rc, -1));
goto error_common;
error_duplicate:
oss << action_error(method_name, "CREATE", "USER", NULL, NULL)
oss << action_error(method_name, "CREATE", "USER", -1, NULL)
<< ". Reason: Existing user, cannot duplicate.";
goto error_common;
error_allocate:
oss.str(action_error(method_name, "CREATE", "USER", NULL, rc));
oss.str(action_error(method_name, "CREATE", "USER", -1, rc));
goto error_common;
error_common:

View File

@ -97,7 +97,7 @@ error_get_user:
goto error_common;
error_vn_allocate:
oss.str(action_error(method_name, "ALLOCATE", "NET", NULL, rc));
oss.str(action_error(method_name, "ALLOCATE", "NET", -1, rc));
goto error_common;
error_common:

View File

@ -33,7 +33,6 @@ void RequestManager::VirtualNetworkPublish::execute(
int nid;
bool publish_flag;
int uid;
int rc;
VirtualNetwork * vn;