Skip to content

Commit

Permalink
Merge branch 'w711_hep'
Browse files Browse the repository at this point in the history
  • Loading branch information
pc-m committed Apr 5, 2019
2 parents 53d2d47 + 4b39e27 commit 82fb28d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions etc/xivo-confgend/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ templates:
# Plugins to use to generate the configuration files
plugins:
asterisk.confbridge.conf: xivo
asterisk.hep.conf: wazo
asterisk.musiconhold.conf: xivo
asterisk.rtp.conf: xivo
asterisk.sip.conf: xivo
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
'xivo_confgend.asterisk.confbridge.conf': [
'xivo = xivo_confgen.plugins.confbridge_conf:ConfBridgeConfGenerator',
],
'xivo_confgend.asterisk.hep.conf': [
'wazo = xivo_confgen.plugins.hep_conf:HEPConfGenerator',
],
'xivo_confgend.asterisk.musiconhold.conf': [
'xivo = xivo_confgen.plugins.musiconhold_conf:MOHConfGenerator',
],
Expand Down
23 changes: 23 additions & 0 deletions xivo_confgen/plugins/hep_conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Copyright 2019 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later

from __future__ import unicode_literals

from StringIO import StringIO

from xivo_dao.resources.asterisk_file import dao as asterisk_file_dao

from ..helpers.asterisk import AsteriskFileGenerator


class HEPConfGenerator(object):

def __init__(self, dependencies):
self.dependencies = dependencies

def generate(self):
asterisk_file_generator = AsteriskFileGenerator(asterisk_file_dao)
output = StringIO()
asterisk_file_generator.generate('hep.conf', output)
return output.getvalue()

0 comments on commit 82fb28d

Please sign in to comment.