Skip to content
Snippets Groups Projects
internal_controller.py 2.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • David Trattnig's avatar
    David Trattnig committed
    #
    # Aura Engine API (https://gitlab.servus.at/aura/engine-api)
    #
    # Copyright (C) 2020 - The Aura Engine Team.
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU Affero General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # This program 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 Affero General Public License for more details.
    #
    # You should have received a copy of the GNU Affero General Public License
    # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    
    
    David Trattnig's avatar
    David Trattnig committed
    import connexion
    import six
    
    
    from src.rest.models.health_info import HealthInfo  # noqa: E501
    from src.rest.models.play_log_entry import PlayLogEntry  # noqa: E501
    from src.rest.models.status_entry import StatusEntry  # noqa: E501
    from src.rest import util
    
    David Trattnig's avatar
    David Trattnig committed
    
    
    David Trattnig's avatar
    David Trattnig committed
    from src.service.playlist_service import playlistService
    from src.service.track_service import trackService
    from src.service.engine_service import engineService
    
    David Trattnig's avatar
    David Trattnig committed
    
    
    David Trattnig's avatar
    David Trattnig committed
    
    def get_report(year_month):  # noqa: E501
        """Report for one month
    
        Returns a report for the given month  # noqa: E501
    
        :param year_month: Month to create the report for in the format \&quot;yyyy_mm\&quot;
        :type year_month: str
    
        :rtype: List[PlayLogEntry]
        """
        return 'do some magic!'
    
    
    def activate_engine(engine_number):  # noqa: E501
        """Set active engine
    
        Activates one engine and deactivates the other  # noqa: E501
    
        :param engine_number: Number of the engine
        :type engine_number: int
    
        :rtype: None
        """
        return 'do some magic!'
    
    
    
    David Trattnig's avatar
    David Trattnig committed
    def get_active_engine():  # noqa: E501
        """Get active engine
    
        Retrieves the status entry of the currently active engine  # noqa: E501
    
    
        :rtype: StatusEntry
        """
        return 'do some magic!'
    
    
    
    def get_engine_health(engine_number):  # noqa: E501
        """Get most recent health info
    
        Retrieves the most recent health info of the requested engine  # noqa: E501
    
        :param engine_number: Number of the engine
        :type engine_number: int
    
        :rtype: HealthInfo
        """
        return 'do some magic!'
    
    
    def log_engine_health(engine_number):  # noqa: E501
        """Log health info
    
        Logs another health entry for the given engine  # noqa: E501
    
        :param engine_number: Number of the engine
        :type engine_number: int
    
        :rtype: None
        """
        return 'do some magic!'