isingleton vmmaneger. get with VMManager.getInstance()
/sdvm_started endpoint isSDVMStarted() methon in VMManager
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')