Fix mongodb collection name
Change-Id: I9feaa13529a0e96f7485b73ec88cda964bbc7980
This commit is contained in:
parent
3ed73dc0b2
commit
714ff4b4f7
@ -26,7 +26,7 @@ class HostHandler(handler.Handler):
|
|||||||
|
|
||||||
def get(self, host_name):
|
def get(self, host_name):
|
||||||
"""Return a host."""
|
"""Return a host."""
|
||||||
mongo_s = self.request.mongo_connection.shinken_live.hosts.find_one(
|
mongo_s = self.request.mongo_connection.alignak_live.hosts.find_one(
|
||||||
{"host_name": host_name}
|
{"host_name": host_name}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -46,10 +46,10 @@ class HostHandler(handler.Handler):
|
|||||||
|
|
||||||
if fields != {}:
|
if fields != {}:
|
||||||
mongo_dicts = (self.request.mongo_connection.
|
mongo_dicts = (self.request.mongo_connection.
|
||||||
shinken_live.hosts.find(query, fields))
|
alignak_live.hosts.find(query, fields))
|
||||||
else:
|
else:
|
||||||
mongo_dicts = (self.request.mongo_connection.
|
mongo_dicts = (self.request.mongo_connection.
|
||||||
shinken_live.hosts.find(query))
|
alignak_live.hosts.find(query))
|
||||||
|
|
||||||
host_dicts = [
|
host_dicts = [
|
||||||
_host_dict_from_mongo_item(s) for s in mongo_dicts
|
_host_dict_from_mongo_item(s) for s in mongo_dicts
|
||||||
|
@ -26,7 +26,7 @@ class ServiceHandler(handler.Handler):
|
|||||||
|
|
||||||
def get(self, host_name, service_description):
|
def get(self, host_name, service_description):
|
||||||
"""Return a specific service."""
|
"""Return a specific service."""
|
||||||
mongo_s = self.request.mongo_connection.shinken_live.services.find_one(
|
mongo_s = self.request.mongo_connection.alignak_live.services.find_one(
|
||||||
{"host_name": host_name,
|
{"host_name": host_name,
|
||||||
"service_description": service_description},
|
"service_description": service_description},
|
||||||
)
|
)
|
||||||
@ -46,10 +46,10 @@ class ServiceHandler(handler.Handler):
|
|||||||
|
|
||||||
if fields != {}:
|
if fields != {}:
|
||||||
mongo_dicts = (self.request.mongo_connection.
|
mongo_dicts = (self.request.mongo_connection.
|
||||||
shinken_live.services.find(query, fields))
|
alignak_live.services.find(query, fields))
|
||||||
else:
|
else:
|
||||||
mongo_dicts = (self.request.mongo_connection.
|
mongo_dicts = (self.request.mongo_connection.
|
||||||
shinken_live.services.find(query))
|
alignak_live.services.find(query))
|
||||||
|
|
||||||
service_dicts = [
|
service_dicts = [
|
||||||
_service_dict_from_mongo_item(s) for s in mongo_dicts
|
_service_dict_from_mongo_item(s) for s in mongo_dicts
|
||||||
|
@ -72,7 +72,7 @@ class TestStatusHosts(functionalTest.FunctionalTest):
|
|||||||
"services": [],
|
"services": [],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
self.mongoconnection.shinken_live.hosts.insert(
|
self.mongoconnection.alignak_live.hosts.insert(
|
||||||
copy.deepcopy(self.host)
|
copy.deepcopy(self.host)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ class TestStatusHosts(functionalTest.FunctionalTest):
|
|||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
self.mongoconnection.shinken_live.services.insert(
|
self.mongoconnection.alignak_live.services.insert(
|
||||||
copy.deepcopy(self.services)
|
copy.deepcopy(self.services)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ class TestStatusServices(functionalTest.FunctionalTest):
|
|||||||
"problem_has_been_acknowledged": False,
|
"problem_has_been_acknowledged": False,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
self.mongoconnection.shinken_live.services.insert(
|
self.mongoconnection.alignak_live.services.insert(
|
||||||
copy.deepcopy(self.services)
|
copy.deepcopy(self.services)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ RUN cd /tmp && \
|
|||||||
|
|
||||||
# mod-mongo-live-config
|
# mod-mongo-live-config
|
||||||
RUN cd /tmp && \
|
RUN cd /tmp && \
|
||||||
wget -O mod-mongo-live-config.tar.gz https://github.com/savoirfairelinux/mod-mongo-live-config/archive/0.3.0.tar.gz && \
|
wget -O mod-mongo-live-config.tar.gz https://github.com/savoirfairelinux/mod-mongo-live-config/archive/0.3.2.tar.gz && \
|
||||||
tar -zxvf mod-mongo-live-config.tar.gz && \
|
tar -zxvf mod-mongo-live-config.tar.gz && \
|
||||||
mv /tmp/mod-mongo-live-config-*/mod_mongo_live_config /var/lib/alignak/modules/mod_mongo_live_config && \
|
mv /tmp/mod-mongo-live-config-*/mod_mongo_live_config /var/lib/alignak/modules/mod_mongo_live_config && \
|
||||||
rm -rfv /tmp/mod-mongo-live-config*
|
rm -rfv /tmp/mod-mongo-live-config*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user