OpenSecurity/bin/vmmanager.pyw
changeset 81 84663db906d7
parent 79 617009c32da0
child 87 d5b04809faca
     1.1 --- a/OpenSecurity/bin/vmmanager.pyw	Wed Feb 26 17:27:07 2014 +0100
     1.2 +++ b/OpenSecurity/bin/vmmanager.pyw	Thu Feb 27 11:39:37 2014 +0100
     1.3 @@ -52,7 +52,6 @@
     1.4  class VMManager(object):
     1.5      vmRootName = "SecurityDVM"
     1.6      systemProperties = None
     1.7 -    startNotifications = list()
     1.8      _instance = None
     1.9      machineFolder = ''
    1.10      rsdHandler = None
    1.11 @@ -82,12 +81,6 @@
    1.12              self.poweroffVM(vm)
    1.13              self.removeVM(vm)
    1.14          
    1.15 -    def putStartNotification(self, ip):
    1.16 -        self.startNotifications.append(ip)
    1.17 -    
    1.18 -    def isSDVMStarted(self, ip):
    1.19 -        return ip in self.startNotifications
    1.20 -    
    1.21      # return hosty system properties
    1.22      def getSystemProperties(self):
    1.23          result = Cygwin.vboxExecute('list systemproperties')
    1.24 @@ -381,15 +374,7 @@
    1.25      
    1.26      # wait for machine to come up
    1.27      def waitStartup(self, vm_name, timeout_ms = 30000):
    1.28 -        #result = Cygwin.vboxExecute('guestproperty wait ' + vm_name + ' /VirtualBox/GuestInfo/Net/0/V4/IP --timeout ' + str(timeout_ms) + ' --fail-on-timeout')
    1.29 -        
    1.30          result = Cygwin.vboxExecute('guestproperty wait ' + vm_name + ' SDVMStarted --timeout ' + str(timeout_ms) + ' --fail-on-timeout')
    1.31 -        #new_ip = VMManager.getHostOnlyIP(vm_name)
    1.32 -        #while new_ip == None:
    1.33 -        #    time.sleep(1)
    1.34 -        #    new_ip = VMManager.getHostOnlyIP(vm_name)
    1.35 -        #while not self.isSDVMStarted(new_ip):
    1.36 -        #    time.sleep(1)
    1.37          return VMManager.getHostOnlyIP(vm_name)
    1.38      
    1.39      # wait for machine to shutdown
    1.40 @@ -411,7 +396,6 @@
    1.41              if new_ip != None:
    1.42                  self.mapNetworkDrive('g:', '\\\\' + new_ip + '\\Download', None, None)
    1.43              #TODO: cleanup notifications somwhere else (eg. machine shutdown)
    1.44 -            self.startNotifications.remove(new_ip)
    1.45              VMManager.handleDeviceChangeLock.release()
    1.46          return new_sdvm
    1.47      
    1.48 @@ -548,7 +532,6 @@
    1.49                      if new_ip != None:
    1.50                          self.vmm.mapNetworkDrive(drive, '\\\\' + new_ip + '\\USB', None, None)
    1.51                      #TODO: cleanup notifications somwhere else (eg. machine shutdown)
    1.52 -                    self.vmm.startNotifications.remove(new_ip)
    1.53              #self.handleDeviceChangeLock.release()
    1.54                  
    1.55