Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename confbridge config to wazo_* #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions wazo_confgend/plugins/confbridge_conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2023 The Wazo Authors (see the AUTHORS file)
# Copyright 2016-2025 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later


Expand Down Expand Up @@ -59,13 +59,13 @@ def _gen_user_profile(self, conferences, output):
output.write('\n')

def _format_bridge_profile(self, row):
yield f'[xivo-bridge-profile-{row.id}](wazo_default_bridge)'
yield f'[wazo-bridge-profile-{row.id}](wazo_default_bridge)'
yield 'type = bridge'
yield f'max_members = {row.max_users}'
yield f'record_conference = {self._convert_bool(row.record)}'

def _format_user_profile(self, row):
yield f'[xivo-user-profile-{row.id}](wazo_default_user)'
yield f'[wazo-user-profile-{row.id}](wazo_default_user)'
yield 'type = user'
yield f'quiet = {self._convert_bool(row.quiet_join_leave)}'
yield f'announce_join_leave = {self._convert_bool(row.announce_join_leave)}'
Expand All @@ -76,7 +76,7 @@ def _format_user_profile(self, row):
yield f'music_on_hold_class = {row.music_on_hold}'

def _format_admin_profile(self, row):
yield f'[xivo-admin-profile-{row.id}](xivo-user-profile-{row.id})'
yield f'[wazo-admin-profile-{row.id}](wazo-user-profile-{row.id})'
yield 'admin = yes'

def _convert_bool(self, option):
Expand All @@ -91,7 +91,7 @@ def _gen_default_menu(self, output):
output.write(f'{line}\n')

def _gen_default_user_menu(self):
yield '[xivo-default-user-menu]'
yield '[wazo-default-user-menu]'
yield 'type = menu'
yield '* = playback_and_continue({})'.format(
'&'.join(
Expand All @@ -116,7 +116,7 @@ def _gen_default_user_menu(self):
yield '9 = increase_talking_volume'

def _gen_default_admin_menu(self):
yield '[xivo-default-admin-menu](xivo-default-user-menu)'
yield '[wazo-default-admin-menu](wazo-default-user-menu)'
yield '* = playback_and_continue({})'.format(
'&'.join(
[
Expand Down
16 changes: 8 additions & 8 deletions wazo_confgend/plugins/tests/test_confbridge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2023 The Wazo Authors (see the AUTHORS file)
# Copyright 2016-2025 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later

import unittest
Expand Down Expand Up @@ -29,12 +29,12 @@ def test_gen_bridge_profile(self):
assert_config_equal(
self.output.getvalue(),
'''
[xivo-bridge-profile-1](wazo_default_bridge)
[wazo-bridge-profile-1](wazo_default_bridge)
type = bridge
max_members = 50
record_conference = yes

[xivo-bridge-profile-2](wazo_default_bridge)
[wazo-bridge-profile-2](wazo_default_bridge)
type = bridge
max_members = 0
record_conference = no
Expand Down Expand Up @@ -67,14 +67,14 @@ def test_gen_user_profile(self):
assert_config_equal(
self.output.getvalue(),
'''
[xivo-user-profile-1](wazo_default_user)
[wazo-user-profile-1](wazo_default_user)
type = user
quiet = no
announce_join_leave = no
announce_user_count = no
announce_only_user = no

[xivo-user-profile-2](wazo_default_user)
[wazo-user-profile-2](wazo_default_user)
type = user
quiet = yes
announce_join_leave = yes
Expand All @@ -83,7 +83,7 @@ def test_gen_user_profile(self):
music_on_hold_when_empty = yes
music_on_hold_class = Music

[xivo-admin-profile-2](xivo-user-profile-2)
[wazo-admin-profile-2](wazo-user-profile-2)
admin = yes
''',
)
Expand All @@ -94,7 +94,7 @@ def test_gen_default_menu(self):
assert_config_equal(
self.output.getvalue(),
'''
[xivo-default-user-menu]
[wazo-default-user-menu]
type = menu
* = playback_and_continue(dir-multi1&digits/1&confbridge-mute-out&digits/4&confbridge-dec-list-vol-out&digits/5&confbridge-rest-list-vol-out&digits/6&confbridge-inc-list-vol-out&digits/7&confbridge-dec-talk-vol-out&digits/8&confbridge-rest-talk-vol-out&digits/9&confbridge-inc-talk-vol-out)
1 = toggle_mute
Expand All @@ -105,7 +105,7 @@ def test_gen_default_menu(self):
8 = reset_talking_volume
9 = increase_talking_volume

[xivo-default-admin-menu](xivo-default-user-menu)
[wazo-default-admin-menu](wazo-default-user-menu)
* = playback_and_continue(dir-multi1&digits/1&confbridge-mute-out&digits/2&confbridge-lock-out&digits/3&confbridge-remove-last-out&digits/4&confbridge-dec-list-vol-out&digits/5&confbridge-rest-list-vol-out&digits/6&confbridge-inc-list-vol-out&digits/7&confbridge-dec-talk-vol-out&digits/8&confbridge-rest-talk-vol-out&digits/9&confbridge-inc-talk-vol-out)
2 = admin_toggle_conference_lock
3 = admin_kick_last
Expand Down