Exemple #1
0
	def __init__(self, main_instance):
		AbstractRole.__init__(self, main_instance)
		self.dialog = Dialog(self)
		self.has_run = False
		self.shares = {}
		self.wm = None
		Config.read()
Exemple #2
0
    def order_stop(self):
        AbstractRole.order_stop(self)

        for session in self.sessions.values():
            self.manager.session_switch_status(
                session, Session.SESSION_STATUS_WAIT_DESTROY)
            self.spool_action("destroy", session.id)
Exemple #3
0
    def force_stop(self):
        AbstractRole.force_stop(self)

        for thread in self.threads:
            thread.terminate()

        for thread in self.threads:
            thread.join()
Exemple #4
0
	def force_stop(self):
		AbstractRole.force_stop(self)
		
		for thread in self.threads:
			thread.terminate()
		
		for thread in self.threads:
			thread.join()
Exemple #5
0
	def __init__(self, main_instance):
		AbstractRole.__init__(self, main_instance)
		
		self.server = None
		self.ssl_ctx = None
		self.processes = {}
		
		self.kill_mutex = threading.Lock()
Exemple #6
0
    def __init__(self, main_instance):
        AbstractRole.__init__(self, main_instance)

        self.server = None
        self.ssl_ctx = None
        self.processes = {}

        self.kill_mutex = threading.Lock()
Exemple #7
0
    def __init__(self, main_instance):
        AbstractRole.__init__(self, main_instance)

        self.server = None
        self.ssl_ctx = None
        self.processes = {}

        self.kill_mutex = threading.Lock()
        self.sessions_repo = SessionsRepository.initialize()
        self.apps_repo = ApplicationsRepository.initialize()
Exemple #8
0
	def __init__(self, main_instance):
		
		AbstractRole.__init__(self, main_instance)
		self.virt_co = libvirt.open(Config.libvirt_uri)
		self.has_run = False
		self.queue = Queue.Queue()
		self.pool = Pool(Config.ulteo_pool_name,self.virt_co)
		self.virtual_machine = {}
		self.network = Network(Config.network_name, self.virt_co)
		self.webserver = None
Exemple #9
0
	def force_stop(self):
		AbstractRole.force_stop(self)
		
		for vm in self.virtual_machine :
			vm = self.virtual_machine[vm]
			
			if vm.getStatus() == "RUNNING" :
				vm.shutdown()
				
		self.webserver.server_close()
Exemple #10
0
	def __init__(self, main_instance):
		AbstractRole.__init__(self, main_instance)
		
		self.server = None
		self.ssl_ctx = None
		self.processes = {}
		
		self.kill_mutex = threading.Lock()
		self.sessions_repo = SessionsRepository.initialize()
		self.apps_repo = ApplicationsRepository.initialize()
Exemple #11
0
	def __init__(self, main_instance):
		
		AbstractRole.__init__(self, main_instance)
		Logger.info("Guest role::__init__")
		
		self.loop = True
		self.url = None
		self.host = Conf.hypervisor
		self.port = "1112"
		self.session = None
		self.session_spooler = multiprocessing.Queue()
		self.session_sync = multiprocessing.Queue()
		self.manager = Manager(self.main_instance.smRequestManager)
		self.session_manager = SessionManagement(self.manager, self.session_spooler, self.session_sync)
		self.current_session_status = None
Exemple #12
0
    def __init__(self, main_instance):

        AbstractRole.__init__(self, main_instance)
        Logger.info("Guest role::__init__")

        self.loop = True
        self.url = None
        self.host = Conf.hypervisor
        self.port = "1112"
        self.session = None
        self.session_spooler = multiprocessing.Queue()
        self.session_sync = multiprocessing.Queue()
        self.manager = Manager(self.main_instance.smRequestManager)
        self.session_manager = SessionManagement(self.manager,
                                                 self.session_spooler,
                                                 self.session_sync)
        self.current_session_status = None
Exemple #13
0
	def __init__(self, main_instance):
		AbstractRole.__init__(self, main_instance)
		self.dialog = Dialog(self)
		Logger._instance.close()
		self.sessions = {}
		self.locked_sessions = []
		self.sessions_spooler = MPQueue.Queue()
		self.sessions_spooler2 = MPQueue.Queue()
		self.sessions_sync = MPQueue.Queue()
		self.logging_queue = MPQueue.Queue()

		self.manager = Manager(self.main_instance.smRequestManager)
		self.threads = []
		
		self.applications = {}
		self.applications_id_SM = {}
		self.applications_mutex = threading.Lock()
		
		self.has_run = False
		
		self.static_apps = RolePlatform.ApplicationsStatic(self.main_instance.smRequestManager)
		self.static_apps_must_synced = False
		self.static_apps_lock = threading.Lock()
Exemple #14
0
	def __init__(self, main_instance):
		AbstractRole.__init__(self, main_instance)
		self.sessions = {}
		self.locked_sessions = []
		self.sessions_spooler = MPQueue.Queue()
		self.sessions_spooler2 = MPQueue.Queue()
		self.sessions_sync = MPQueue.Queue()
		self.logging_queue = MPQueue.Queue()
		
		self.manager = Manager(self.main_instance.smRequestManager)
		self.threads = []
		
		self.applications = {}
		self.applications_id_SM = {}
		self.applications_mutex = threading.Lock()
		
		self.static_apps = ApplicationsStatic(self.main_instance.smRequestManager)
		self.static_apps_must_synced = False
		self.static_apps_lock = threading.Lock()
		
		self.scripts = Scripts(self.main_instance.smRequestManager)
		self.scripts_lock = threading.Lock()
		self.scripts_must_synced = False
Exemple #15
0
    def __init__(self, main_instance):
        AbstractRole.__init__(self, main_instance)
        self.sessions = {}
        self.locked_sessions = []
        self.sessions_spooler = MPQueue.Queue()
        self.sessions_spooler2 = MPQueue.Queue()
        self.sessions_sync = MPQueue.Queue()
        self.logging_queue = MPQueue.Queue()

        self.manager = Manager(self.main_instance.smRequestManager)
        self.threads = []

        self.applications = {}
        self.applications_id_SM = {}
        self.applications_mutex = threading.Lock()

        self.static_apps = ApplicationsStatic(
            self.main_instance.smRequestManager)
        self.static_apps_must_synced = False
        self.static_apps_lock = threading.Lock()

        self.scripts = Scripts(self.main_instance.smRequestManager)
        self.scripts_lock = threading.Lock()
        self.scripts_must_synced = False
Exemple #16
0
    def __init__(self, main_instance):
        AbstractRole.__init__(self, main_instance)
        self.dialog = Dialog(self)
        Logger._instance.close()
        self.sessions = {}
        self.locked_sessions = []
        self.sessions_spooler = MPQueue.Queue()
        self.sessions_spooler2 = MPQueue.Queue()
        self.sessions_sync = MPQueue.Queue()
        self.logging_queue = MPQueue.Queue()

        self.manager = Manager(self.main_instance.smRequestManager)
        self.threads = []

        self.applications = {}
        self.applications_id_SM = {}
        self.applications_mutex = threading.Lock()

        self.has_run = False

        self.static_apps = RolePlatform.ApplicationsStatic(
            self.main_instance.smRequestManager)
        self.static_apps_must_synced = False
        self.static_apps_lock = threading.Lock()
Exemple #17
0
 def __init__(self, main_instance):
     AbstractRole.__init__(self, main_instance)
     Logger.info("Dummy role::__init__")
Exemple #18
0
	def order_stop(self):
		AbstractRole.order_stop(self)
		
		self.session_manager.looping = False
		self.loop = False
Exemple #19
0
    def order_stop(self):
        AbstractRole.order_stop(self)

        self.session_manager.looping = False
        self.loop = False
Exemple #20
0
	def __init__(self, main_instance):
		AbstractRole.__init__(self, main_instance)
		Logger.info("Dummy role::__init__")
Exemple #21
0
	def __init__(self, main_instance):
		AbstractRole.__init__(self, main_instance)
		self.shares = {}
		self.FSBackend = FSBackend()
Exemple #22
0
	def force_stop(self):
		AbstractRole.force_stop(self)
		self.server.shutdown()
		for pid in list(self.processes):
			self.kill_process(pid)
Exemple #23
0
 def force_stop(self):
     AbstractRole.force_stop(self)
     self.server.shutdown()
     for pid in list(self.processes):
         self.kill_process(pid)
Exemple #24
0
 def order_stop(self):
     AbstractRole.order_stop(self)
     self.force_stop()
Exemple #25
0
	def order_stop(self):
		AbstractRole.order_stop(self)
		self.force_stop()
Exemple #26
0
 def __init__(self, main_instance):
     AbstractRole.__init__(self, main_instance)
     self.dialog = Dialog(self)
     self.has_run = False
     self.shares = {}
     self.wm = None
Exemple #27
0
 def __init__(self, main_instance):
     AbstractRole.__init__(self, main_instance)
     self.shares = {}
     self.FSBackend = FSBackend()
Exemple #28
0
	def order_stop(self):
		AbstractRole.order_stop(self)
		
		for session in self.sessions.values():
			self.manager.session_switch_status(session, Session.SESSION_STATUS_WAIT_DESTROY)
			self.spool_action("destroy", session.id)