40b50bfb11
Align the license statements with other files in this repo. Remove the proprietary statements which are inconsistent with the use of Apache-2. Include the SPDX-License-Identifier. Closes-Bug: 1979242 Change-Id: Ic20b9e896198dee37ccf12ef993e050ff9f53fc2 Signed-off-by: Michel Thebeau <Michel.Thebeau@windriver.com>
42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
# Copyright (c) 2021-2022 Wind River Systems, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
# implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
from oslo_config import cfg
|
|
from oslo_log import log as logging
|
|
from oslo_service import service
|
|
|
|
from sysinv.cert_alarm.certificate_alarm_manager import CertificateAlarmManager
|
|
|
|
CONF = cfg.CONF
|
|
LOG = logging.getLogger(__name__)
|
|
|
|
|
|
class CertificateAlarmService(service.Service):
|
|
"""Lifecycle manager for a running audit service."""
|
|
|
|
def __init__(self):
|
|
super(CertificateAlarmService, self).__init__()
|
|
self.manager = CertificateAlarmManager()
|
|
|
|
def start(self):
|
|
super(CertificateAlarmService, self).start()
|
|
self.manager.start_audits()
|
|
|
|
def stop(self):
|
|
self.manager.stop_audits()
|
|
super(CertificateAlarmService, self).stop()
|