Revision f3fc078b src/rm/RequestManagerAllocate.cc

View differences:

src/rm/RequestManagerAllocate.cc
34 34
    int                 vid, uid;
35 35
    int                 rc;
36 36

  
37
    Nebula&             nd    = Nebula::instance();
38
    ImagePool *         ipool = nd.get_ipool();
39
    VirtualNetworkPool* vnpool= nd.get_vnpool();
40
    VirtualMachinePool* vmpool= nd.get_vmpool();
41

  
42 37
    ostringstream       oss;
43 38

  
44 39
    vector<xmlrpc_c::value> arrayData;
......
96 91
                continue;
97 92
            }
98 93

  
99
            ipool->authorize_disk(vector,&ar);
94
            VirtualMachineAllocate::ipool->authorize_disk(vector,&ar);
100 95
        }
101 96

  
102 97
        num = vm_template->get("NIC",vectors);
......
110 105
                continue;
111 106
            }
112 107

  
113
            vnpool->authorize_nic(vector,&ar);
108
            VirtualMachineAllocate::vnpool->authorize_nic(vector,&ar);
114 109
        }
115 110

  
116 111
        ar.add_auth(AuthRequest::VM,
......
128 123
    //--------------------------------------------------------------------------
129 124
    //   Allocate the VirtualMAchine
130 125
    //--------------------------------------------------------------------------
131
    rc = vmpool->allocate(uid,vm_template,&vid,false);
126
    rc = VirtualMachineAllocate::vmpool->allocate(uid,vm_template,&vid,false);
132 127

  
133 128
    if ( rc < 0 )
134 129
    {
......
157 152
    goto error_common;
158 153

  
159 154
error_parse:
160
    oss.str(action_error(method_name, "PARSE", "VM TEMPLATE",-2,rc));
155
    oss << action_error(method_name, "PARSE", "VM TEMPLATE",-2,rc);
161 156
    if (error_msg != 0)
162 157
    {
163
        oss << "Reason: " << error_msg;
158
        oss << ". Reason: " << error_msg;
164 159
        free(error_msg);
165 160
    }
166 161

  

Also available in: Unified diff