Commit 0084ed06 authored by Jirka Hlavacek's avatar Jirka Hlavacek

Merge branch '2404-mds-peer'

parents 4c8f473f 8cb92b5a
xivo-dao (2019.04.00) xivo-callisto; urgency=medium
* 2352 Add api to create func key destination for agent
* 2371 Fix agent api by porting the following fixes
* 2375 Add a CtiProfile to user when it's not set and a login is set
* 2352 Add api to create func key destination for agent
* 2396 Remove all_mds entry from mediaserver table
* 2400 Add route tables for outcall application
* 2404 New Routing strategy for inter-mds communication
* 2415 Fix incompatibility with security patch of SQLAlechemy
-- Jean-Pierre Thomasset <jpthomasset@gmail.com> Fri, 22 Feb 2019 09:44:53 +0000
......
......@@ -747,3 +747,11 @@ def find_queue_penalties_settings(session):
res.append(tmp)
return res
@daosession
def find_all_mediaservers(session):
rows = (session.query(MediaServer)
.filter(MediaServer.voip_ip.isnot(None))
.all())
return rows
......@@ -1287,6 +1287,13 @@ class TestAsteriskConfDAO(DAOTestCase, PickupHelperMixin):
assert_that(result, contains_inanyorder(*expected_result))
def test_find_all_mediaservers(self):
self.add_mediaserver(name='mds1', display_name='MDS1', voip_ip='10.10.0.1')
self.add_mediaserver(name='mds2', display_name='MDS2', voip_ip='10.10.0.2')
self.add_mediaserver(name='mds3', display_name='MDS3', voip_ip=None)
result = asterisk_conf_dao.find_all_mediaservers()
assert_that(len(result),equal_to(2))
def _create_user_with_usersip(self, **kwargs):
usersip = self.add_usersip(category='user')
ule = self.add_user_line_with_exten(protocol='sip',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment