Config API: add check modulation

Change-Id: Ic892fee3fb0b3e3d7e6348551172b0837a1315c7
This commit is contained in:
flavien.peyre
2015-05-05 17:12:21 -04:00
committed by flavien.peyre
parent bbe0ecc768
commit 90d2e81aa5
6 changed files with 288 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# Copyright 2014 - Savoir-Faire Linux 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.
import wsme
import wsme.types as wtypes
from surveil.api.datamodel import types
class CheckModulation(types.Base):
checkmodulation_name = wsme.wsattr(wtypes.text, mandatory=True)
check_command = wsme.wsattr(wtypes.text, mandatory=True)
check_period = wsme.wsattr(wtypes.text, mandatory=True)
@classmethod
def sample(cls):
return cls(
checkmodulation_name='ping_night',
check_command='check_ping_night',
check_period='night'
)