Exemple #1
0
    def data(self):

        vmm = VMManager("vmm")

        s1 = BasicServer("s1")
        s1.set_attr("system", subkey="memory", value=1000)
        s1.set_attr("system", subkey="disk", value=5000)
        s1.set_attr("system", subkey="cpucount", value=2)

        s2 = BasicServer("s2")
        s2.set_attr("system", subkey="memory", value=16000)
        s2.set_attr("system", subkey="disk", value=2500)
        s2.set_attr("system", subkey="cpucount", value=2)

        vmm.insert(s1)
        vmm.insert(s2)
Exemple #2
0
    def get_hypervisor(self):
        from clusto.drivers import VMManager

        host = VMManager.resources(self)
        if not host:
            raise DriverException("Cannot start a VM without first allocating a hypervisor")
        return host[0].value
Exemple #3
0
 def get_hypervisor(self):
     from clusto.drivers import VMManager
     host = VMManager.resources(self)
     if not host:
         raise DriverException(
             'Cannot start a VM without first allocating a hypervisor')
     return host[0].value
Exemple #4
0
    def data(self):

        vmm = VMManager('vmm')

        s1 = BasicServer('s1')
        s1.set_attr('system', subkey='memory', value=1000)
        s1.set_attr('system', subkey='disk', value=5000)
        s1.set_attr('system', subkey='cpucount', value=2)
        
        s2 = BasicServer('s2')
        s2.set_attr('system', subkey='memory', value=16000)
        s2.set_attr('system', subkey='disk', value=2500)
        s2.set_attr('system', subkey='cpucount', value=2)
        

        vmm.insert(s1)
        vmm.insert(s2)