Esempio n. 1
0
 def __init__(self, model, ident):
     super(VM, self).__init__(model, ident)
     self.update_params = ["name"]
     self.screenshot = VMScreenShot(model, ident)
     self.uri_fmt = '/vms/%s'
     for ident, node in sub_nodes.items():
         setattr(self, ident, node(model, self.ident))
     self.start = self.generate_action_handler('start')
     self.stop = self.generate_action_handler('stop')
     self.connect = self.generate_action_handler('connect')
Esempio n. 2
0
 def __init__(self, model, ident):
     super(VM, self).__init__(model, ident)
     self.update_params = ["name"]
     self.screenshot = VMScreenShot(model, ident)
     self.uri_fmt = '/vms/%s'
     for ident, node in sub_nodes.items():
         setattr(self, ident, node(model, self.ident))
     self.start = self.generate_action_handler('start')
     self.stop = self.generate_action_handler('stop')
     self.connect = self.generate_action_handler('connect')
Esempio n. 3
0
 def __init__(self, model, ident):
     super(VM, self).__init__(model, ident)
     self.update_params = ["name", "users", "groups", "cpus", "memory"]
     self.screenshot = VMScreenShot(model, ident)
     self.uri_fmt = '/vms/%s'
     for ident, node in sub_nodes.items():
         setattr(self, ident, node(model, self.ident))
     self.start = self.generate_action_handler('start')
     self.poweroff = self.generate_action_handler('poweroff')
     self.shutdown = self.generate_action_handler('shutdown')
     self.reset = self.generate_action_handler('reset')
     self.connect = self.generate_action_handler('connect')
Esempio n. 4
0
 def __init__(self, model, ident):
     super(VM, self).__init__(model, ident)
     self.role_key = 'guests'
     self.screenshot = VMScreenShot(model, ident)
     self.uri_fmt = '/vms/%s'
     for ident, node in sub_nodes.items():
         setattr(self, ident, node(model, self.ident))
     self.start = self.generate_action_handler('start')
     self.poweroff = self.generate_action_handler('poweroff',
                                                  destructive=True)
     self.shutdown = self.generate_action_handler('shutdown',
                                                  destructive=True)
     self.reset = self.generate_action_handler('reset',
                                               destructive=True)
     self.connect = self.generate_action_handler('connect')
     self.clone = self.generate_action_handler_task('clone')