isingleton vmmaneger. get with VMManager.getInstance()
authormb
Tue, 10 Dec 2013 14:56:11 +0100
changeset 35ba1ca3e5870b
parent 34 fe5fb244f008
parent 33 79ed9495fa88
child 36 cc6abcf9108b
isingleton vmmaneger. get with VMManager.getInstance()
/sdvm_started endpoint isSDVMStarted() methon in VMManager
OpenSecurity/bin/opensecurityd.py
OpenSecurity/bin/vmmanager.py
     1.1 --- a/OpenSecurity/bin/opensecurityd.py	Tue Dec 10 14:50:14 2013 +0100
     1.2 +++ b/OpenSecurity/bin/opensecurityd.py	Tue Dec 10 14:56:11 2013 +0100
     1.3 @@ -73,7 +73,6 @@
     1.4  # Global VMManager instance
     1.5  gvm_mgr = VMManager.getInstance()
     1.6  
     1.7 -
     1.8  # ------------------------------------------------------------
     1.9  # code
    1.10  
     2.1 --- a/OpenSecurity/bin/vmmanager.py	Tue Dec 10 14:50:14 2013 +0100
     2.2 +++ b/OpenSecurity/bin/vmmanager.py	Tue Dec 10 14:56:11 2013 +0100
     2.3 @@ -49,6 +49,12 @@
     2.4      #        cls._instance = super(VMManager, cls).__new__(cls, *args, **kwargs)
     2.5      #    return cls._instance
     2.6      
     2.7 +    _instance = None
     2.8 +    #def __new__(cls, *args, **kwargs):
     2.9 +    #    if not cls._instance:
    2.10 +    #        cls._instance = super(VMManager, cls).__new__(cls, *args, **kwargs)
    2.11 +    #    return cls._instance
    2.12 +    
    2.13      def __init__(self):
    2.14          self.cygwin_path = os.path.join(Cygwin.root(), 'bin') + os.path.sep
    2.15          self.vboxManage = os.path.join(self.getVBoxManagePath(), 'VBoxManage')