Revision 24ec057a

View differences:

include/RequestManager.h
184 184
            << " to perform " << action << " on " << object; 
185 185
            
186 186
        
187
        if ( id != (int)NULL )
187
        if ( id != -1 )
188 188
        {
189 189
            oss << " [" << id << "].";
190 190
        }
......
215 215
        oss << "[" << method << "]" << " Error getting " << 
216 216
               object;
217 217
               
218
       if ( id != (int)NULL )
218
       if ( id != -1 )
219 219
       {
220 220
           oss << " [" << id << "].";
221 221
       }
......
238 238
        oss << "[" << method << "]" << " Error trying to " << action << " "
239 239
            << object;
240 240
        
241
        if ( id != (int)NULL )
241
        if ( id != -1 )
242 242
        {
243 243
            oss << " [" << id << "].";
244 244
        }
245
        else
246
        {
247
            oss << " Pool.";
248
        }
245 249
        
246 250
        if ( rc != (int)NULL )
247 251
        {
248
            oss << " .Returned error code [" << rc << "].";       
252
            oss << " Returned error code [" << rc << "].";       
249 253
        }
250 254
        
251
        NebulaLog::log("RM",Log::ERROR,oss);
252
        
253 255
        return oss.str();
254 256
    }
255 257
    
src/rm/RequestManagerAllocate.cc
81 81
    goto error_common;
82 82

  
83 83
error_allocate:
84
    oss.str(action_error(method_name, "CREATE", "VM", NULL, rc));
84
    oss.str(action_error(method_name, "CREATE", "VM", -1, rc));
85 85
    goto error_common;
86 86

  
87 87
error_common:
src/rm/RequestManagerClusterAllocate.cc
95 95
    goto error_common;
96 96

  
97 97
error_cluster_allocate:
98
    oss.str(action_error(method_name, "CREATE", "CLUSTER", NULL, rc));
98
    oss.str(action_error(method_name, "CREATE", "CLUSTER", -1, rc));
99 99
    goto error_common;
100 100

  
101 101
error_common:
src/rm/RequestManagerClusterPoolInfo.cc
76 76
    goto error_common;
77 77

  
78 78
error_dump:
79
    oss.str(get_error(method_name, "CLUSTER", NULL));
79
    oss.str(get_error(method_name, "CLUSTER", -1));
80 80
    goto error_common;
81 81

  
82 82
error_common:
src/rm/RequestManagerHostAllocate.cc
101 101
    goto error_common;
102 102

  
103 103
error_authorize:
104
    oss.str(authorization_error(method_name, "CREATE", "HOST", rc, NULL));
104
    oss.str(authorization_error(method_name, "CREATE", "HOST", rc, -1));
105 105
    goto error_common;
106 106

  
107 107
error_host_allocate:
108
    oss.str(action_error(method_name, "CREATE", "HOST", NULL, rc));
108
    oss.str(action_error(method_name, "CREATE", "HOST", -1, rc));
109 109
    goto error_common;
110 110

  
111 111
error_common:
src/rm/RequestManagerImageDelete.cc
133 133
    goto error_common;
134 134

  
135 135
error_delete:
136
    oss.str(action_error(method_name, "DELETE", "IMAGE", iid, rc));
137
    oss << " VMs might be running on it.";
136
    oss << action_error(method_name, "DELETE", "IMAGE", iid, rc)
137
        << ". Reason: VMs might be running on it.";
138 138
    image->unlock();
139 139
    goto error_common;
140 140

  
src/rm/RequestManagerUserAllocate.cc
109 109
    goto error_common;
110 110
    
111 111
error_authorize:
112
    oss.str(authorization_error(method_name, "CREATE", "USER", rc, NULL));
112
    oss.str(authorization_error(method_name, "CREATE", "USER", rc, -1));
113 113
    goto error_common;  
114 114
     
115 115
error_duplicate:
116
    oss << action_error(method_name, "CREATE", "USER", NULL, NULL)
116
    oss << action_error(method_name, "CREATE", "USER", -1, NULL)
117 117
        << ". Reason: Existing user, cannot duplicate.";
118 118
    goto error_common;
119 119

  
120 120
error_allocate:
121
    oss.str(action_error(method_name, "CREATE", "USER", NULL, rc));
121
    oss.str(action_error(method_name, "CREATE", "USER", -1, rc));
122 122
    goto error_common;
123 123

  
124 124
error_common:
src/rm/RequestManagerVirtualNetworkAllocate.cc
97 97
    goto error_common;
98 98
    
99 99
error_vn_allocate:
100
    oss.str(action_error(method_name, "ALLOCATE", "NET", NULL, rc));
100
    oss.str(action_error(method_name, "ALLOCATE", "NET", -1, rc));
101 101
    goto error_common;
102 102

  
103 103
error_common:
src/rm/RequestManagerVirtualNetworkPublish.cc
33 33
    int                 nid;
34 34
    bool                publish_flag; 
35 35
    int                 uid;
36
    int                 rc;
37 36
    
38 37
    VirtualNetwork *    vn;
39 38

  

Also available in: Unified diff