def start_session(self, result):

        try:
            self.params['test_plan'] = self.session['testplan']['id']
            status = self.controller.module_registry.status(
                module_name='Injection',
                **self.params)
            if status['state'] != "running":
                self.controller.module_registry.start(
                    module_name='Injection',
                    **self.params)
            else:
                self.response.set_code(501)
                self.response.set_message({'Busy': status})
        except KeyError:
            pass

        try:
            profile_id = self.session['qosProfile']
#            profile_id = self.session['qosProfile']['id']
            self.params['profile_id'] = profile_id
            status = self.controller.module_registry.status(
                module_name='QOS',
                **self.params)
            if status['state'] != "running":
                self.controller.module_registry.start(
                    module_name='QOS',
                    **self.params)
            else:
                self.response.set_code(501)
                self.response.set_message({'Busy': status})
        except KeyError:
            pass

        try:
            profile_id = self.session['serverOverloadProfile']
#            profile_id = self.session['serverOverloadProfile']['id']
            self.params['profile_id'] = profile_id
            status = self.controller.module_registry.status(
                module_name='ServerOverload',
                **self.params)

            if status['state'] != "running":
                self.controller.module_registry.start(
                    module_name='ServerOverload',
                    **self.params)
            else:
                self.response.set_code(501)
                self.response.set_message({'Busy': status})
        except __HOLE__:
            pass

        self.response.set_message({'Started Injection Session':
                                  [self.response.get_message()]})
dataset/ETHPy150Open emccode/heliosburn/heliosburn/proxy/service/api.py/StartSession.start_session