Skip to content
Snippets Groups Projects
Commit f182682e authored by Thomas Jürges's avatar Thomas Jürges
Browse files

Task #11047: Committing changes related to merging Epic into my task branch

parents f4537564 eeddc6c3
No related branches found
No related tags found
No related merge requests found
Showing
with 167 additions and 4 deletions
......@@ -3952,6 +3952,30 @@ MAC/Navigator2/scripts/readStationConfigs.ctl -text
MAC/Navigator2/scripts/readStationConnections.ctl -text
MAC/Navigator2/scripts/setSumAlerts.ctl -text
MAC/Navigator2/scripts/transferMPs.ctl -text
MAC/Services/TaskManagement/CMakeLists.txt -text
MAC/Services/TaskManagement/Client/CMakeLists.txt -text
MAC/Services/TaskManagement/Client/lib/CMakeLists.txt -text
MAC/Services/TaskManagement/Client/lib/__init__.py -text
MAC/Services/TaskManagement/Client/lib/taskmanagement_rpc.py -text
MAC/Services/TaskManagement/Client/test/CMakeLists.txt -text
MAC/Services/TaskManagement/Client/test/t_taskmanagement_rpc.py -text
MAC/Services/TaskManagement/Client/test/t_taskmanagement_rpc.run -text
MAC/Services/TaskManagement/Client/test/t_taskmanagement_rpc.sh -text
MAC/Services/TaskManagement/Common/CMakeLists.txt -text
MAC/Services/TaskManagement/Common/__init__.py -text
MAC/Services/TaskManagement/Common/config.py -text
MAC/Services/TaskManagement/README -text
MAC/Services/TaskManagement/Server/CMakeLists.txt -text
MAC/Services/TaskManagement/Server/bin/CMakeLists.txt -text
MAC/Services/TaskManagement/Server/bin/taskmanagement -text
MAC/Services/TaskManagement/Server/bin/taskmanagement.ini -text
MAC/Services/TaskManagement/Server/lib/CMakeLists.txt -text
MAC/Services/TaskManagement/Server/lib/__init__.py -text
MAC/Services/TaskManagement/Server/lib/taskmanagement.py -text
MAC/Services/TaskManagement/Server/test/CMakeLists.txt -text
MAC/Services/TaskManagement/Server/test/t_taskmanagement.py -text
MAC/Services/TaskManagement/Server/test/t_taskmanagement.run -text
MAC/Services/TaskManagement/Server/test/t_taskmanagement.sh -text
MAC/Services/src/ObservationControl2.py -text
MAC/Services/src/config.py -text
MAC/Services/src/observation_control_rpc.py -text
......@@ -4860,10 +4884,10 @@ SAS/ResourceAssignment/ResourceAssigner/bin/resourceassigner -text
SAS/ResourceAssignment/ResourceAssigner/bin/resourceassigner.ini -text
SAS/ResourceAssignment/ResourceAssigner/lib/CMakeLists.txt -text
SAS/ResourceAssignment/ResourceAssigner/lib/__init__.py -text
SAS/ResourceAssignment/ResourceAssigner/lib/assignment.py -text
SAS/ResourceAssignment/ResourceAssigner/lib/config.py -text
SAS/ResourceAssignment/ResourceAssigner/lib/rabuslistener.py -text
SAS/ResourceAssignment/ResourceAssigner/lib/raservice.py -text
SAS/ResourceAssignment/ResourceAssigner/lib/resource_assigner.py -text
SAS/ResourceAssignment/ResourceAssigner/lib/resource_availability_checker.py -text
SAS/ResourceAssignment/ResourceAssigner/lib/schedulechecker.py -text
SAS/ResourceAssignment/ResourceAssigner/lib/schedulers.py -text
......@@ -5304,7 +5328,9 @@ SAS/SpecificationServices/test/t_telescope_model_xml_generator_type1.in_xml/tele
SAS/SpecificationServices/test/t_telescope_model_xml_generator_type1.py -text
SAS/SpecificationServices/test/t_telescope_model_xml_generator_type1.run -text
SAS/SpecificationServices/test/t_telescope_model_xml_generator_type1.sh -text
SAS/SpecificationServices/test/t_translation_service.in_xml/telescope_model_xml_generator_type1-minmax.xml -text
SAS/SpecificationServices/test/t_translation_service.in_xml/telescope_model_xml_generator_type1.xml -text
SAS/SpecificationServices/test/t_translation_service.in_xml/type-1-lofar-minmax.xml -text
SAS/SpecificationServices/test/t_translation_service.in_xml/type-1-lofar.xml -text
SAS/SpecificationServices/test/t_translation_service.py -text
SAS/SpecificationServices/test/t_translation_service.run -text
......
# - Create for each LOFAR package a variable containing the absolute path to
# its source directory.
#
# Generated by gen_LofarPackageList_cmake.sh at do 20 apr 2017 15:52:08 CEST
# Generated by gen_LofarPackageList_cmake.sh at wo 12 jul 2017 13:22:27 CEST
#
# ---- DO NOT EDIT ----
#
......@@ -36,7 +36,6 @@ if(NOT DEFINED LOFAR_PACKAGE_LIST_INCLUDED)
set(TestDynDPPP_SOURCE_DIR ${CMAKE_SOURCE_DIR}/CEP/DP3/TestDynDPPP)
set(PythonDPPP_SOURCE_DIR ${CMAKE_SOURCE_DIR}/CEP/DP3/PythonDPPP)
set(DPPP_AOFlag_SOURCE_DIR ${CMAKE_SOURCE_DIR}/CEP/DP3/DPPP_AOFlag)
set(DPPP_DDECal_SOURCE_DIR ${CMAKE_SOURCE_DIR}/CEP/DP3/DPPP_DDECal)
set(SPW_Combine_SOURCE_DIR ${CMAKE_SOURCE_DIR}/CEP/DP3/SPWCombine)
set(AOFlagger_SOURCE_DIR ${CMAKE_SOURCE_DIR}/CEP/DP3/AOFlagger)
set(LofarFT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/CEP/Imager/LofarFT)
......@@ -142,6 +141,10 @@ if(NOT DEFINED LOFAR_PACKAGE_LIST_INCLUDED)
set(GCFTM_SOURCE_DIR ${CMAKE_SOURCE_DIR}/MAC/GCF/TM)
set(GCFPVSS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/MAC/GCF/PVSS)
set(GCFRTDB_SOURCE_DIR ${CMAKE_SOURCE_DIR}/MAC/GCF/RTDB)
set(TaskManagement_SOURCE_DIR ${CMAKE_SOURCE_DIR}/MAC/Services/TaskManagement)
set(TaskManagementClient_SOURCE_DIR ${CMAKE_SOURCE_DIR}/MAC/Services/TaskManagement/Client)
set(TaskManagementCommon_SOURCE_DIR ${CMAKE_SOURCE_DIR}/MAC/Services/TaskManagement/Common)
set(TaskManagementServer_SOURCE_DIR ${CMAKE_SOURCE_DIR}/MAC/Services/TaskManagement/Server)
set(Cobalt_SOURCE_DIR ${CMAKE_SOURCE_DIR}/RTCP/Cobalt)
set(InputProc_SOURCE_DIR ${CMAKE_SOURCE_DIR}/RTCP/Cobalt/InputProc)
set(OutputProc_SOURCE_DIR ${CMAKE_SOURCE_DIR}/RTCP/Cobalt/OutputProc)
......
......@@ -11,5 +11,6 @@ lofar_add_package(PVSS_Datapoints Deployment/data/PVSS)
lofar_add_package(OTDB_Comps Deployment/data/OTDB)
lofar_add_package(StaticMetaData Deployment/data/StaticMetaData)
lofar_add_package(WinCC_Services WinCCServices)
lofar_add_package(TaskManagement Services/TaskManagement)
......@@ -3,4 +3,4 @@
lofar_package(MAC_Services 1.0 DEPENDS PyMessaging OTDB_Services pyparameterset Docker ResourceAssignmentService)
add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(test)
\ No newline at end of file
lofar_package(TaskManagement 1.0)
lofar_add_package(TaskManagementClient Client)
lofar_add_package(TaskManagementCommon Common)
lofar_add_package(TaskManagementServer Server)
lofar_package(TaskManagementClient 1.0 DEPENDS TaskManagementCommon PyMessaging PyCommon)
lofar_find_package(Python 2.7 REQUIRED)
add_subdirectory(lib)
add_subdirectory(test)
include(PythonInstall)
set(_py_files
__init__.py
taskmanagement_rpc.py
)
python_install(${_py_files} DESTINATION lofar/mac/services/taskmanagement/client)
from taskmanagement_rpc import *
#!/usr/bin/python
from lofar.messaging.RPC import RPCWrapper
from lofar.mac.services.taskmanagement.common.config import DEFAULT_BUSNAME, DEFAULT_SERVICENAME
class TaskManagementRPC(RPCWrapper):
def __init__(self, busname=DEFAULT_BUSNAME, servicename=DEFAULT_SERVICENAME, broker=None, timeout=120, verbose=False):
super(TaskManagementRPC, self).__init__(busname=busname, servicename=servicename, broker=broker, timeout=timeout, verbose=verbose)
def abort_task(self, otdb_id):
result = self.rpc('AbortTask', otdb_id=otdb_id)
return result
# $Id: CMakeLists.txt 32333 2015-08-28 08:15:24Z schaap $
include(LofarCTest)
include(FindPythonModule)
find_python_module(mock REQUIRED)
find_python_module(uuid REQUIRED)
lofar_add_test(t_taskmanagement_rpc)
#!/usr/bin/python
# Copyright (C) 2012-2015 ASTRON (Netherlands Institute for Radio Astronomy)
# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This file is part of the LOFAR software suite.
# The LOFAR software suite is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# The LOFAR software suite is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>.
# $Id: $
import unittest
from lofar.mac.services.taskmanagement.client.taskmanagement_rpc import TaskManagementRPC
class TestTaskManagementRpc(unittest.TestCase):
otdb_id = 2345
def setUp(self):
self.rpc = TaskManagementRPC()
if __name__ == "__main__":
unittest.main()
#!/bin/bash
# Run the unit test
source python-coverage.sh
python_coverage_test "ServiceSkeleton/*" t_serviceskeleton_rpc.py
#!/bin/sh
./runctest.sh t_serviceskeleton_rpc
lofar_package(TaskManagementCommon 1.0)
lofar_find_package(Python 2.7 REQUIRED)
include(PythonInstall)
set(_py_files
__init__.py
config.py
)
python_install(${_py_files} DESTINATION lofar/mac/services/taskmanagement/common)
#!/usr/bin/python
# $Id$
from lofar.messaging import adaptNameToEnvironment
DEFAULT_BUSNAME = adaptNameToEnvironment('lofar.mac.services.taskmanagement')
DEFAULT_SERVICENAME = 'TaskManagement'
This directory contains templates for LOFAR microservices in Python. To use:
* Clone this directory into a new folder.
* Replace all occurances of "Skeleton" and "skeleton" with the name of the new service.
* Update CMake/LofarPackageList.cmake to make the new packages known to CMake.
lofar_package(TaskManagementServer 1.0 DEPENDS TaskManagementCommon OTDB_Services MAC_Services ResourceAssignmentService PyMessaging PyCommon)
lofar_find_package(Python 2.7 REQUIRED)
add_subdirectory(bin)
add_subdirectory(lib)
add_subdirectory(test)
# service
lofar_add_bin_scripts(taskmanagement)
# supervisord config files
install(FILES
taskmanagement.ini
DESTINATION etc/supervisord.d)
#!/usr/bin/python
# $Id: radbservice 33373 2016-01-22 11:01:15Z schaap $
'''
Runs the example Skeleton Service.
'''
import logging
from lofar.mac.services.taskmanagement.server import taskmanagement
logger = logging.getLogger(__name__)
if __name__ == '__main__':
taskmanagement.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment