Revision 0a132883 include/RequestManagerAllocate.h

View differences:

include/RequestManagerAllocate.h
48 48

  
49 49
    void request_execute(xmlrpc_c::paramList const& _paramList);
50 50

  
51
    bool allocate_authorization(Template * obj_template);
51
    virtual bool allocate_authorization(Template * obj_template);
52 52

  
53 53
    string allocate_error (char *error);
54 54

  
......
67 67
    bool do_template;
68 68
};
69 69

  
70

  
71
/* ------------------------------------------------------------------------- */
72
/* ------------------------------------------------------------------------- */
73

  
74
class VirtualMachineAllocate: public RequestManagerAllocate
75
{
76
public:
77
    VirtualMachineAllocate():
78
        RequestManagerAllocate("VirtualMachineAllocate",
79
                               "Allocates a new virtual machine",
80
                               "A:ss",
81
                               true)
82
    {    
83
        Nebula& nd = Nebula::instance();
84
        pool       = nd.get_vmpool();
85
        auth_object = AuthRequest::VM;
86
    };
87

  
88
    ~VirtualMachineAllocate(){};
89
    /* --------------------------------------------------------------------- */
90

  
91
    Template * get_object_template() 
92
    { 
93
        return new VirtualMachineTemplate; 
94
    };
95

  
96
    int pool_allocate(xmlrpc_c::paramList const& _paramList, 
97
                      Template * tmpl,
98
                      int& id, 
99
                      string& error_str);
100

  
101
    bool allocate_authorization(Template * obj_template);
102
};
103

  
70 104
/* ------------------------------------------------------------------------- */
71 105
/* ------------------------------------------------------------------------- */
72 106

  
......
163 197
                      string& error_str);
164 198
};
165 199

  
166

  
167 200
/* ------------------------------------------------------------------------- */
168 201
/* ------------------------------------------------------------------------- */
169 202

  
......
246 279
{
247 280
public:
248 281
    GroupAllocate():
249
        RequestManagerAllocate("GroupInfo",
282
        RequestManagerAllocate("GroupAllocate",
250 283
                               "Allocates a new group",
251 284
                               "A:ss",
252 285
                               false)

Also available in: Unified diff