Change 'passive_checks_enabled' to Int

Change-Id: I4ee334e8ff922411a90b60578e016a43378290e9
This commit is contained in:
aviau 2015-07-24 11:26:16 -04:00
parent da45205cb0
commit 628f1baa56
4 changed files with 12 additions and 1 deletions

View File

@ -54,5 +54,5 @@ EXPOSE 5311
CMD cd /opt/surveil && \
./setup.sh && \
((sleep 40 && surveil-init --influxdb --packs --mongodb) &) && \
((sleep 50 && surveil-init --influxdb --packs --mongodb) &) && \
surveil-api

View File

@ -53,6 +53,8 @@ class Host(types.Base):
retry_interval = wsme.wsattr(int, mandatory=False)
passive_checks_enabled = wsme.wsattr(wtypes.text, mandatory=False)
# TODO(aviau): Custom fields starting without '_' should raise an error.
custom_fields = wsme.wsattr(
wtypes.DictType(wtypes.text, wtypes.text),

View File

@ -34,3 +34,4 @@ class Host(mongoengine.Document):
check_interval = mongoengine.IntField()
retry_interval = mongoengine.IntField()
custom_fields = mongoengine.DictField()
passive_checks_enabled = mongoengine.StringField()

View File

@ -133,6 +133,14 @@ def main():
service_description="check-ws-arbiter"
)
# Passive checks host
cli_surveil.config.hosts.create(
host_name='passive_check_host',
use=['generic-host'],
address='127.0.0.1',
passive_checks_enabled='1'
)
# Linux-keystone template
cli_surveil.config.hosts.create(
host_name='test_keystone',