예제 #1
0
 def createVm(self, vmParams, vmRecover=False):
     with self.vmContainerLock:
         if not vmRecover:
             if vmParams['vmId'] in self.vmContainer:
                 return errCode['exist']
         vm = Vm(self, vmParams, vmRecover)
         self.vmContainer[vmParams['vmId']] = vm
     vm.run()
     return {'status': doneCode, 'vmList': vm.status()}
예제 #2
0
파일: clientIF.py 프로젝트: borisroman/vdsm
 def createVm(self, vmParams, vmRecover=False):
     with self.vmContainerLock:
         if not vmRecover:
             if vmParams['vmId'] in self.vmContainer:
                 return errCode['exist']
         vm = Vm(self, vmParams, vmRecover)
         self.vmContainer[vmParams['vmId']] = vm
     vm.run()
     return {'status': doneCode, 'vmList': vm.status()}
예제 #3
0
파일: clientIF.py 프로젝트: kanalun/vdsm
 def createVm(self, vmParams, vmRecover=False):
     with self.vmContainerLock:
         if not vmRecover:
             if vmParams['vmId'] in self.vmContainer:
                 return errCode['exist']
         vm = Vm(self, vmParams, vmRecover)
         self.vmContainer[vmParams['vmId']] = vm
     return vm.run()
예제 #4
0
파일: clientIF.py 프로젝트: mpavlase/vdsm
 def createVm(self, vmParams, vmRecover=False):
     with self.vmContainerLock:
         self.log.info("vmContainerLock acquired by vm %s",
                       vmParams['vmId'])
         try:
             if not vmRecover:
                 if vmParams['vmId'] in self.vmContainer:
                     self.log.warning('vm %s already exists' %
                                      vmParams['vmId'])
                     return errCode['exist']
             vm = Vm(self, vmParams, vmRecover)
             self.vmContainer[vmParams['vmId']] = vm
         finally:
             container_len = len(self.vmContainer)
     vm.run()
     self.log.debug("Total desktops after creation of %s is %d" %
                    (vmParams['vmId'], container_len))
     return {'status': doneCode, 'vmList': vm.status()}
예제 #5
0
파일: clientIF.py 프로젝트: futurice/vdsm
 def createVm(self, vmParams, vmRecover=False):
     with self.vmContainerLock:
         self.log.info("vmContainerLock acquired by vm %s",
                       vmParams['vmId'])
         try:
             if not vmRecover:
                 if vmParams['vmId'] in self.vmContainer:
                     self.log.warning('vm %s already exists' %
                                      vmParams['vmId'])
                     return errCode['exist']
             vm = Vm(self, vmParams, vmRecover)
             self.vmContainer[vmParams['vmId']] = vm
         finally:
             container_len = len(self.vmContainer)
     vm.run()
     self.log.debug("Total desktops after creation of %s is %d" %
                    (vmParams['vmId'], container_len))
     return {'status': doneCode, 'vmList': vm.status()}
예제 #6
0
 def createVm(self, vmParams, vmRecover=False):
     with self.vmContainerLock:
         if not vmRecover:
             if vmParams['vmId'] in self.vmContainer:
                 return errCode['exist']
         vm = Vm(self, vmParams, vmRecover)
         ret = vm.run()
         if not response.is_error(ret):
             self.vmContainer[vmParams['vmId']] = vm
         return ret
예제 #7
0
 def createVm(self, vmParams, vmRecover=False):
     with self.vmContainerLock:
         if not vmRecover:
             if vmParams['vmId'] in self.vmContainer:
                 return errCode['exist']
         vm = Vm(self, vmParams, vmRecover)
         ret = vm.run()
         if not response.is_error(ret):
             self.vmContainer[vmParams['vmId']] = vm
         return ret