hardcoded service status fixed
import datetime
from aiohttp import web
+from foglamp.common.service_record import ServiceRecord
from foglamp.services.core.service_registry.service_registry import ServiceRegistry
from foglamp.common.storage_client.payload_builder import PayloadBuilder
from foglamp.common.configuration_manager import ConfigurationManager
@@ -42,7 +43,8 @@ def get_service_records():
'management_port': service_record._management_port,
'service_port': service_record._port,
'protocol': service_record._protocol,
- 'status': 'running'
+ 'status': ServiceRecord.Status(int(service_record._status)).name.lower()
+
})
recs = {'services' : sr_list}
return recs
