From 4f4f2edae36361e5c2660eed83e964ea56031cfc Mon Sep 17 00:00:00 2001 From: Timur Nurlygayanov Date: Mon, 1 Apr 2013 13:32:07 +0400 Subject: [PATCH] Add logging to WebUI. --- conductor/tests/conductor/test_methods.py | 13 +++++++++++++ conductor/tests/conductor/test_with_fake_service.py | 11 +++++++++++ tabula/tabula/windc/tables.py | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/conductor/tests/conductor/test_methods.py b/conductor/tests/conductor/test_methods.py index e69de29b..5234c1e3 100644 --- a/conductor/tests/conductor/test_methods.py +++ b/conductor/tests/conductor/test_methods.py @@ -0,0 +1,13 @@ +import unittest +from conductor.app import ConductorWorkflowService +import conductor.rabbitmq as rabbitmq +from conductor.workflow import Workflow +import conductor.xml_code_engine as engine + +class TestMethodsAndClasses(unittest.TestCase): + + def test_init_service_class(self): + con = ConductorWorkflowService() + + con.start() + con.stop() \ No newline at end of file diff --git a/conductor/tests/conductor/test_with_fake_service.py b/conductor/tests/conductor/test_with_fake_service.py index e69de29b..2c138157 100644 --- a/conductor/tests/conductor/test_with_fake_service.py +++ b/conductor/tests/conductor/test_with_fake_service.py @@ -0,0 +1,11 @@ +import unittest +from conductor.app import ConductorWorkflowService +from conductor.openstack.common import service + +class TestMethodsAndClasses(unittest.TestCase): + + def test_init_service_class(self): + launcher = service.ServiceLauncher() + con = ConductorWorkflowService() + launcher.launch_service(con) + \ No newline at end of file diff --git a/tabula/tabula/windc/tables.py b/tabula/tabula/windc/tables.py index f0c61fb8..a41e68d6 100644 --- a/tabula/tabula/windc/tables.py +++ b/tabula/tabula/windc/tables.py @@ -129,12 +129,16 @@ class UpdateServiceRow(tables.Row): def get_data(self, request, service_id): link = request.__dict__['META']['HTTP_REFERER'] datacenter_id = re.search('windc/(\S+)', link).group(0)[6:-1] + + LOG.critical(datacenter_id) service = api.services_get(request, datacenter_id, service_id) if service: service['operation'] = api. \ get_status_message_for_service(request, service_id) + LOG.critical(service) + return service