diff --git a/plugins/conftest.py b/plugins/conftest.py index 789accb2a32279bb3c4a3004c58ee081cda05cc1..e908eada579d2dcece11a12bdec7e1fed9347258 100644 --- a/plugins/conftest.py +++ b/plugins/conftest.py @@ -1,29 +1,42 @@ -from os import path +from __future__ import annotations + +import importlib.util +from os.path import basename +from types import ModuleType +from typing import Any, Generator, Callable import pytest +from pytest import FixtureRequest + + +ModuleInitializer = Callable[[str, dict[str, Any]], ModuleType] + @pytest.fixture() -def module_initializer(request): +def module_initializer( + request: FixtureRequest, +) -> Generator[ModuleInitializer, None, None]: """ Create a method to import files that need global overrides or special modifications before import. This is usually just the entry.py, but could be used with others. The fixture will automatically use the path of the module using it. """ - base_module = request.module.__name__.split('.')[0] - file_path = request.module.__name__.replace('.', path.sep) + '.py' - module_path = request.module.__file__.replace(file_path, base_module) - - def initialize_module(module_name, global_overrides): - import imp - from types import ModuleType + plugin_base_path = request.path.parents[2] + plugin_version = basename(request.path.parents[1]) - module = ModuleType(f'{base_module}.{module_name}') + def initialize_module(module_name: str, global_overrides: dict[str, Any]): + module_file_path = plugin_base_path / plugin_version / f'{module_name}.py' + spec = importlib.util.spec_from_file_location( + f'{plugin_version}.{module_name}', + module_file_path, + submodule_search_locations=[str(plugin_base_path / plugin_version)], + ) + module = importlib.util.module_from_spec(spec) if global_overrides is not None: module.__dict__.update(global_overrides) - source_file, filename = imp.find_module(module_name, [module_path])[:2] - exec(source_file.read(), module.__dict__) + spec.loader.exec_module(module) return module yield initialize_module diff --git a/plugins/pgbuild.py b/plugins/pgbuild.py index eb9fac8581f9944b5bd67318ec148b81ca3730d6..fbdf9bce8903c8c4435eefb5554bf561909e4bee 100755 --- a/plugins/pgbuild.py +++ b/plugins/pgbuild.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 """ -Copyright 2010-2022 The Wazo Authors (see AUTHORS file) +Copyright 2010-2023 The Wazo Authors (see the AUTHORS file) SPDX-License-Identifier: GPL-3.0-or-later A tool for building provd plugins. """ +from __future__ import annotations - -import errno +import argparse import glob import hashlib import json @@ -17,8 +17,53 @@ import tarfile import traceback from argparse import ArgumentParser from itertools import zip_longest +from pathlib import Path from subprocess import check_call from sys import exit, stderr +from typing import Any, TYPE_CHECKING, Sequence + +if TYPE_CHECKING: + from typing import TypedDict, Literal + from collections.abc import Iterable, Callable + + PhoneTypes = Literal[ + 'ata', + 'conference', + 'deskphone', + 'dect', + 'doorphone', + 'gateway', + 'generic', + 'softphone', + ] + Protocols = Literal['sip', 'sccp'] + TargetCallback = Callable[[str], None] + + class TargetDict(TypedDict): + fun: TargetCallback + pg_id: str + std_dirs: str + + class PluginCapabilities(TypedDict): + lines: int + high_availability: bool + function_keys: int + expansion_modules: int + switchboard: int + multicell: bool + type: PhoneTypes + protocol: Protocols + + class RawPluginInfo(TypedDict): + version: str + description: str + capabilities: dict[str, PluginCapabilities] + + class PluginInfo(RawPluginInfo): + filename: str + dsize: int + sha1sum: str + BUILD_FILENAME = 'build.py' DB_FILENAME = 'plugins.db' @@ -26,11 +71,11 @@ PLUGIN_INFO_FILENAME = 'plugin-info' PACKAGE_SUFFIX = '.tar.bz2' -def cmp(a, b): +def cmp(a: Any, b: Any) -> bool: return (a > b) - (a < b) -def count(iterable, function=bool): +def count(iterable: Iterable, function: Callable[[Any], bool] = bool): """Return the number of element 'e' in iterable for which function(e) is true. @@ -51,26 +96,13 @@ def _is_build_plugin(path): return os.path.isfile(os.path.join(path, BUILD_FILENAME)) -def _list_build_plugins(directory): - def aux(): - for file in os.listdir(directory): - file = os.path.join(directory, file) - if _is_build_plugin(file): - yield file - - return list(aux()) - - -def _mkdir(path): - # Similar to os.mkdir but does not raise an exception if the directory - # already exist - try: - os.mkdir(path) - except OSError as e: - if e.errno == errno.EEXIST and os.path.isdir(path): - pass - else: - raise +def _list_build_plugins(directory: str) -> list[str]: + build_plugins: list[str] = [] + for file in os.listdir(directory): + file = os.path.join(directory, file) + if _is_build_plugin(file): + build_plugins.append(file) + return build_plugins class BuildPlugin: @@ -85,10 +117,12 @@ class BuildPlugin: self.name = os.path.basename(path) def _load_build_plugin(self, path): - targets = {} + targets: dict[str, TargetDict] = {} - def _target(target_id, pg_id, std_dirs=True): - def aux(fun): + def _target( + target_id: str, pg_id: str, std_dirs: bool = True + ) -> Callable[[TargetCallback], TargetCallback]: + def aux(fun: TargetCallback) -> TargetCallback: if target_id in targets: raise Exception( f"in build_plugin '{self.name}': target redefinition for '{target_id}'" @@ -130,7 +164,7 @@ class BuildPlugin: self._mk_std_dirs(abs_path) @staticmethod - def _mk_std_dirs(abs_path): + def _mk_std_dirs(abs_path: str) -> None: for directory in [ 'var', 'var/cache', @@ -138,10 +172,12 @@ class BuildPlugin: 'var/templates', 'var/tftpboot', ]: - _mkdir(os.path.join(abs_path, directory)) + os.makedirs(Path(abs_path) / directory, exist_ok=True) -def build_op(opts, args, src_dir, dest_dir): +def build_op( + opts: argparse.Namespace, args: Sequence[str], src_dir: str, dest_dir: str +) -> None: # Pre: src_dir is a directory # Pre: dest_dir is a directory build_dir = src_dir @@ -197,11 +233,11 @@ def build_op(opts, args, src_dir, dest_dir): traceback.print_exc(None, stderr) -def _is_plugin(path): - return os.path.isfile(os.path.join(path, PLUGIN_INFO_FILENAME)) +def _is_plugin(path: str) -> bool: + return (Path(path) / PLUGIN_INFO_FILENAME).is_file() -def _list_plugins(directory): +def _list_plugins(directory: str) -> list[str]: def aux(): for file in os.listdir(directory): file = os.path.join(directory, file) @@ -211,7 +247,7 @@ def _list_plugins(directory): return list(aux()) -def _get_plugin_version(plugin): +def _get_plugin_version(plugin: str) -> str: # Pre: plugin is a directory with an PLUGIN_INFO_FILENAME file fobj = open(os.path.join(plugin, PLUGIN_INFO_FILENAME)) try: @@ -224,7 +260,9 @@ def _get_plugin_version(plugin): fobj.close() -def package_op(opts, args, src_dir, dest_dir): +def package_op( + opts: argparse.Namespace, args: Sequence[str], src_dir: str, dest_dir: str +) -> None: pg_dir = src_dir pkg_dir = dest_dir @@ -244,7 +282,8 @@ def package_op(opts, args, src_dir, dest_dir): # build packages for plugin in plugins: plugin_version = _get_plugin_version(plugin) - package_path = os.path.join(pkg_dir, os.path.basename(plugin)) + plugin_name = os.path.basename(plugin).replace('_', '-') + package_path = os.path.join(pkg_dir, plugin_name) package = f"{package_path}-{plugin_version}{PACKAGE_SUFFIX}" print(f"Packaging plugin '{plugin}' into '{package}'...") check_call( @@ -259,15 +298,15 @@ def package_op(opts, args, src_dir, dest_dir): ) -def _list_packages(directory): +def _list_packages(directory: str) -> list[str]: return glob.glob(os.path.join(directory, '*' + PACKAGE_SUFFIX)) -def _get_package_filename(package): +def _get_package_filename(package: str) -> str: return os.path.basename(package) -def _get_package_name(package): +def _get_package_name(package: str) -> str: tar_package = tarfile.open(package) try: shortest_name = min(tar_package.getnames()) @@ -282,7 +321,7 @@ def _get_package_name(package): tar_package.close() -def _get_package_plugin_info(package, package_name): +def _get_package_plugin_info(package: str, package_name: str) -> dict: # Return a dictionary representing the standardized content of the # plugin-info file tar_package = tarfile.open(package) @@ -313,19 +352,18 @@ def _get_package_plugin_info(package, package_name): tar_package.close() -def _get_package_dsize(package): +def _get_package_dsize(package: str) -> int: return os.path.getsize(package) -def _get_package_sha1sum(package): +def _get_package_sha1sum(package: str) -> str: package_hash = hashlib.sha1() with open(package, 'rb') as f: package_hash.update(f.read()) return package_hash.hexdigest() -def _get_package_info(package): - # Return a tuple +def _get_package_info(package: str) -> tuple[str, PluginInfo]: result = {'filename': _get_package_filename(package)} name = _get_package_name(package) result.update(_get_package_plugin_info(package, name)) @@ -334,19 +372,19 @@ def _get_package_info(package): return name, result -def _version_cmp(version1, version2): +def _version_cmp(version1: str, version2: str) -> int | bool: """Compare the version version1 to version version2 and return: - negative if version1version2. - + - or bool.. Will be evaluated as 0 or 1, but should be made explicit. """ start1, _, last1 = version1.rpartition('-') start2, _, last2 = version2.rpartition('-') for i1, i2 in zip_longest(start1.split('.'), start2.split('.'), fillvalue='0'): res_cmp = cmp(i1, i2) if res_cmp != 0: - return res_cmp + return int(res_cmp) if not last1 and last2 or not last1.startswith('dev') and last2.startswith('dev'): return 1 elif last1 and not last2 or last1.startswith('dev') and not last2.startswith('dev'): @@ -354,7 +392,9 @@ def _version_cmp(version1, version2): return cmp(last1, last2) -def create_db_op(opts, args, src_dir, dest_dir): +def create_db_op( + opts: argparse.Namespace, args: Sequence[str], src_dir: str, dest_dir: str +) -> None: pkg_dir = src_dir db_file = os.path.join(dest_dir, DB_FILENAME) @@ -364,7 +404,7 @@ def create_db_op(opts, args, src_dir, dest_dir): else: packages = _list_packages(pkg_dir) - # get package infos, and only for the most recent packages + # get package info, and only for the most recent packages package_infos = {} for package in packages: package_name, package_info = _get_package_info(package) @@ -405,7 +445,7 @@ def _get_directories(opts): return _get_directory(opts.source), _get_directory(opts.destination) -def main(): +def main() -> None: parser = ArgumentParser() parser.add_argument( '-B', @@ -460,4 +500,5 @@ def main(): raise AssertionError('unknown operation... this is a bug') -main() +if __name__ == '__main__': + main() diff --git a/plugins/wazo-alcatel/build.py b/plugins/wazo-alcatel/build.py deleted file mode 100644 index 7c8794530f7d2a4d8d2c76aee1c852ee1c657c0a..0000000000000000000000000000000000000000 --- a/plugins/wazo-alcatel/build.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2022 The Wazo Authors (see the AUTHORS file) -# SPDX-License-Identifier: GPL-3.0-or-later - -# Depends on the following external programs: -# -rsync - -from subprocess import check_call - - -@target('2.01.10', 'wazo-alcatel-2.01.10') -def build_2_01_10(path): - check_call(['rsync', '-rlp', '--exclude', '.*', '2.01.10/', path]) - - -@target('2.13.02', 'wazo-alcatel-2.13.02') -def build_2_13_02(path): - check_call(['rsync', '-rlp', '--exclude', '.*', '2.13.02/', path]) - - -@target('1.51.52', 'wazo-alcatel-1.51.52') -def build_1_51_52(path): - check_call(['rsync', '-rlp', '--exclude', '.*', '1.51.52/', path]) diff --git a/plugins/wazo-cisco-sip/build.py b/plugins/wazo-cisco-sip/build.py deleted file mode 100644 index 0bcdb7845989d5210418d5ac4f5b040d7ce77bb6..0000000000000000000000000000000000000000 --- a/plugins/wazo-cisco-sip/build.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2018-2022 The Wazo Authors (see AUTHORS file) -# SPDX-License-Identifier: GPL-3.0-or-later - -# Depends on the following external programs: -# -rsync - -from subprocess import check_call - - -@target('9.3', 'wazo-cisco-sip-9.3') -def build_9_3(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '9.3/', path]) - - -@target('11.1.0', 'wazo-cisco-sip-11.1.0') -def build_11_1_0(path): - check_call(['rsync', '-rlp', '--exclude', '.*', '11.1.0/', path]) - - -@target('11.3.1', 'wazo-cisco-sip-11.3.1') -def build_11_3_1(path): - check_call(['rsync', '-rlp', '--exclude', '.*', '11.3.1/', path]) - - -@target('12.0.1', 'wazo-cisco-sip-12.0.1') -def build_12_0_1(path): - check_call(['rsync', '-rlp', '--exclude', '.*', '12.0.1/', path]) diff --git a/plugins/wazo-cisco-spa/build.py b/plugins/wazo-cisco-spa/build.py deleted file mode 100644 index 0edeeffbdd87d1adae4d3bdf1399eb82f2220b0b..0000000000000000000000000000000000000000 --- a/plugins/wazo-cisco-spa/build.py +++ /dev/null @@ -1,72 +0,0 @@ -""" -Copyright 2014-2022 The Wazo Authors (see the AUTHORS file) -SPDX-License-Identifier: GPL-3.0+ - -Depends on the following external programs: - -rsync -""" - -from subprocess import check_call - - -@target('7.5.5', 'wazo-cisco-spa-7.5.5') -def build_7_5_5(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '7.5.5/', path]) - - -@target('legacy', 'wazo-cisco-spa-legacy') -def build_legacy(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'legacy/', path]) - - -@target('pap2t-5.1.6', 'wazo-cisco-pap2t-5.1.6') -def build_pap2t_5_1_6(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'pap2t-5.1.6/', path]) - - -@target('spa100-1.3.5p', 'wazo-cisco-spa100-1.3.5p') -def build_spa100_1_3_5p(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'spa100-1.3.5p/', path]) - - -@target('spa2102-5.2.12', 'wazo-cisco-spa2102-5.2.12') -def build_spa2102_5_2_12(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'spa2102-5.2.12/', path]) - - -@target('spa3102-5.1.10', 'wazo-cisco-spa3102-5.1.10') -def build_spa3102_5_1_10(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'spa3102-5.1.10/', path]) - - -@target('spa8000-6.1.11', 'wazo-cisco-spa8000-6.1.11') -def build_spa8000_6_1_11(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'spa8000-6.1.11/', path]) - - -@target('spa8800-6.1.7', 'wazo-cisco-spa8800-6.1.7') -def build_spa8800_6_1_7(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'spa8800-6.1.7/', path]) - - -@target('ata190-1.2.2', 'wazo-cisco-ata190-1.2.2') -def build_ata190_1_2_2(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'ata190-1.2.2/', path]) diff --git a/plugins/wazo-fanvil/build.py b/plugins/wazo-fanvil/build.py deleted file mode 100644 index cf67595a4a4b792ebaab08a0ee2079ebd5a4f5b5..0000000000000000000000000000000000000000 --- a/plugins/wazo-fanvil/build.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) -SPDX-License-Identifier: GPL-3.0-or-later - -Depends on the following external programs: - -rsync -""" - -from subprocess import check_call - - -@target('2.3', 'wazo-fanvil-2.3') -def build_2_3(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '2.3/', path]) - - -@target('serie-x', 'wazo-fanvil-serie-x') -def build_x(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'serie-x/', path]) - - -@target('serie-v', 'wazo-fanvil-serie-v') -def build_v(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'serie-v/', path]) - - -@target('serie-i', 'wazo-fanvil-serie-i') -def build_i(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'serie-i/', path]) diff --git a/plugins/wazo-gigaset/build.py b/plugins/wazo-gigaset/build.py deleted file mode 100644 index 3154b20504ec1ee231f9f0f7c6837205012c2e45..0000000000000000000000000000000000000000 --- a/plugins/wazo-gigaset/build.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2013-2022 The Wazo Authors (see the AUTHORS file) -# SPDX-License-Identifier: GPL-3.0-or-later - -# Depends on the following external programs: -# -rsync - -from subprocess import check_call - - -@target('N510', 'wazo-gigaset-N510') -def build_N510(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'N510/', path]) - - -@target('N720', 'wazo-gigaset-N720') -def build_N720(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'N720/', path]) - - -@target('N870-83.v2.39.0', 'wazo-gigaset-N870-83.v2.39.0') -def build_N870_83_v2_39_0(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'N870-83.v2.39.0/', path]) - - -@target('N870-83.v2.48.0', 'wazo-gigaset-N870-83.v2.48.0') -def build_N870_83_v2_48_0(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'N870-83.v2.48.0/', path]) - - -@target('Nx70-83.v2.49.1', 'wazo-gigaset-Nx70-83.v2.49.1') -def build_Nx70_83_v2_49_1(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'Nx70-83.v2.49.1/', path]) - - -@target('C470', 'wazo-gigaset-C470') -def build_C470(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common-c/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'C470/', path]) - - -@target('C590', 'wazo-gigaset-C590') -def build_C590(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common-c/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'C590/', path]) diff --git a/plugins/wazo-htek/build.py b/plugins/wazo-htek/build.py deleted file mode 100644 index 47a367755e4ace52885f7fcc64f433a97497c0ad..0000000000000000000000000000000000000000 --- a/plugins/wazo-htek/build.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Copyright 2017-2022 The Wazo Authors (see the AUTHORS file) -SPDX-License-Identifier: GPL-3.0-or-later - -Depends on the following external programs: - -rsync -""" - -from subprocess import check_call - - -@target('2.0.4.4.58', 'wazo-htek-2.0.4.4.58') -def build_2_0_4_4_58(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '2.0.4.4.58/', path]) - - -@target('2.0.4.6.41', 'wazo-htek-2.0.4.6.41') -def build_2_0_4_6_41(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '2.0.4.6.41/', path]) diff --git a/plugins/wazo-patton/build.py b/plugins/wazo-patton/build.py deleted file mode 100644 index 8577c26d616acf748984f9de248f415d850e78e0..0000000000000000000000000000000000000000 --- a/plugins/wazo-patton/build.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Copyright 2016-2022 The Wazo Authors (see the AUTHORS file) -SPDX-License-Identifier: GPL-3.0-or-later - -Depends on the following external programs: - -rsync -""" - -from subprocess import check_call - - -@target('6.11', 'wazo-patton-6.11') -def build_6_11(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '6.11/', path]) - - -@target('6.9', 'wazo-patton-6.9') -def build_6_9(path): - check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '6.9/', path]) diff --git a/plugins/wazo-aastra/build.py b/plugins/wazo_aastra/build.py similarity index 61% rename from plugins/wazo-aastra/build.py rename to plugins/wazo_aastra/build.py index 2b955040c5953ab1e371c2b0672e5acf47d720d5..6aa47b43f3d47a593af849cb59d17904fdbf5bb1 100644 --- a/plugins/wazo-aastra/build.py +++ b/plugins/wazo_aastra/build.py @@ -1,18 +1,29 @@ -# Copyright 2014-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2014-2023 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0-or-later # Depends on the following external programs: # -rsync +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """ + The `target` method is injected in `exec` call by the build script. + + Any error raised will be considered a build error + Current directory is the one of the bplugin script and `pg_dir` is initially empty + """ + return lambda x: None + -# target(, ) -# any error raised will be considered a build error -# Pre: pg_dir is initially empty -# Pre: current directory is the one of the bplugin @target('3.3.1-SP4', 'wazo-aastra-3.3.1-SP4') -def build_3_3_1_sp4(path): +def build_3_3_1_sp4(path: str) -> None: check_call( [ 'rsync', @@ -25,12 +36,11 @@ def build_3_3_1_sp4(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '3.3.1-SP4/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v3_3_1_SP4/', path]) @target('4.3.0', 'wazo-aastra-4.3.0') -def build_4_3_0(path): +def build_4_3_0(path: str) -> None: check_call( [ 'rsync', @@ -45,12 +55,11 @@ def build_4_3_0(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '4.3.0/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v4_3_0/', path]) @target('4.2.0', 'wazo-aastra-4.2.0') -def build_4_2_0(path): +def build_4_2_0(path: str) -> None: check_call( [ 'rsync', @@ -65,12 +74,11 @@ def build_4_2_0(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '4.2.0/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v4_2_0/', path]) @target('5.0.0', 'wazo-aastra-5.0.0') -def build_5_0_0(path): +def build_5_0_0(path: str) -> None: check_call( [ 'rsync', @@ -85,12 +93,11 @@ def build_5_0_0(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '5.0.0/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v5_0_0/', path]) @target('5.1.0', 'wazo-aastra-5.1.0') -def build_5_1_0(path): +def build_5_1_0(path: str) -> None: check_call( [ 'rsync', @@ -107,5 +114,4 @@ def build_5_1_0(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '5.1.0/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v5_1_0/', path]) diff --git a/plugins/wazo-aastra/common/common.py b/plugins/wazo_aastra/common/common.py similarity index 100% rename from plugins/wazo-aastra/common/common.py rename to plugins/wazo_aastra/common/common.py diff --git a/plugins/wazo-aastra/common/templates/6730i.tpl b/plugins/wazo_aastra/common/templates/6730i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6730i.tpl rename to plugins/wazo_aastra/common/templates/6730i.tpl diff --git a/plugins/wazo-aastra/common/templates/6731i.tpl b/plugins/wazo_aastra/common/templates/6731i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6731i.tpl rename to plugins/wazo_aastra/common/templates/6731i.tpl diff --git a/plugins/wazo-aastra/common/templates/6735i.tpl b/plugins/wazo_aastra/common/templates/6735i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6735i.tpl rename to plugins/wazo_aastra/common/templates/6735i.tpl diff --git a/plugins/wazo-aastra/common/templates/6737i.tpl b/plugins/wazo_aastra/common/templates/6737i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6737i.tpl rename to plugins/wazo_aastra/common/templates/6737i.tpl diff --git a/plugins/wazo-aastra/common/templates/6739i.tpl b/plugins/wazo_aastra/common/templates/6739i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6739i.tpl rename to plugins/wazo_aastra/common/templates/6739i.tpl diff --git a/plugins/wazo-aastra/common/templates/6753i.tpl b/plugins/wazo_aastra/common/templates/6753i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6753i.tpl rename to plugins/wazo_aastra/common/templates/6753i.tpl diff --git a/plugins/wazo-aastra/common/templates/6755i.tpl b/plugins/wazo_aastra/common/templates/6755i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6755i.tpl rename to plugins/wazo_aastra/common/templates/6755i.tpl diff --git a/plugins/wazo-aastra/common/templates/6757i.tpl b/plugins/wazo_aastra/common/templates/6757i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6757i.tpl rename to plugins/wazo_aastra/common/templates/6757i.tpl diff --git a/plugins/wazo-aastra/common/templates/6863i.tpl b/plugins/wazo_aastra/common/templates/6863i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6863i.tpl rename to plugins/wazo_aastra/common/templates/6863i.tpl diff --git a/plugins/wazo-aastra/common/templates/6865i.tpl b/plugins/wazo_aastra/common/templates/6865i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6865i.tpl rename to plugins/wazo_aastra/common/templates/6865i.tpl diff --git a/plugins/wazo-aastra/common/templates/6867i.tpl b/plugins/wazo_aastra/common/templates/6867i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6867i.tpl rename to plugins/wazo_aastra/common/templates/6867i.tpl diff --git a/plugins/wazo-aastra/common/templates/6869i.tpl b/plugins/wazo_aastra/common/templates/6869i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6869i.tpl rename to plugins/wazo_aastra/common/templates/6869i.tpl diff --git a/plugins/wazo-aastra/common/templates/6873i.tpl b/plugins/wazo_aastra/common/templates/6873i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6873i.tpl rename to plugins/wazo_aastra/common/templates/6873i.tpl diff --git a/plugins/wazo-aastra/common/templates/6930.tpl b/plugins/wazo_aastra/common/templates/6930.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/6930.tpl rename to plugins/wazo_aastra/common/templates/6930.tpl diff --git a/plugins/wazo-aastra/common/templates/9143i.tpl b/plugins/wazo_aastra/common/templates/9143i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/9143i.tpl rename to plugins/wazo_aastra/common/templates/9143i.tpl diff --git a/plugins/wazo-aastra/common/templates/9480i.tpl b/plugins/wazo_aastra/common/templates/9480i.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/9480i.tpl rename to plugins/wazo_aastra/common/templates/9480i.tpl diff --git a/plugins/wazo-aastra/common/templates/base.tpl b/plugins/wazo_aastra/common/templates/base.tpl similarity index 100% rename from plugins/wazo-aastra/common/templates/base.tpl rename to plugins/wazo_aastra/common/templates/base.tpl diff --git a/plugins/wazo-aastra/common/var/tftpboot/Aastra/aastra.cfg b/plugins/wazo_aastra/common/var/tftpboot/Aastra/aastra.cfg similarity index 100% rename from plugins/wazo-aastra/common/var/tftpboot/Aastra/aastra.cfg rename to plugins/wazo_aastra/common/var/tftpboot/Aastra/aastra.cfg diff --git a/plugins/wazo-fanvil/__init__.py b/plugins/wazo_aastra/v3_3_1_SP4/__init__.py similarity index 100% rename from plugins/wazo-fanvil/__init__.py rename to plugins/wazo_aastra/v3_3_1_SP4/__init__.py diff --git a/plugins/wazo-aastra/3.3.1-SP4/entry.py b/plugins/wazo_aastra/v3_3_1_SP4/entry.py similarity index 100% rename from plugins/wazo-aastra/3.3.1-SP4/entry.py rename to plugins/wazo_aastra/v3_3_1_SP4/entry.py diff --git a/plugins/wazo-aastra/3.3.1-SP4/pkgs/pkgs.db b/plugins/wazo_aastra/v3_3_1_SP4/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-aastra/3.3.1-SP4/pkgs/pkgs.db rename to plugins/wazo_aastra/v3_3_1_SP4/pkgs/pkgs.db diff --git a/plugins/wazo-aastra/3.3.1-SP4/plugin-info b/plugins/wazo_aastra/v3_3_1_SP4/plugin-info similarity index 100% rename from plugins/wazo-aastra/3.3.1-SP4/plugin-info rename to plugins/wazo_aastra/v3_3_1_SP4/plugin-info diff --git a/plugins/wazo-aastra/4.2.0/entry.py b/plugins/wazo_aastra/v4_2_0/entry.py similarity index 100% rename from plugins/wazo-aastra/4.2.0/entry.py rename to plugins/wazo_aastra/v4_2_0/entry.py diff --git a/plugins/wazo-aastra/4.2.0/pkgs/pkgs.db b/plugins/wazo_aastra/v4_2_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-aastra/4.2.0/pkgs/pkgs.db rename to plugins/wazo_aastra/v4_2_0/pkgs/pkgs.db diff --git a/plugins/wazo-aastra/4.2.0/plugin-info b/plugins/wazo_aastra/v4_2_0/plugin-info similarity index 100% rename from plugins/wazo-aastra/4.2.0/plugin-info rename to plugins/wazo_aastra/v4_2_0/plugin-info diff --git a/plugins/wazo-aastra/4.3.0/entry.py b/plugins/wazo_aastra/v4_3_0/entry.py similarity index 100% rename from plugins/wazo-aastra/4.3.0/entry.py rename to plugins/wazo_aastra/v4_3_0/entry.py diff --git a/plugins/wazo-aastra/4.3.0/pkgs/pkgs.db b/plugins/wazo_aastra/v4_3_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-aastra/4.3.0/pkgs/pkgs.db rename to plugins/wazo_aastra/v4_3_0/pkgs/pkgs.db diff --git a/plugins/wazo-aastra/4.3.0/plugin-info b/plugins/wazo_aastra/v4_3_0/plugin-info similarity index 100% rename from plugins/wazo-aastra/4.3.0/plugin-info rename to plugins/wazo_aastra/v4_3_0/plugin-info diff --git a/plugins/wazo-aastra/5.0.0/entry.py b/plugins/wazo_aastra/v5_0_0/entry.py similarity index 100% rename from plugins/wazo-aastra/5.0.0/entry.py rename to plugins/wazo_aastra/v5_0_0/entry.py diff --git a/plugins/wazo-aastra/5.0.0/pkgs/pkgs.db b/plugins/wazo_aastra/v5_0_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-aastra/5.0.0/pkgs/pkgs.db rename to plugins/wazo_aastra/v5_0_0/pkgs/pkgs.db diff --git a/plugins/wazo-aastra/5.0.0/plugin-info b/plugins/wazo_aastra/v5_0_0/plugin-info similarity index 100% rename from plugins/wazo-aastra/5.0.0/plugin-info rename to plugins/wazo_aastra/v5_0_0/plugin-info diff --git a/plugins/wazo-aastra/5.1.0/entry.py b/plugins/wazo_aastra/v5_1_0/entry.py similarity index 100% rename from plugins/wazo-aastra/5.1.0/entry.py rename to plugins/wazo_aastra/v5_1_0/entry.py diff --git a/plugins/wazo-aastra/5.1.0/pkgs/pkgs.db b/plugins/wazo_aastra/v5_1_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-aastra/5.1.0/pkgs/pkgs.db rename to plugins/wazo_aastra/v5_1_0/pkgs/pkgs.db diff --git a/plugins/wazo-aastra/5.1.0/plugin-info b/plugins/wazo_aastra/v5_1_0/plugin-info similarity index 100% rename from plugins/wazo-aastra/5.1.0/plugin-info rename to plugins/wazo_aastra/v5_1_0/plugin-info diff --git a/plugins/wazo_alcatel/build.py b/plugins/wazo_alcatel/build.py new file mode 100644 index 0000000000000000000000000000000000000000..528952f19f24c5f6a0f3669300e4309d0beae7ec --- /dev/null +++ b/plugins/wazo_alcatel/build.py @@ -0,0 +1,32 @@ +# Copyright 2022-2023 The Wazo Authors (see the AUTHORS file) +# SPDX-License-Identifier: GPL-3.0-or-later + +# Depends on the following external programs: +# -rsync +from __future__ import annotations + +from typing import TYPE_CHECKING, Callable +from subprocess import check_call + +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + + +@target('2.01.10', 'wazo-alcatel-2.01.10') +def build_2_01_10(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'v2_01_10/', path]) + + +@target('2.13.02', 'wazo-alcatel-2.13.02') +def build_2_13_02(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'v2_13_02/', path]) + + +@target('1.51.52', 'wazo-alcatel-1.51.52') +def build_1_51_52(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_51_52/', path]) diff --git a/plugins/wazo-alcatel/1.51.52/common.py b/plugins/wazo_alcatel/v1_51_52/common.py similarity index 100% rename from plugins/wazo-alcatel/1.51.52/common.py rename to plugins/wazo_alcatel/v1_51_52/common.py diff --git a/plugins/wazo-alcatel/1.51.52/entry.py b/plugins/wazo_alcatel/v1_51_52/entry.py similarity index 100% rename from plugins/wazo-alcatel/1.51.52/entry.py rename to plugins/wazo_alcatel/v1_51_52/entry.py diff --git a/plugins/wazo-alcatel/1.51.52/pkgs/pkgs.db b/plugins/wazo_alcatel/v1_51_52/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-alcatel/1.51.52/pkgs/pkgs.db rename to plugins/wazo_alcatel/v1_51_52/pkgs/pkgs.db diff --git a/plugins/wazo-alcatel/1.51.52/plugin-info b/plugins/wazo_alcatel/v1_51_52/plugin-info similarity index 100% rename from plugins/wazo-alcatel/1.51.52/plugin-info rename to plugins/wazo_alcatel/v1_51_52/plugin-info diff --git a/plugins/wazo-alcatel/1.51.52/templates/8028.tpl b/plugins/wazo_alcatel/v1_51_52/templates/8028.tpl similarity index 100% rename from plugins/wazo-alcatel/1.51.52/templates/8028.tpl rename to plugins/wazo_alcatel/v1_51_52/templates/8028.tpl diff --git a/plugins/wazo-alcatel/1.51.52/templates/base.tpl b/plugins/wazo_alcatel/v1_51_52/templates/base.tpl similarity index 100% rename from plugins/wazo-alcatel/1.51.52/templates/base.tpl rename to plugins/wazo_alcatel/v1_51_52/templates/base.tpl diff --git a/plugins/wazo-alcatel/1.51.52/templates/common/config.model.xml.tpl b/plugins/wazo_alcatel/v1_51_52/templates/common/config.model.xml.tpl similarity index 100% rename from plugins/wazo-alcatel/1.51.52/templates/common/config.model.xml.tpl rename to plugins/wazo_alcatel/v1_51_52/templates/common/config.model.xml.tpl diff --git a/plugins/wazo-alcatel/2.01.10/common.py b/plugins/wazo_alcatel/v2_01_10/common.py similarity index 100% rename from plugins/wazo-alcatel/2.01.10/common.py rename to plugins/wazo_alcatel/v2_01_10/common.py diff --git a/plugins/wazo-alcatel/2.01.10/entry.py b/plugins/wazo_alcatel/v2_01_10/entry.py similarity index 100% rename from plugins/wazo-alcatel/2.01.10/entry.py rename to plugins/wazo_alcatel/v2_01_10/entry.py diff --git a/plugins/wazo-alcatel/2.01.10/install.md b/plugins/wazo_alcatel/v2_01_10/install.md similarity index 100% rename from plugins/wazo-alcatel/2.01.10/install.md rename to plugins/wazo_alcatel/v2_01_10/install.md diff --git a/plugins/wazo-alcatel/2.01.10/pkgs/pkgs.db b/plugins/wazo_alcatel/v2_01_10/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-alcatel/2.01.10/pkgs/pkgs.db rename to plugins/wazo_alcatel/v2_01_10/pkgs/pkgs.db diff --git a/plugins/wazo-alcatel/2.01.10/plugin-info b/plugins/wazo_alcatel/v2_01_10/plugin-info similarity index 100% rename from plugins/wazo-alcatel/2.01.10/plugin-info rename to plugins/wazo_alcatel/v2_01_10/plugin-info diff --git a/plugins/wazo-alcatel/2.01.10/templates/4008.tpl b/plugins/wazo_alcatel/v2_01_10/templates/4008.tpl similarity index 100% rename from plugins/wazo-alcatel/2.01.10/templates/4008.tpl rename to plugins/wazo_alcatel/v2_01_10/templates/4008.tpl diff --git a/plugins/wazo-alcatel/2.01.10/templates/4018.tpl b/plugins/wazo_alcatel/v2_01_10/templates/4018.tpl similarity index 100% rename from plugins/wazo-alcatel/2.01.10/templates/4018.tpl rename to plugins/wazo_alcatel/v2_01_10/templates/4018.tpl diff --git a/plugins/wazo-alcatel/2.01.10/templates/base.tpl b/plugins/wazo_alcatel/v2_01_10/templates/base.tpl similarity index 100% rename from plugins/wazo-alcatel/2.01.10/templates/base.tpl rename to plugins/wazo_alcatel/v2_01_10/templates/base.tpl diff --git a/plugins/wazo-alcatel/2.01.10/var/tftpboot/lanpbx.cfg b/plugins/wazo_alcatel/v2_01_10/var/tftpboot/lanpbx.cfg similarity index 100% rename from plugins/wazo-alcatel/2.01.10/var/tftpboot/lanpbx.cfg rename to plugins/wazo_alcatel/v2_01_10/var/tftpboot/lanpbx.cfg diff --git a/plugins/wazo-alcatel/2.01.10/var/tftpboot/sipconfig.txt b/plugins/wazo_alcatel/v2_01_10/var/tftpboot/sipconfig.txt similarity index 100% rename from plugins/wazo-alcatel/2.01.10/var/tftpboot/sipconfig.txt rename to plugins/wazo_alcatel/v2_01_10/var/tftpboot/sipconfig.txt diff --git a/plugins/wazo-alcatel/2.13.02/common.py b/plugins/wazo_alcatel/v2_13_02/common.py similarity index 100% rename from plugins/wazo-alcatel/2.13.02/common.py rename to plugins/wazo_alcatel/v2_13_02/common.py diff --git a/plugins/wazo-alcatel/2.13.02/entry.py b/plugins/wazo_alcatel/v2_13_02/entry.py similarity index 100% rename from plugins/wazo-alcatel/2.13.02/entry.py rename to plugins/wazo_alcatel/v2_13_02/entry.py diff --git a/plugins/wazo-alcatel/2.13.02/pkgs/pkgs.db b/plugins/wazo_alcatel/v2_13_02/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-alcatel/2.13.02/pkgs/pkgs.db rename to plugins/wazo_alcatel/v2_13_02/pkgs/pkgs.db diff --git a/plugins/wazo-alcatel/2.13.02/plugin-info b/plugins/wazo_alcatel/v2_13_02/plugin-info similarity index 100% rename from plugins/wazo-alcatel/2.13.02/plugin-info rename to plugins/wazo_alcatel/v2_13_02/plugin-info diff --git a/plugins/wazo-alcatel/2.13.02/templates/M3.tpl b/plugins/wazo_alcatel/v2_13_02/templates/M3.tpl similarity index 100% rename from plugins/wazo-alcatel/2.13.02/templates/M3.tpl rename to plugins/wazo_alcatel/v2_13_02/templates/M3.tpl diff --git a/plugins/wazo-alcatel/2.13.02/templates/M5.tpl b/plugins/wazo_alcatel/v2_13_02/templates/M5.tpl similarity index 100% rename from plugins/wazo-alcatel/2.13.02/templates/M5.tpl rename to plugins/wazo_alcatel/v2_13_02/templates/M5.tpl diff --git a/plugins/wazo-alcatel/2.13.02/templates/M7.tpl b/plugins/wazo_alcatel/v2_13_02/templates/M7.tpl similarity index 100% rename from plugins/wazo-alcatel/2.13.02/templates/M7.tpl rename to plugins/wazo_alcatel/v2_13_02/templates/M7.tpl diff --git a/plugins/wazo-alcatel/2.13.02/templates/base.tpl b/plugins/wazo_alcatel/v2_13_02/templates/base.tpl similarity index 100% rename from plugins/wazo-alcatel/2.13.02/templates/base.tpl rename to plugins/wazo_alcatel/v2_13_02/templates/base.tpl diff --git a/plugins/wazo-alcatel/2.13.02/templates/common/config.model.xml.tpl b/plugins/wazo_alcatel/v2_13_02/templates/common/config.model.xml.tpl similarity index 100% rename from plugins/wazo-alcatel/2.13.02/templates/common/config.model.xml.tpl rename to plugins/wazo_alcatel/v2_13_02/templates/common/config.model.xml.tpl diff --git a/plugins/wazo-avaya/build.py b/plugins/wazo_avaya/build.py similarity index 63% rename from plugins/wazo-avaya/build.py rename to plugins/wazo_avaya/build.py index 8de3055a07cc2293d7278dfc302415e08a95e549..634d32956df2dfcb818b680268bacec52dde29ef 100644 --- a/plugins/wazo-avaya/build.py +++ b/plugins/wazo_avaya/build.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,12 +15,21 @@ # Depends on the following external programs: # -rsync +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('4.1.13', 'wazo-avaya-4.1.13') -def build_4_1_13(path): +def build_4_1_13(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '4.1.13/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v4_1_13/', path]) diff --git a/plugins/wazo-avaya/common/common.py b/plugins/wazo_avaya/common/common.py similarity index 100% rename from plugins/wazo-avaya/common/common.py rename to plugins/wazo_avaya/common/common.py diff --git a/plugins/wazo-avaya/common/templates/1220IP.tpl b/plugins/wazo_avaya/common/templates/1220IP.tpl similarity index 100% rename from plugins/wazo-avaya/common/templates/1220IP.tpl rename to plugins/wazo_avaya/common/templates/1220IP.tpl diff --git a/plugins/wazo-avaya/common/templates/1230IP.tpl b/plugins/wazo_avaya/common/templates/1230IP.tpl similarity index 100% rename from plugins/wazo-avaya/common/templates/1230IP.tpl rename to plugins/wazo_avaya/common/templates/1230IP.tpl diff --git a/plugins/wazo-avaya/common/templates/base.tpl b/plugins/wazo_avaya/common/templates/base.tpl similarity index 100% rename from plugins/wazo-avaya/common/templates/base.tpl rename to plugins/wazo_avaya/common/templates/base.tpl diff --git a/plugins/wazo-avaya/common/var/tftpboot/DeviceConfig.cfg b/plugins/wazo_avaya/common/var/tftpboot/DeviceConfig.cfg similarity index 100% rename from plugins/wazo-avaya/common/var/tftpboot/DeviceConfig.cfg rename to plugins/wazo_avaya/common/var/tftpboot/DeviceConfig.cfg diff --git a/plugins/wazo-avaya/4.1.13/entry.py b/plugins/wazo_avaya/v4_1_13/entry.py similarity index 100% rename from plugins/wazo-avaya/4.1.13/entry.py rename to plugins/wazo_avaya/v4_1_13/entry.py diff --git a/plugins/wazo-avaya/4.1.13/install.md b/plugins/wazo_avaya/v4_1_13/install.md similarity index 100% rename from plugins/wazo-avaya/4.1.13/install.md rename to plugins/wazo_avaya/v4_1_13/install.md diff --git a/plugins/wazo-avaya/4.1.13/limitations.md b/plugins/wazo_avaya/v4_1_13/limitations.md similarity index 100% rename from plugins/wazo-avaya/4.1.13/limitations.md rename to plugins/wazo_avaya/v4_1_13/limitations.md diff --git a/plugins/wazo-avaya/4.1.13/pkgs/pkgs.db b/plugins/wazo_avaya/v4_1_13/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-avaya/4.1.13/pkgs/pkgs.db rename to plugins/wazo_avaya/v4_1_13/pkgs/pkgs.db diff --git a/plugins/wazo-avaya/4.1.13/plugin-info b/plugins/wazo_avaya/v4_1_13/plugin-info similarity index 100% rename from plugins/wazo-avaya/4.1.13/plugin-info rename to plugins/wazo_avaya/v4_1_13/plugin-info diff --git a/plugins/wazo-avaya/4.1.13/var/tftpboot/1220.cfg b/plugins/wazo_avaya/v4_1_13/var/tftpboot/1220.cfg similarity index 100% rename from plugins/wazo-avaya/4.1.13/var/tftpboot/1220.cfg rename to plugins/wazo_avaya/v4_1_13/var/tftpboot/1220.cfg diff --git a/plugins/wazo-avaya/4.1.13/var/tftpboot/1220SIP.cfg b/plugins/wazo_avaya/v4_1_13/var/tftpboot/1220SIP.cfg similarity index 100% rename from plugins/wazo-avaya/4.1.13/var/tftpboot/1220SIP.cfg rename to plugins/wazo_avaya/v4_1_13/var/tftpboot/1220SIP.cfg diff --git a/plugins/wazo-avaya/4.1.13/var/tftpboot/1230.cfg b/plugins/wazo_avaya/v4_1_13/var/tftpboot/1230.cfg similarity index 100% rename from plugins/wazo-avaya/4.1.13/var/tftpboot/1230.cfg rename to plugins/wazo_avaya/v4_1_13/var/tftpboot/1230.cfg diff --git a/plugins/wazo-avaya/4.1.13/var/tftpboot/1230SIP.cfg b/plugins/wazo_avaya/v4_1_13/var/tftpboot/1230SIP.cfg similarity index 100% rename from plugins/wazo-avaya/4.1.13/var/tftpboot/1230SIP.cfg rename to plugins/wazo_avaya/v4_1_13/var/tftpboot/1230SIP.cfg diff --git a/plugins/wazo-cisco-sccp/build.py b/plugins/wazo_cisco_sccp/build.py similarity index 61% rename from plugins/wazo-cisco-sccp/build.py rename to plugins/wazo_cisco_sccp/build.py index 22b3648f9f2f7ab93656a05c84434085fe0d1e91..2655e8affcca4aab14d621a8072424a371d47787 100644 --- a/plugins/wazo-cisco-sccp/build.py +++ b/plugins/wazo_cisco_sccp/build.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,40 +15,45 @@ # Depends on the following external programs: # -rsync +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('8.5.2', 'wazo-cisco-sccp-8.5.2') -def build_8_5_2(path): +def build_8_5_2(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '8.5.2/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v8_5_2/', path]) @target('9.4', 'wazo-cisco-sccp-9.4') -def build_9_4(path): +def build_9_4(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '9.4/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v9_4/', path]) @target('cipc-2.1.2', 'wazo-cisco-sccp-cipc-2.1.2') -def build_cipc_2_1_2(path): +def build_cipc_2_1_2(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'cipc-2.1.2/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'cipc_v2_1_2/', path]) @target('legacy', 'wazo-cisco-sccp-legacy') -def build_legacy(path): +def build_legacy(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'legacy/', path]) @target('wireless-1.4.5', 'wazo-cisco-sccp-wireless-1.4.5') -def build_wireless(path): +def build_wireless(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'wireless-1.4.5/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'wireless_v1_4_5/', path]) diff --git a/plugins/wazo-cisco-sccp/cipc-2.1.2/entry.py b/plugins/wazo_cisco_sccp/cipc_v2_1_2/entry.py similarity index 100% rename from plugins/wazo-cisco-sccp/cipc-2.1.2/entry.py rename to plugins/wazo_cisco_sccp/cipc_v2_1_2/entry.py diff --git a/plugins/wazo-cisco-sccp/cipc-2.1.2/pkgs/pkgs.db b/plugins/wazo_cisco_sccp/cipc_v2_1_2/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sccp/cipc-2.1.2/pkgs/pkgs.db rename to plugins/wazo_cisco_sccp/cipc_v2_1_2/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sccp/cipc-2.1.2/plugin-info b/plugins/wazo_cisco_sccp/cipc_v2_1_2/plugin-info similarity index 100% rename from plugins/wazo-cisco-sccp/cipc-2.1.2/plugin-info rename to plugins/wazo_cisco_sccp/cipc_v2_1_2/plugin-info diff --git a/plugins/wazo-cisco-sccp/cipc-2.1.2/templates/CIPC.tpl b/plugins/wazo_cisco_sccp/cipc_v2_1_2/templates/CIPC.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/cipc-2.1.2/templates/CIPC.tpl rename to plugins/wazo_cisco_sccp/cipc_v2_1_2/templates/CIPC.tpl diff --git a/plugins/wazo-cisco-sccp/common/common.py b/plugins/wazo_cisco_sccp/common/common.py similarity index 100% rename from plugins/wazo-cisco-sccp/common/common.py rename to plugins/wazo_cisco_sccp/common/common.py diff --git a/plugins/wazo-cisco-sccp/common/templates/base.tpl b/plugins/wazo_cisco_sccp/common/templates/base.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/common/templates/base.tpl rename to plugins/wazo_cisco_sccp/common/templates/base.tpl diff --git a/plugins/wazo-cisco-sccp/legacy/entry.py b/plugins/wazo_cisco_sccp/legacy/entry.py similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/entry.py rename to plugins/wazo_cisco_sccp/legacy/entry.py diff --git a/plugins/wazo-cisco-sccp/legacy/pkgs/pkgs.db b/plugins/wazo_cisco_sccp/legacy/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/pkgs/pkgs.db rename to plugins/wazo_cisco_sccp/legacy/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sccp/legacy/plugin-info b/plugins/wazo_cisco_sccp/legacy/plugin-info similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/plugin-info rename to plugins/wazo_cisco_sccp/legacy/plugin-info diff --git a/plugins/wazo-cisco-sccp/legacy/templates/7905G.tpl b/plugins/wazo_cisco_sccp/legacy/templates/7905G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/templates/7905G.tpl rename to plugins/wazo_cisco_sccp/legacy/templates/7905G.tpl diff --git a/plugins/wazo-cisco-sccp/legacy/templates/7912G.tpl b/plugins/wazo_cisco_sccp/legacy/templates/7912G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/templates/7912G.tpl rename to plugins/wazo_cisco_sccp/legacy/templates/7912G.tpl diff --git a/plugins/wazo-cisco-sccp/legacy/templates/7920.tpl b/plugins/wazo_cisco_sccp/legacy/templates/7920.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/templates/7920.tpl rename to plugins/wazo_cisco_sccp/legacy/templates/7920.tpl diff --git a/plugins/wazo-cisco-sccp/legacy/templates/7937G.tpl b/plugins/wazo_cisco_sccp/legacy/templates/7937G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/templates/7937G.tpl rename to plugins/wazo_cisco_sccp/legacy/templates/7937G.tpl diff --git a/plugins/wazo-cisco-sccp/legacy/templates/7940.tpl b/plugins/wazo_cisco_sccp/legacy/templates/7940.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/templates/7940.tpl rename to plugins/wazo_cisco_sccp/legacy/templates/7940.tpl diff --git a/plugins/wazo-cisco-sccp/legacy/templates/7940G.tpl b/plugins/wazo_cisco_sccp/legacy/templates/7940G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/templates/7940G.tpl rename to plugins/wazo_cisco_sccp/legacy/templates/7940G.tpl diff --git a/plugins/wazo-cisco-sccp/legacy/templates/7960G.tpl b/plugins/wazo_cisco_sccp/legacy/templates/7960G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/templates/7960G.tpl rename to plugins/wazo_cisco_sccp/legacy/templates/7960G.tpl diff --git a/plugins/wazo-cisco-sccp/legacy/var/tftpboot/DISTINCTIVERINGLIST.XML b/plugins/wazo_cisco_sccp/legacy/var/tftpboot/DISTINCTIVERINGLIST.XML similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/var/tftpboot/DISTINCTIVERINGLIST.XML rename to plugins/wazo_cisco_sccp/legacy/var/tftpboot/DISTINCTIVERINGLIST.XML diff --git a/plugins/wazo-cisco-sccp/legacy/var/tftpboot/RINGLIST.XML b/plugins/wazo_cisco_sccp/legacy/var/tftpboot/RINGLIST.XML similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/var/tftpboot/RINGLIST.XML rename to plugins/wazo_cisco_sccp/legacy/var/tftpboot/RINGLIST.XML diff --git a/plugins/wazo-cisco-sccp/legacy/var/tftpboot/Ringlist.xml b/plugins/wazo_cisco_sccp/legacy/var/tftpboot/Ringlist.xml similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/var/tftpboot/Ringlist.xml rename to plugins/wazo_cisco_sccp/legacy/var/tftpboot/Ringlist.xml diff --git a/plugins/wazo-cisco-sccp/legacy/var/tftpboot/i18n/french_france/7905-font.xml b/plugins/wazo_cisco_sccp/legacy/var/tftpboot/i18n/french_france/7905-font.xml similarity index 100% rename from plugins/wazo-cisco-sccp/legacy/var/tftpboot/i18n/french_france/7905-font.xml rename to plugins/wazo_cisco_sccp/legacy/var/tftpboot/i18n/french_france/7905-font.xml diff --git a/plugins/wazo-cisco-sccp/8.5.2/entry.py b/plugins/wazo_cisco_sccp/v8_5_2/entry.py similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/entry.py rename to plugins/wazo_cisco_sccp/v8_5_2/entry.py diff --git a/plugins/wazo-cisco-sccp/8.5.2/install.md b/plugins/wazo_cisco_sccp/v8_5_2/install.md similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/install.md rename to plugins/wazo_cisco_sccp/v8_5_2/install.md diff --git a/plugins/wazo-cisco-sccp/8.5.2/pkgs/pkgs.db b/plugins/wazo_cisco_sccp/v8_5_2/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/pkgs/pkgs.db rename to plugins/wazo_cisco_sccp/v8_5_2/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sccp/8.5.2/plugin-info b/plugins/wazo_cisco_sccp/v8_5_2/plugin-info similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/plugin-info rename to plugins/wazo_cisco_sccp/v8_5_2/plugin-info diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7906G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7906G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7906G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7906G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7911G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7911G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7911G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7911G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7931G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7931G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7931G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7931G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7941G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7941G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7941G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7941G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7942G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7942G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7942G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7942G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7945G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7945G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7945G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7945G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7961G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7961G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7961G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7961G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7962G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7962G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7962G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7962G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7965G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7965G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7965G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7965G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7970G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7970G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7970G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7970G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7971G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7971G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7971G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7971G.tpl diff --git a/plugins/wazo-cisco-sccp/8.5.2/templates/7975G.tpl b/plugins/wazo_cisco_sccp/v8_5_2/templates/7975G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/8.5.2/templates/7975G.tpl rename to plugins/wazo_cisco_sccp/v8_5_2/templates/7975G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/entry.py b/plugins/wazo_cisco_sccp/v9_4/entry.py similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/entry.py rename to plugins/wazo_cisco_sccp/v9_4/entry.py diff --git a/plugins/wazo-cisco-sccp/9.4/install.md b/plugins/wazo_cisco_sccp/v9_4/install.md similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/install.md rename to plugins/wazo_cisco_sccp/v9_4/install.md diff --git a/plugins/wazo-cisco-sccp/9.4/limitations.md b/plugins/wazo_cisco_sccp/v9_4/limitations.md similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/limitations.md rename to plugins/wazo_cisco_sccp/v9_4/limitations.md diff --git a/plugins/wazo-cisco-sccp/9.4/pkgs/pkgs.db b/plugins/wazo_cisco_sccp/v9_4/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/pkgs/pkgs.db rename to plugins/wazo_cisco_sccp/v9_4/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sccp/9.4/plugin-info b/plugins/wazo_cisco_sccp/v9_4/plugin-info similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/plugin-info rename to plugins/wazo_cisco_sccp/v9_4/plugin-info diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7906G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7906G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7906G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7906G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7911G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7911G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7911G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7911G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7931G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7931G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7931G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7931G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7941G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7941G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7941G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7941G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7942G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7942G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7942G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7942G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7945G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7945G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7945G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7945G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7961G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7961G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7961G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7961G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7962G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7962G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7962G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7962G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7965G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7965G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7965G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7965G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7970G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7970G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7970G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7970G.tpl diff --git a/plugins/wazo-cisco-sccp/9.4/templates/7971G.tpl b/plugins/wazo_cisco_sccp/v9_4/templates/7971G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/9.4/templates/7971G.tpl rename to plugins/wazo_cisco_sccp/v9_4/templates/7971G.tpl diff --git a/plugins/wazo-cisco-sccp/wireless-1.4.5/entry.py b/plugins/wazo_cisco_sccp/wireless_v1_4_5/entry.py similarity index 100% rename from plugins/wazo-cisco-sccp/wireless-1.4.5/entry.py rename to plugins/wazo_cisco_sccp/wireless_v1_4_5/entry.py diff --git a/plugins/wazo-cisco-sccp/wireless-1.4.5/pkgs/pkgs.db b/plugins/wazo_cisco_sccp/wireless_v1_4_5/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sccp/wireless-1.4.5/pkgs/pkgs.db rename to plugins/wazo_cisco_sccp/wireless_v1_4_5/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sccp/wireless-1.4.5/plugin-info b/plugins/wazo_cisco_sccp/wireless_v1_4_5/plugin-info similarity index 100% rename from plugins/wazo-cisco-sccp/wireless-1.4.5/plugin-info rename to plugins/wazo_cisco_sccp/wireless_v1_4_5/plugin-info diff --git a/plugins/wazo-cisco-sccp/wireless-1.4.5/templates/7921G.tpl b/plugins/wazo_cisco_sccp/wireless_v1_4_5/templates/7921G.tpl similarity index 100% rename from plugins/wazo-cisco-sccp/wireless-1.4.5/templates/7921G.tpl rename to plugins/wazo_cisco_sccp/wireless_v1_4_5/templates/7921G.tpl diff --git a/plugins/wazo_cisco_sip/build.py b/plugins/wazo_cisco_sip/build.py new file mode 100644 index 0000000000000000000000000000000000000000..23590cc4b2bef24edb5ccf7465e3b81ce4ed90f7 --- /dev/null +++ b/plugins/wazo_cisco_sip/build.py @@ -0,0 +1,38 @@ +# Copyright 2018-2023 The Wazo Authors (see the AUTHORS file) +# SPDX-License-Identifier: GPL-3.0-or-later + +# Depends on the following external programs: +# -rsync +from __future__ import annotations + +from typing import TYPE_CHECKING, Callable +from subprocess import check_call + +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + + +@target('9.3', 'wazo-cisco-sip-9.3') +def build_9_3(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v9_3/', path]) + + +@target('11.1.0', 'wazo-cisco-sip-11.1.0') +def build_11_1_0(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'v11_1_0/', path]) + + +@target('11.3.1', 'wazo-cisco-sip-11.3.1') +def build_11_3_1(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'v11_3_1/', path]) + + +@target('12.0.1', 'wazo-cisco-sip-12.0.1') +def build_12_0_1(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'v12_0_1/', path]) diff --git a/plugins/wazo-cisco-sip/common/common.py b/plugins/wazo_cisco_sip/common/common.py similarity index 100% rename from plugins/wazo-cisco-sip/common/common.py rename to plugins/wazo_cisco_sip/common/common.py diff --git a/plugins/wazo-cisco-sip/common/templates/base.tpl b/plugins/wazo_cisco_sip/common/templates/base.tpl similarity index 100% rename from plugins/wazo-cisco-sip/common/templates/base.tpl rename to plugins/wazo_cisco_sip/common/templates/base.tpl diff --git a/plugins/wazo-cisco-sip/common/var/tftpboot/SoftKeys.xml b/plugins/wazo_cisco_sip/common/var/tftpboot/SoftKeys.xml similarity index 100% rename from plugins/wazo-cisco-sip/common/var/tftpboot/SoftKeys.xml rename to plugins/wazo_cisco_sip/common/var/tftpboot/SoftKeys.xml diff --git a/plugins/wazo-cisco-sip/common/var/tftpboot/dialplan.xml b/plugins/wazo_cisco_sip/common/var/tftpboot/dialplan.xml similarity index 100% rename from plugins/wazo-cisco-sip/common/var/tftpboot/dialplan.xml rename to plugins/wazo_cisco_sip/common/var/tftpboot/dialplan.xml diff --git a/plugins/wazo-cisco-sip/limitations.md b/plugins/wazo_cisco_sip/limitations.md similarity index 100% rename from plugins/wazo-cisco-sip/limitations.md rename to plugins/wazo_cisco_sip/limitations.md diff --git a/plugins/wazo-cisco-sip/11.1.0/common.py b/plugins/wazo_cisco_sip/v11_1_0/common.py similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/common.py rename to plugins/wazo_cisco_sip/v11_1_0/common.py diff --git a/plugins/wazo-cisco-sip/11.1.0/entry.py b/plugins/wazo_cisco_sip/v11_1_0/entry.py similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/entry.py rename to plugins/wazo_cisco_sip/v11_1_0/entry.py diff --git a/plugins/wazo-cisco-sip/11.1.0/pkgs/pkgs.db b/plugins/wazo_cisco_sip/v11_1_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/pkgs/pkgs.db rename to plugins/wazo_cisco_sip/v11_1_0/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sip/11.1.0/plugin-info b/plugins/wazo_cisco_sip/v11_1_0/plugin-info similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/plugin-info rename to plugins/wazo_cisco_sip/v11_1_0/plugin-info diff --git a/plugins/wazo-cisco-sip/11.1.0/templates/ATA191.tpl b/plugins/wazo_cisco_sip/v11_1_0/templates/ATA191.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/templates/ATA191.tpl rename to plugins/wazo_cisco_sip/v11_1_0/templates/ATA191.tpl diff --git a/plugins/wazo-cisco-sip/11.1.0/templates/ATA192.tpl b/plugins/wazo_cisco_sip/v11_1_0/templates/ATA192.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/templates/ATA192.tpl rename to plugins/wazo_cisco_sip/v11_1_0/templates/ATA192.tpl diff --git a/plugins/wazo-cisco-sip/11.1.0/templates/base.tpl b/plugins/wazo_cisco_sip/v11_1_0/templates/base.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/templates/base.tpl rename to plugins/wazo_cisco_sip/v11_1_0/templates/base.tpl diff --git a/plugins/wazo-cisco-sip/11.1.0/templates/common/model.cfg.tpl b/plugins/wazo_cisco_sip/v11_1_0/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_sip/v11_1_0/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-sip/11.1.0/var/tftpboot/spa-ata.xml b/plugins/wazo_cisco_sip/v11_1_0/var/tftpboot/spa-ata.xml similarity index 100% rename from plugins/wazo-cisco-sip/11.1.0/var/tftpboot/spa-ata.xml rename to plugins/wazo_cisco_sip/v11_1_0/var/tftpboot/spa-ata.xml diff --git a/plugins/wazo-cisco-sip/11.3.1/common.py b/plugins/wazo_cisco_sip/v11_3_1/common.py similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/common.py rename to plugins/wazo_cisco_sip/v11_3_1/common.py diff --git a/plugins/wazo-cisco-sip/11.3.1/entry.py b/plugins/wazo_cisco_sip/v11_3_1/entry.py similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/entry.py rename to plugins/wazo_cisco_sip/v11_3_1/entry.py diff --git a/plugins/wazo-cisco-sip/11.3.1/pkgs/pkgs.db b/plugins/wazo_cisco_sip/v11_3_1/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/pkgs/pkgs.db rename to plugins/wazo_cisco_sip/v11_3_1/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sip/11.3.1/plugin-info b/plugins/wazo_cisco_sip/v11_3_1/plugin-info similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/plugin-info rename to plugins/wazo_cisco_sip/v11_3_1/plugin-info diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/6821.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/6821.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/6821.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/6821.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/6841.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/6841.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/6841.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/6841.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/6851.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/6851.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/6851.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/6851.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/6861.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/6861.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/6861.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/6861.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/6871.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/6871.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/6871.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/6871.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/7811.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/7811.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/7811.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/7811.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/7821.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/7821.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/7821.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/7821.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/7832.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/7832.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/7832.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/7832.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/7841.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/7841.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/7841.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/7841.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/7861.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/7861.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/7861.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/7861.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/8811.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/8811.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/8811.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/8811.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/8841.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/8841.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/8841.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/8841.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/8851.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/8851.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/8851.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/8851.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/8861.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/8861.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/8861.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/8861.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/base.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/base.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/base.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/base.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/templates/common/model.cfg.tpl b/plugins/wazo_cisco_sip/v11_3_1/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_sip/v11_3_1/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-sip/11.3.1/var/tftpboot/cp-phone.xml b/plugins/wazo_cisco_sip/v11_3_1/var/tftpboot/cp-phone.xml similarity index 100% rename from plugins/wazo-cisco-sip/11.3.1/var/tftpboot/cp-phone.xml rename to plugins/wazo_cisco_sip/v11_3_1/var/tftpboot/cp-phone.xml diff --git a/plugins/wazo-cisco-sip/12.0.1/common.py b/plugins/wazo_cisco_sip/v12_0_1/common.py similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/common.py rename to plugins/wazo_cisco_sip/v12_0_1/common.py diff --git a/plugins/wazo-cisco-sip/12.0.1/entry.py b/plugins/wazo_cisco_sip/v12_0_1/entry.py similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/entry.py rename to plugins/wazo_cisco_sip/v12_0_1/entry.py diff --git a/plugins/wazo-cisco-sip/12.0.1/pkgs/pkgs.db b/plugins/wazo_cisco_sip/v12_0_1/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/pkgs/pkgs.db rename to plugins/wazo_cisco_sip/v12_0_1/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sip/12.0.1/plugin-info b/plugins/wazo_cisco_sip/v12_0_1/plugin-info similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/plugin-info rename to plugins/wazo_cisco_sip/v12_0_1/plugin-info diff --git a/plugins/wazo-cisco-sip/12.0.1/templates/8811.tpl b/plugins/wazo_cisco_sip/v12_0_1/templates/8811.tpl similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/templates/8811.tpl rename to plugins/wazo_cisco_sip/v12_0_1/templates/8811.tpl diff --git a/plugins/wazo-cisco-sip/12.0.1/templates/8841.tpl b/plugins/wazo_cisco_sip/v12_0_1/templates/8841.tpl similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/templates/8841.tpl rename to plugins/wazo_cisco_sip/v12_0_1/templates/8841.tpl diff --git a/plugins/wazo-cisco-sip/12.0.1/templates/8851.tpl b/plugins/wazo_cisco_sip/v12_0_1/templates/8851.tpl similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/templates/8851.tpl rename to plugins/wazo_cisco_sip/v12_0_1/templates/8851.tpl diff --git a/plugins/wazo-cisco-sip/12.0.1/templates/8861.tpl b/plugins/wazo_cisco_sip/v12_0_1/templates/8861.tpl similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/templates/8861.tpl rename to plugins/wazo_cisco_sip/v12_0_1/templates/8861.tpl diff --git a/plugins/wazo-cisco-sip/12.0.1/templates/base.tpl b/plugins/wazo_cisco_sip/v12_0_1/templates/base.tpl similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/templates/base.tpl rename to plugins/wazo_cisco_sip/v12_0_1/templates/base.tpl diff --git a/plugins/wazo-cisco-sip/12.0.1/templates/common/model.cfg.tpl b/plugins/wazo_cisco_sip/v12_0_1/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_sip/v12_0_1/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-sip/12.0.1/var/tftpboot/cp-phone.xml b/plugins/wazo_cisco_sip/v12_0_1/var/tftpboot/cp-phone.xml similarity index 100% rename from plugins/wazo-cisco-sip/12.0.1/var/tftpboot/cp-phone.xml rename to plugins/wazo_cisco_sip/v12_0_1/var/tftpboot/cp-phone.xml diff --git a/plugins/wazo-cisco-sip/9.3/entry.py b/plugins/wazo_cisco_sip/v9_3/entry.py similarity index 100% rename from plugins/wazo-cisco-sip/9.3/entry.py rename to plugins/wazo_cisco_sip/v9_3/entry.py diff --git a/plugins/wazo-cisco-sip/9.3/pkgs/pkgs.db b/plugins/wazo_cisco_sip/v9_3/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-sip/9.3/pkgs/pkgs.db rename to plugins/wazo_cisco_sip/v9_3/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-sip/9.3/plugin-info b/plugins/wazo_cisco_sip/v9_3/plugin-info similarity index 100% rename from plugins/wazo-cisco-sip/9.3/plugin-info rename to plugins/wazo_cisco_sip/v9_3/plugin-info diff --git a/plugins/wazo-cisco-sip/9.3/templates/8941.tpl b/plugins/wazo_cisco_sip/v9_3/templates/8941.tpl similarity index 100% rename from plugins/wazo-cisco-sip/9.3/templates/8941.tpl rename to plugins/wazo_cisco_sip/v9_3/templates/8941.tpl diff --git a/plugins/wazo-cisco-sip/9.3/templates/8945.tpl b/plugins/wazo_cisco_sip/v9_3/templates/8945.tpl similarity index 100% rename from plugins/wazo-cisco-sip/9.3/templates/8945.tpl rename to plugins/wazo_cisco_sip/v9_3/templates/8945.tpl diff --git a/plugins/wazo-cisco-spa/ata190-1.2.2/entry.py b/plugins/wazo_cisco_spa/ata190_v1_2_2/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/ata190-1.2.2/entry.py rename to plugins/wazo_cisco_spa/ata190_v1_2_2/entry.py diff --git a/plugins/wazo-cisco-spa/ata190-1.2.2/pkgs/pkgs.db b/plugins/wazo_cisco_spa/ata190_v1_2_2/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/ata190-1.2.2/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/ata190_v1_2_2/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/ata190-1.2.2/plugin-info b/plugins/wazo_cisco_spa/ata190_v1_2_2/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/ata190-1.2.2/plugin-info rename to plugins/wazo_cisco_spa/ata190_v1_2_2/plugin-info diff --git a/plugins/wazo-cisco-spa/ata190-1.2.2/templates/ATA190.tpl b/plugins/wazo_cisco_spa/ata190_v1_2_2/templates/ATA190.tpl similarity index 100% rename from plugins/wazo-cisco-spa/ata190-1.2.2/templates/ATA190.tpl rename to plugins/wazo_cisco_spa/ata190_v1_2_2/templates/ATA190.tpl diff --git a/plugins/wazo-cisco-spa/ata190-1.2.2/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/ata190_v1_2_2/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/ata190-1.2.2/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/ata190_v1_2_2/templates/common/model.cfg.tpl diff --git a/plugins/wazo_cisco_spa/build.py b/plugins/wazo_cisco_spa/build.py new file mode 100644 index 0000000000000000000000000000000000000000..f9446b8788cf36297b9796d401312cd3b51c04e8 --- /dev/null +++ b/plugins/wazo_cisco_spa/build.py @@ -0,0 +1,73 @@ +""" +Copyright 2014-2023 The Wazo Authors (see the AUTHORS file) +SPDX-License-Identifier: GPL-3.0+ + +Depends on the following external programs: + -rsync +""" +from __future__ import annotations + +from typing import TYPE_CHECKING, Callable +from subprocess import check_call + +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + + +@target('7.5.5', 'wazo-cisco-spa-7.5.5') +def build_7_5_5(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v7_5_5/', path]) + + +@target('legacy', 'wazo-cisco-spa-legacy') +def build_legacy(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'legacy/', path]) + + +@target('pap2t-5.1.6', 'wazo-cisco-pap2t-5.1.6') +def build_pap2t_5_1_6(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'pap2t_v5_1_6/', path]) + + +@target('spa100-1.3.5p', 'wazo-cisco-spa100-1.3.5p') +def build_spa100_1_3_5p(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'spa100_v1_3_5p/', path]) + + +@target('spa2102-5.2.12', 'wazo-cisco-spa2102-5.2.12') +def build_spa2102_5_2_12(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'spa2102_v5_2_12/', path]) + + +@target('spa3102-5.1.10', 'wazo-cisco-spa3102-5.1.10') +def build_spa3102_5_1_10(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'spa3102_v5_1_10/', path]) + + +@target('spa8000-6.1.11', 'wazo-cisco-spa8000-6.1.11') +def build_spa8000_6_1_11(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'spa8000_v6_1_11/', path]) + + +@target('spa8800-6.1.7', 'wazo-cisco-spa8800-6.1.7') +def build_spa8800_6_1_7(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'spa8800_v6_1_7/', path]) + + +@target('ata190-1.2.2', 'wazo-cisco-ata190-1.2.2') +def build_ata190_1_2_2(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'ata190_v1_2_2/', path]) diff --git a/plugins/wazo-cisco-spa/common/common.py b/plugins/wazo_cisco_spa/common/common.py similarity index 100% rename from plugins/wazo-cisco-spa/common/common.py rename to plugins/wazo_cisco_spa/common/common.py diff --git a/plugins/wazo-cisco-spa/common/install.md b/plugins/wazo_cisco_spa/common/install.md similarity index 100% rename from plugins/wazo-cisco-spa/common/install.md rename to plugins/wazo_cisco_spa/common/install.md diff --git a/plugins/wazo-cisco-spa/common/templates/base.tpl b/plugins/wazo_cisco_spa/common/templates/base.tpl similarity index 100% rename from plugins/wazo-cisco-spa/common/templates/base.tpl rename to plugins/wazo_cisco_spa/common/templates/base.tpl diff --git a/plugins/wazo-cisco-spa/common/var/tftpboot/spa-ata.xml b/plugins/wazo_cisco_spa/common/var/tftpboot/spa-ata.xml similarity index 100% rename from plugins/wazo-cisco-spa/common/var/tftpboot/spa-ata.xml rename to plugins/wazo_cisco_spa/common/var/tftpboot/spa-ata.xml diff --git a/plugins/wazo-cisco-spa/common/var/tftpboot/spa-phone.xml b/plugins/wazo_cisco_spa/common/var/tftpboot/spa-phone.xml similarity index 100% rename from plugins/wazo-cisco-spa/common/var/tftpboot/spa-phone.xml rename to plugins/wazo_cisco_spa/common/var/tftpboot/spa-phone.xml diff --git a/plugins/wazo-cisco-spa/legacy/entry.py b/plugins/wazo_cisco_spa/legacy/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/legacy/entry.py rename to plugins/wazo_cisco_spa/legacy/entry.py diff --git a/plugins/wazo-cisco-spa/legacy/install.md b/plugins/wazo_cisco_spa/legacy/install.md similarity index 100% rename from plugins/wazo-cisco-spa/legacy/install.md rename to plugins/wazo_cisco_spa/legacy/install.md diff --git a/plugins/wazo-cisco-spa/legacy/pkgs/pkgs.db b/plugins/wazo_cisco_spa/legacy/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/legacy/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/legacy/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/legacy/plugin-info b/plugins/wazo_cisco_spa/legacy/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/legacy/plugin-info rename to plugins/wazo_cisco_spa/legacy/plugin-info diff --git a/plugins/wazo-cisco-spa/legacy/templates/SPA901.tpl b/plugins/wazo_cisco_spa/legacy/templates/SPA901.tpl similarity index 100% rename from plugins/wazo-cisco-spa/legacy/templates/SPA901.tpl rename to plugins/wazo_cisco_spa/legacy/templates/SPA901.tpl diff --git a/plugins/wazo-cisco-spa/legacy/templates/SPA921.tpl b/plugins/wazo_cisco_spa/legacy/templates/SPA921.tpl similarity index 100% rename from plugins/wazo-cisco-spa/legacy/templates/SPA921.tpl rename to plugins/wazo_cisco_spa/legacy/templates/SPA921.tpl diff --git a/plugins/wazo-cisco-spa/legacy/templates/SPA922.tpl b/plugins/wazo_cisco_spa/legacy/templates/SPA922.tpl similarity index 100% rename from plugins/wazo-cisco-spa/legacy/templates/SPA922.tpl rename to plugins/wazo_cisco_spa/legacy/templates/SPA922.tpl diff --git a/plugins/wazo-cisco-spa/legacy/templates/SPA941.tpl b/plugins/wazo_cisco_spa/legacy/templates/SPA941.tpl similarity index 100% rename from plugins/wazo-cisco-spa/legacy/templates/SPA941.tpl rename to plugins/wazo_cisco_spa/legacy/templates/SPA941.tpl diff --git a/plugins/wazo-cisco-spa/legacy/templates/SPA942.tpl b/plugins/wazo_cisco_spa/legacy/templates/SPA942.tpl similarity index 100% rename from plugins/wazo-cisco-spa/legacy/templates/SPA942.tpl rename to plugins/wazo_cisco_spa/legacy/templates/SPA942.tpl diff --git a/plugins/wazo-cisco-spa/legacy/templates/SPA962.tpl b/plugins/wazo_cisco_spa/legacy/templates/SPA962.tpl similarity index 100% rename from plugins/wazo-cisco-spa/legacy/templates/SPA962.tpl rename to plugins/wazo_cisco_spa/legacy/templates/SPA962.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/legacy/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/legacy/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-spa/pap2t-5.1.6/entry.py b/plugins/wazo_cisco_spa/pap2t_v5_1_6/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/pap2t-5.1.6/entry.py rename to plugins/wazo_cisco_spa/pap2t_v5_1_6/entry.py diff --git a/plugins/wazo-cisco-spa/pap2t-5.1.6/pkgs/pkgs.db b/plugins/wazo_cisco_spa/pap2t_v5_1_6/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/pap2t-5.1.6/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/pap2t_v5_1_6/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/pap2t-5.1.6/plugin-info b/plugins/wazo_cisco_spa/pap2t_v5_1_6/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/pap2t-5.1.6/plugin-info rename to plugins/wazo_cisco_spa/pap2t_v5_1_6/plugin-info diff --git a/plugins/wazo-cisco-spa/pap2t-5.1.6/templates/PAP2T.tpl b/plugins/wazo_cisco_spa/pap2t_v5_1_6/templates/PAP2T.tpl similarity index 100% rename from plugins/wazo-cisco-spa/pap2t-5.1.6/templates/PAP2T.tpl rename to plugins/wazo_cisco_spa/pap2t_v5_1_6/templates/PAP2T.tpl diff --git a/plugins/wazo-cisco-spa/pap2t-5.1.6/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/pap2t_v5_1_6/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/pap2t-5.1.6/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/pap2t_v5_1_6/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-spa/spa100-1.3.5p/entry.py b/plugins/wazo_cisco_spa/spa100_v1_3_5p/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/spa100-1.3.5p/entry.py rename to plugins/wazo_cisco_spa/spa100_v1_3_5p/entry.py diff --git a/plugins/wazo-cisco-spa/spa100-1.3.5p/pkgs/pkgs.db b/plugins/wazo_cisco_spa/spa100_v1_3_5p/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/spa100-1.3.5p/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/spa100_v1_3_5p/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/spa100-1.3.5p/plugin-info b/plugins/wazo_cisco_spa/spa100_v1_3_5p/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/spa100-1.3.5p/plugin-info rename to plugins/wazo_cisco_spa/spa100_v1_3_5p/plugin-info diff --git a/plugins/wazo-cisco-spa/spa100-1.3.5p/templates/SPA112.tpl b/plugins/wazo_cisco_spa/spa100_v1_3_5p/templates/SPA112.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa100-1.3.5p/templates/SPA112.tpl rename to plugins/wazo_cisco_spa/spa100_v1_3_5p/templates/SPA112.tpl diff --git a/plugins/wazo-cisco-spa/spa100-1.3.5p/templates/SPA122.tpl b/plugins/wazo_cisco_spa/spa100_v1_3_5p/templates/SPA122.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa100-1.3.5p/templates/SPA122.tpl rename to plugins/wazo_cisco_spa/spa100_v1_3_5p/templates/SPA122.tpl diff --git a/plugins/wazo-cisco-spa/spa100-1.3.5p/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/spa100_v1_3_5p/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa100-1.3.5p/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/spa100_v1_3_5p/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-spa/spa2102-5.2.12/entry.py b/plugins/wazo_cisco_spa/spa2102_v5_2_12/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/spa2102-5.2.12/entry.py rename to plugins/wazo_cisco_spa/spa2102_v5_2_12/entry.py diff --git a/plugins/wazo-cisco-spa/spa2102-5.2.12/pkgs/pkgs.db b/plugins/wazo_cisco_spa/spa2102_v5_2_12/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/spa2102-5.2.12/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/spa2102_v5_2_12/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/spa2102-5.2.12/plugin-info b/plugins/wazo_cisco_spa/spa2102_v5_2_12/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/spa2102-5.2.12/plugin-info rename to plugins/wazo_cisco_spa/spa2102_v5_2_12/plugin-info diff --git a/plugins/wazo-cisco-spa/spa2102-5.2.12/templates/SPA2102.tpl b/plugins/wazo_cisco_spa/spa2102_v5_2_12/templates/SPA2102.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa2102-5.2.12/templates/SPA2102.tpl rename to plugins/wazo_cisco_spa/spa2102_v5_2_12/templates/SPA2102.tpl diff --git a/plugins/wazo-cisco-spa/spa2102-5.2.12/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/spa2102_v5_2_12/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa2102-5.2.12/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/spa2102_v5_2_12/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-spa/spa3102-5.1.10/entry.py b/plugins/wazo_cisco_spa/spa3102_v5_1_10/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/spa3102-5.1.10/entry.py rename to plugins/wazo_cisco_spa/spa3102_v5_1_10/entry.py diff --git a/plugins/wazo-cisco-spa/spa3102-5.1.10/pkgs/pkgs.db b/plugins/wazo_cisco_spa/spa3102_v5_1_10/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/spa3102-5.1.10/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/spa3102_v5_1_10/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/spa3102-5.1.10/plugin-info b/plugins/wazo_cisco_spa/spa3102_v5_1_10/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/spa3102-5.1.10/plugin-info rename to plugins/wazo_cisco_spa/spa3102_v5_1_10/plugin-info diff --git a/plugins/wazo-cisco-spa/spa3102-5.1.10/templates/SPA3102.tpl b/plugins/wazo_cisco_spa/spa3102_v5_1_10/templates/SPA3102.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa3102-5.1.10/templates/SPA3102.tpl rename to plugins/wazo_cisco_spa/spa3102_v5_1_10/templates/SPA3102.tpl diff --git a/plugins/wazo-cisco-spa/spa3102-5.1.10/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/spa3102_v5_1_10/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa3102-5.1.10/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/spa3102_v5_1_10/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-spa/spa8000-6.1.11/entry.py b/plugins/wazo_cisco_spa/spa8000_v6_1_11/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/spa8000-6.1.11/entry.py rename to plugins/wazo_cisco_spa/spa8000_v6_1_11/entry.py diff --git a/plugins/wazo-cisco-spa/spa8000-6.1.11/pkgs/pkgs.db b/plugins/wazo_cisco_spa/spa8000_v6_1_11/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/spa8000-6.1.11/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/spa8000_v6_1_11/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/spa8000-6.1.11/plugin-info b/plugins/wazo_cisco_spa/spa8000_v6_1_11/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/spa8000-6.1.11/plugin-info rename to plugins/wazo_cisco_spa/spa8000_v6_1_11/plugin-info diff --git a/plugins/wazo-cisco-spa/spa8000-6.1.11/templates/SPA8000.tpl b/plugins/wazo_cisco_spa/spa8000_v6_1_11/templates/SPA8000.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa8000-6.1.11/templates/SPA8000.tpl rename to plugins/wazo_cisco_spa/spa8000_v6_1_11/templates/SPA8000.tpl diff --git a/plugins/wazo-cisco-spa/spa8000-6.1.11/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/spa8000_v6_1_11/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa8000-6.1.11/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/spa8000_v6_1_11/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-spa/spa8800-6.1.7/entry.py b/plugins/wazo_cisco_spa/spa8800_v6_1_7/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/spa8800-6.1.7/entry.py rename to plugins/wazo_cisco_spa/spa8800_v6_1_7/entry.py diff --git a/plugins/wazo-cisco-spa/spa8800-6.1.7/pkgs/pkgs.db b/plugins/wazo_cisco_spa/spa8800_v6_1_7/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/spa8800-6.1.7/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/spa8800_v6_1_7/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/spa8800-6.1.7/plugin-info b/plugins/wazo_cisco_spa/spa8800_v6_1_7/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/spa8800-6.1.7/plugin-info rename to plugins/wazo_cisco_spa/spa8800_v6_1_7/plugin-info diff --git a/plugins/wazo-cisco-spa/spa8800-6.1.7/templates/SPA8800.tpl b/plugins/wazo_cisco_spa/spa8800_v6_1_7/templates/SPA8800.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa8800-6.1.7/templates/SPA8800.tpl rename to plugins/wazo_cisco_spa/spa8800_v6_1_7/templates/SPA8800.tpl diff --git a/plugins/wazo-cisco-spa/spa8800-6.1.7/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/spa8800_v6_1_7/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/spa8800-6.1.7/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/spa8800_v6_1_7/templates/common/model.cfg.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/entry.py b/plugins/wazo_cisco_spa/v7_5_5/entry.py similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/entry.py rename to plugins/wazo_cisco_spa/v7_5_5/entry.py diff --git a/plugins/wazo-cisco-spa/7.5.5/pkgs/pkgs.db b/plugins/wazo_cisco_spa/v7_5_5/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/pkgs/pkgs.db rename to plugins/wazo_cisco_spa/v7_5_5/pkgs/pkgs.db diff --git a/plugins/wazo-cisco-spa/7.5.5/plugin-info b/plugins/wazo_cisco_spa/v7_5_5/plugin-info similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/plugin-info rename to plugins/wazo_cisco_spa/v7_5_5/plugin-info diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA301.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA301.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA301.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA301.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA303.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA303.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA303.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA303.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA501G.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA501G.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA501G.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA501G.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA502G.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA502G.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA502G.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA502G.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA504G.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA504G.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA504G.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA504G.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA508G.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA508G.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA508G.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA508G.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA509G.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA509G.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA509G.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA509G.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA512G.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA512G.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA512G.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA512G.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA514G.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA514G.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA514G.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA514G.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA525G.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA525G.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA525G.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA525G.tpl diff --git a/plugins/wazo-cisco-spa/7.5.5/templates/SPA525G2.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/SPA525G2.tpl similarity index 100% rename from plugins/wazo-cisco-spa/7.5.5/templates/SPA525G2.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/SPA525G2.tpl diff --git a/plugins/wazo-cisco-spa/legacy/templates/common/model.cfg.tpl b/plugins/wazo_cisco_spa/v7_5_5/templates/common/model.cfg.tpl similarity index 100% rename from plugins/wazo-cisco-spa/legacy/templates/common/model.cfg.tpl rename to plugins/wazo_cisco_spa/v7_5_5/templates/common/model.cfg.tpl diff --git a/plugins/wazo-digium/build.py b/plugins/wazo_digium/build.py similarity index 60% rename from plugins/wazo-digium/build.py rename to plugins/wazo_digium/build.py index 1f9d4facc1af93b25e2e15f5f90bcde3b76f8335..00b9367de2def910d6d55db1b3ce2eb24e8a2bb8 100644 --- a/plugins/wazo-digium/build.py +++ b/plugins/wazo_digium/build.py @@ -1,4 +1,4 @@ -# Copyright 2014-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2014-2023 The Wazo Authors (see the AUTHORS file) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -12,26 +12,31 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see - +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('1.4.0.0', 'wazo-digium-1.4.0.0') -def build_1_4_0_0(path): +def build_1_4_0_0(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.4.0.0/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_4_0_0/', path]) @target('2.2.1.8', 'wazo-digium-2.2.1.8') -def build_2_2_1_8(path): +def build_2_2_1_8(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '2.2.1.8/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v2_2_1_8/', path]) @target('2.8.1', 'wazo-digium-2.8.1') -def build_2_8_1(path): +def build_2_8_1(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '2.8.1/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v2_8_1/', path]) diff --git a/plugins/wazo-digium/common/common.py b/plugins/wazo_digium/common/common.py similarity index 100% rename from plugins/wazo-digium/common/common.py rename to plugins/wazo_digium/common/common.py diff --git a/plugins/wazo-digium/common/templates/base.tpl b/plugins/wazo_digium/common/templates/base.tpl similarity index 100% rename from plugins/wazo-digium/common/templates/base.tpl rename to plugins/wazo_digium/common/templates/base.tpl diff --git a/plugins/wazo-digium/common/templates/contact.tpl b/plugins/wazo_digium/common/templates/contact.tpl similarity index 100% rename from plugins/wazo-digium/common/templates/contact.tpl rename to plugins/wazo_digium/common/templates/contact.tpl diff --git a/plugins/wazo-digium/common/var/tftpboot/Digium/.gitignore b/plugins/wazo_digium/common/var/tftpboot/Digium/.gitignore similarity index 100% rename from plugins/wazo-digium/common/var/tftpboot/Digium/.gitignore rename to plugins/wazo_digium/common/var/tftpboot/Digium/.gitignore diff --git a/plugins/wazo-digium/1.4.0.0/entry.py b/plugins/wazo_digium/v1_4_0_0/entry.py similarity index 100% rename from plugins/wazo-digium/1.4.0.0/entry.py rename to plugins/wazo_digium/v1_4_0_0/entry.py diff --git a/plugins/wazo-digium/1.4.0.0/pkgs/pkgs.db b/plugins/wazo_digium/v1_4_0_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-digium/1.4.0.0/pkgs/pkgs.db rename to plugins/wazo_digium/v1_4_0_0/pkgs/pkgs.db diff --git a/plugins/wazo-digium/1.4.0.0/plugin-info b/plugins/wazo_digium/v1_4_0_0/plugin-info similarity index 100% rename from plugins/wazo-digium/1.4.0.0/plugin-info rename to plugins/wazo_digium/v1_4_0_0/plugin-info diff --git a/plugins/wazo-digium/1.4.0.0/templates/D40.tpl b/plugins/wazo_digium/v1_4_0_0/templates/D40.tpl similarity index 100% rename from plugins/wazo-digium/1.4.0.0/templates/D40.tpl rename to plugins/wazo_digium/v1_4_0_0/templates/D40.tpl diff --git a/plugins/wazo-digium/1.4.0.0/templates/D50.tpl b/plugins/wazo_digium/v1_4_0_0/templates/D50.tpl similarity index 100% rename from plugins/wazo-digium/1.4.0.0/templates/D50.tpl rename to plugins/wazo_digium/v1_4_0_0/templates/D50.tpl diff --git a/plugins/wazo-digium/1.4.0.0/templates/D70.tpl b/plugins/wazo_digium/v1_4_0_0/templates/D70.tpl similarity index 100% rename from plugins/wazo-digium/1.4.0.0/templates/D70.tpl rename to plugins/wazo_digium/v1_4_0_0/templates/D70.tpl diff --git a/plugins/wazo-digium/1.4.0.0/templates/firmware.tpl b/plugins/wazo_digium/v1_4_0_0/templates/firmware.tpl similarity index 100% rename from plugins/wazo-digium/1.4.0.0/templates/firmware.tpl rename to plugins/wazo_digium/v1_4_0_0/templates/firmware.tpl diff --git a/plugins/wazo-digium/2.2.1.8/entry.py b/plugins/wazo_digium/v2_2_1_8/entry.py similarity index 100% rename from plugins/wazo-digium/2.2.1.8/entry.py rename to plugins/wazo_digium/v2_2_1_8/entry.py diff --git a/plugins/wazo-digium/2.2.1.8/pkgs/pkgs.db b/plugins/wazo_digium/v2_2_1_8/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-digium/2.2.1.8/pkgs/pkgs.db rename to plugins/wazo_digium/v2_2_1_8/pkgs/pkgs.db diff --git a/plugins/wazo-digium/2.2.1.8/plugin-info b/plugins/wazo_digium/v2_2_1_8/plugin-info similarity index 100% rename from plugins/wazo-digium/2.2.1.8/plugin-info rename to plugins/wazo_digium/v2_2_1_8/plugin-info diff --git a/plugins/wazo-digium/2.2.1.8/templates/D40.tpl b/plugins/wazo_digium/v2_2_1_8/templates/D40.tpl similarity index 100% rename from plugins/wazo-digium/2.2.1.8/templates/D40.tpl rename to plugins/wazo_digium/v2_2_1_8/templates/D40.tpl diff --git a/plugins/wazo-digium/2.2.1.8/templates/D45.tpl b/plugins/wazo_digium/v2_2_1_8/templates/D45.tpl similarity index 100% rename from plugins/wazo-digium/2.2.1.8/templates/D45.tpl rename to plugins/wazo_digium/v2_2_1_8/templates/D45.tpl diff --git a/plugins/wazo-digium/2.2.1.8/templates/D50.tpl b/plugins/wazo_digium/v2_2_1_8/templates/D50.tpl similarity index 100% rename from plugins/wazo-digium/2.2.1.8/templates/D50.tpl rename to plugins/wazo_digium/v2_2_1_8/templates/D50.tpl diff --git a/plugins/wazo-digium/2.2.1.8/templates/D60.tpl b/plugins/wazo_digium/v2_2_1_8/templates/D60.tpl similarity index 100% rename from plugins/wazo-digium/2.2.1.8/templates/D60.tpl rename to plugins/wazo_digium/v2_2_1_8/templates/D60.tpl diff --git a/plugins/wazo-digium/2.2.1.8/templates/D62.tpl b/plugins/wazo_digium/v2_2_1_8/templates/D62.tpl similarity index 100% rename from plugins/wazo-digium/2.2.1.8/templates/D62.tpl rename to plugins/wazo_digium/v2_2_1_8/templates/D62.tpl diff --git a/plugins/wazo-digium/2.2.1.8/templates/D65.tpl b/plugins/wazo_digium/v2_2_1_8/templates/D65.tpl similarity index 100% rename from plugins/wazo-digium/2.2.1.8/templates/D65.tpl rename to plugins/wazo_digium/v2_2_1_8/templates/D65.tpl diff --git a/plugins/wazo-digium/2.2.1.8/templates/D70.tpl b/plugins/wazo_digium/v2_2_1_8/templates/D70.tpl similarity index 100% rename from plugins/wazo-digium/2.2.1.8/templates/D70.tpl rename to plugins/wazo_digium/v2_2_1_8/templates/D70.tpl diff --git a/plugins/wazo-digium/2.2.1.8/templates/firmware.tpl b/plugins/wazo_digium/v2_2_1_8/templates/firmware.tpl similarity index 100% rename from plugins/wazo-digium/2.2.1.8/templates/firmware.tpl rename to plugins/wazo_digium/v2_2_1_8/templates/firmware.tpl diff --git a/plugins/wazo-digium/2.8.1/entry.py b/plugins/wazo_digium/v2_8_1/entry.py similarity index 100% rename from plugins/wazo-digium/2.8.1/entry.py rename to plugins/wazo_digium/v2_8_1/entry.py diff --git a/plugins/wazo-digium/2.8.1/pkgs/pkgs.db b/plugins/wazo_digium/v2_8_1/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-digium/2.8.1/pkgs/pkgs.db rename to plugins/wazo_digium/v2_8_1/pkgs/pkgs.db diff --git a/plugins/wazo-digium/2.8.1/plugin-info b/plugins/wazo_digium/v2_8_1/plugin-info similarity index 100% rename from plugins/wazo-digium/2.8.1/plugin-info rename to plugins/wazo_digium/v2_8_1/plugin-info diff --git a/plugins/wazo-digium/2.8.1/templates/D40.tpl b/plugins/wazo_digium/v2_8_1/templates/D40.tpl similarity index 100% rename from plugins/wazo-digium/2.8.1/templates/D40.tpl rename to plugins/wazo_digium/v2_8_1/templates/D40.tpl diff --git a/plugins/wazo-digium/2.8.1/templates/D45.tpl b/plugins/wazo_digium/v2_8_1/templates/D45.tpl similarity index 100% rename from plugins/wazo-digium/2.8.1/templates/D45.tpl rename to plugins/wazo_digium/v2_8_1/templates/D45.tpl diff --git a/plugins/wazo-digium/2.8.1/templates/D50.tpl b/plugins/wazo_digium/v2_8_1/templates/D50.tpl similarity index 100% rename from plugins/wazo-digium/2.8.1/templates/D50.tpl rename to plugins/wazo_digium/v2_8_1/templates/D50.tpl diff --git a/plugins/wazo-digium/2.8.1/templates/D60.tpl b/plugins/wazo_digium/v2_8_1/templates/D60.tpl similarity index 100% rename from plugins/wazo-digium/2.8.1/templates/D60.tpl rename to plugins/wazo_digium/v2_8_1/templates/D60.tpl diff --git a/plugins/wazo-digium/2.8.1/templates/D62.tpl b/plugins/wazo_digium/v2_8_1/templates/D62.tpl similarity index 100% rename from plugins/wazo-digium/2.8.1/templates/D62.tpl rename to plugins/wazo_digium/v2_8_1/templates/D62.tpl diff --git a/plugins/wazo-digium/2.8.1/templates/D65.tpl b/plugins/wazo_digium/v2_8_1/templates/D65.tpl similarity index 100% rename from plugins/wazo-digium/2.8.1/templates/D65.tpl rename to plugins/wazo_digium/v2_8_1/templates/D65.tpl diff --git a/plugins/wazo-digium/2.8.1/templates/D70.tpl b/plugins/wazo_digium/v2_8_1/templates/D70.tpl similarity index 100% rename from plugins/wazo-digium/2.8.1/templates/D70.tpl rename to plugins/wazo_digium/v2_8_1/templates/D70.tpl diff --git a/plugins/wazo-digium/2.8.1/templates/firmware.tpl b/plugins/wazo_digium/v2_8_1/templates/firmware.tpl similarity index 100% rename from plugins/wazo-digium/2.8.1/templates/firmware.tpl rename to plugins/wazo_digium/v2_8_1/templates/firmware.tpl diff --git a/plugins/wazo-fanvil/common/__init__.py b/plugins/wazo_fanvil/__init__.py similarity index 100% rename from plugins/wazo-fanvil/common/__init__.py rename to plugins/wazo_fanvil/__init__.py diff --git a/plugins/wazo_fanvil/build.py b/plugins/wazo_fanvil/build.py new file mode 100644 index 0000000000000000000000000000000000000000..8114ab007e6e671b1066befad32f62a83116166b --- /dev/null +++ b/plugins/wazo_fanvil/build.py @@ -0,0 +1,43 @@ +""" +Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) +SPDX-License-Identifier: GPL-3.0-or-later + +Depends on the following external programs: + -rsync +""" +from __future__ import annotations + +from typing import TYPE_CHECKING, Callable +from subprocess import check_call + +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + + +@target('2.3', 'wazo-fanvil-2.3') +def build_2_3(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v2_3/', path]) + + +@target('serie-x', 'wazo-fanvil-serie-x') +def build_x(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'serie_x/', path]) + + +@target('serie-v', 'wazo-fanvil-serie-v') +def build_v(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'serie_v/', path]) + + +@target('serie-i', 'wazo-fanvil-serie-i') +def build_i(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'serie_i/', path]) diff --git a/plugins/wazo-fanvil/common/tests/__init__.py b/plugins/wazo_fanvil/common/__init__.py similarity index 100% rename from plugins/wazo-fanvil/common/tests/__init__.py rename to plugins/wazo_fanvil/common/__init__.py diff --git a/plugins/wazo-fanvil/common/common.py b/plugins/wazo_fanvil/common/common.py similarity index 100% rename from plugins/wazo-fanvil/common/common.py rename to plugins/wazo_fanvil/common/common.py diff --git a/plugins/wazo-fanvil/common/templates/V62.tpl b/plugins/wazo_fanvil/common/templates/V62.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/V62.tpl rename to plugins/wazo_fanvil/common/templates/V62.tpl diff --git a/plugins/wazo-fanvil/common/templates/V64.tpl b/plugins/wazo_fanvil/common/templates/V64.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/V64.tpl rename to plugins/wazo_fanvil/common/templates/V64.tpl diff --git a/plugins/wazo-fanvil/common/templates/V65.tpl b/plugins/wazo_fanvil/common/templates/V65.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/V65.tpl rename to plugins/wazo_fanvil/common/templates/V65.tpl diff --git a/plugins/wazo-fanvil/common/templates/V67.tpl b/plugins/wazo_fanvil/common/templates/V67.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/V67.tpl rename to plugins/wazo_fanvil/common/templates/V67.tpl diff --git a/plugins/wazo-fanvil/common/templates/X2.tpl b/plugins/wazo_fanvil/common/templates/X2.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X2.tpl rename to plugins/wazo_fanvil/common/templates/X2.tpl diff --git a/plugins/wazo-fanvil/common/templates/X210-Pro.tpl b/plugins/wazo_fanvil/common/templates/X210-Pro.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X210-Pro.tpl rename to plugins/wazo_fanvil/common/templates/X210-Pro.tpl diff --git a/plugins/wazo-fanvil/common/templates/X210.tpl b/plugins/wazo_fanvil/common/templates/X210.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X210.tpl rename to plugins/wazo_fanvil/common/templates/X210.tpl diff --git a/plugins/wazo-fanvil/common/templates/X210i-Pro.tpl b/plugins/wazo_fanvil/common/templates/X210i-Pro.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X210i-Pro.tpl rename to plugins/wazo_fanvil/common/templates/X210i-Pro.tpl diff --git a/plugins/wazo-fanvil/common/templates/X210i.tpl b/plugins/wazo_fanvil/common/templates/X210i.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X210i.tpl rename to plugins/wazo_fanvil/common/templates/X210i.tpl diff --git a/plugins/wazo-fanvil/common/templates/X3.tpl b/plugins/wazo_fanvil/common/templates/X3.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X3.tpl rename to plugins/wazo_fanvil/common/templates/X3.tpl diff --git a/plugins/wazo-fanvil/common/templates/X3S.tpl b/plugins/wazo_fanvil/common/templates/X3S.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X3S.tpl rename to plugins/wazo_fanvil/common/templates/X3S.tpl diff --git a/plugins/wazo-fanvil/common/templates/X3SG.tpl b/plugins/wazo_fanvil/common/templates/X3SG.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X3SG.tpl rename to plugins/wazo_fanvil/common/templates/X3SG.tpl diff --git a/plugins/wazo-fanvil/common/templates/X4.tpl b/plugins/wazo_fanvil/common/templates/X4.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X4.tpl rename to plugins/wazo_fanvil/common/templates/X4.tpl diff --git a/plugins/wazo-fanvil/common/templates/X4U-Pro.tpl b/plugins/wazo_fanvil/common/templates/X4U-Pro.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X4U-Pro.tpl rename to plugins/wazo_fanvil/common/templates/X4U-Pro.tpl diff --git a/plugins/wazo-fanvil/common/templates/X4U.tpl b/plugins/wazo_fanvil/common/templates/X4U.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X4U.tpl rename to plugins/wazo_fanvil/common/templates/X4U.tpl diff --git a/plugins/wazo-fanvil/common/templates/X5.tpl b/plugins/wazo_fanvil/common/templates/X5.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X5.tpl rename to plugins/wazo_fanvil/common/templates/X5.tpl diff --git a/plugins/wazo-fanvil/common/templates/X5S.tpl b/plugins/wazo_fanvil/common/templates/X5S.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X5S.tpl rename to plugins/wazo_fanvil/common/templates/X5S.tpl diff --git a/plugins/wazo-fanvil/common/templates/X5U-Pro.tpl b/plugins/wazo_fanvil/common/templates/X5U-Pro.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X5U-Pro.tpl rename to plugins/wazo_fanvil/common/templates/X5U-Pro.tpl diff --git a/plugins/wazo-fanvil/common/templates/X5U.tpl b/plugins/wazo_fanvil/common/templates/X5U.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X5U.tpl rename to plugins/wazo_fanvil/common/templates/X5U.tpl diff --git a/plugins/wazo-fanvil/common/templates/X6.tpl b/plugins/wazo_fanvil/common/templates/X6.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X6.tpl rename to plugins/wazo_fanvil/common/templates/X6.tpl diff --git a/plugins/wazo-fanvil/common/templates/X6U-Pro.tpl b/plugins/wazo_fanvil/common/templates/X6U-Pro.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X6U-Pro.tpl rename to plugins/wazo_fanvil/common/templates/X6U-Pro.tpl diff --git a/plugins/wazo-fanvil/common/templates/X6U.tpl b/plugins/wazo_fanvil/common/templates/X6U.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X6U.tpl rename to plugins/wazo_fanvil/common/templates/X6U.tpl diff --git a/plugins/wazo-fanvil/common/templates/X6V2.tpl b/plugins/wazo_fanvil/common/templates/X6V2.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X6V2.tpl rename to plugins/wazo_fanvil/common/templates/X6V2.tpl diff --git a/plugins/wazo-fanvil/common/templates/X7-Pro.tpl b/plugins/wazo_fanvil/common/templates/X7-Pro.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X7-Pro.tpl rename to plugins/wazo_fanvil/common/templates/X7-Pro.tpl diff --git a/plugins/wazo-fanvil/common/templates/X7.tpl b/plugins/wazo_fanvil/common/templates/X7.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X7.tpl rename to plugins/wazo_fanvil/common/templates/X7.tpl diff --git a/plugins/wazo-fanvil/common/templates/X7C-Pro.tpl b/plugins/wazo_fanvil/common/templates/X7C-Pro.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X7C-Pro.tpl rename to plugins/wazo_fanvil/common/templates/X7C-Pro.tpl diff --git a/plugins/wazo-fanvil/common/templates/X7C.tpl b/plugins/wazo_fanvil/common/templates/X7C.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/X7C.tpl rename to plugins/wazo_fanvil/common/templates/X7C.tpl diff --git a/plugins/wazo-fanvil/common/templates/base-V-series.tpl b/plugins/wazo_fanvil/common/templates/base-V-series.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/base-V-series.tpl rename to plugins/wazo_fanvil/common/templates/base-V-series.tpl diff --git a/plugins/wazo-fanvil/common/templates/base-V67.tpl b/plugins/wazo_fanvil/common/templates/base-V67.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/base-V67.tpl rename to plugins/wazo_fanvil/common/templates/base-V67.tpl diff --git a/plugins/wazo-fanvil/common/templates/base-i-series.tpl b/plugins/wazo_fanvil/common/templates/base-i-series.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/base-i-series.tpl rename to plugins/wazo_fanvil/common/templates/base-i-series.tpl diff --git a/plugins/wazo-fanvil/common/templates/base-new.tpl b/plugins/wazo_fanvil/common/templates/base-new.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/base-new.tpl rename to plugins/wazo_fanvil/common/templates/base-new.tpl diff --git a/plugins/wazo-fanvil/common/templates/base.tpl b/plugins/wazo_fanvil/common/templates/base.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/base.tpl rename to plugins/wazo_fanvil/common/templates/base.tpl diff --git a/plugins/wazo-fanvil/common/templates/common/model-i10.tpl b/plugins/wazo_fanvil/common/templates/common/model-i10.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/common/model-i10.tpl rename to plugins/wazo_fanvil/common/templates/common/model-i10.tpl diff --git a/plugins/wazo-fanvil/common/templates/common/model-i1x.tpl b/plugins/wazo_fanvil/common/templates/common/model-i1x.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/common/model-i1x.tpl rename to plugins/wazo_fanvil/common/templates/common/model-i1x.tpl diff --git a/plugins/wazo-fanvil/common/templates/common/model-i5x.tpl b/plugins/wazo_fanvil/common/templates/common/model-i5x.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/common/model-i5x.tpl rename to plugins/wazo_fanvil/common/templates/common/model-i5x.tpl diff --git a/plugins/wazo-fanvil/common/templates/common/model-i6x.tpl b/plugins/wazo_fanvil/common/templates/common/model-i6x.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/common/model-i6x.tpl rename to plugins/wazo_fanvil/common/templates/common/model-i6x.tpl diff --git a/plugins/wazo-fanvil/common/templates/common/model-v.tpl b/plugins/wazo_fanvil/common/templates/common/model-v.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/common/model-v.tpl rename to plugins/wazo_fanvil/common/templates/common/model-v.tpl diff --git a/plugins/wazo-fanvil/common/templates/common/model-v67.tpl b/plugins/wazo_fanvil/common/templates/common/model-v67.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/common/model-v67.tpl rename to plugins/wazo_fanvil/common/templates/common/model-v67.tpl diff --git a/plugins/wazo-fanvil/common/templates/common/model-v6x.tpl b/plugins/wazo_fanvil/common/templates/common/model-v6x.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/common/model-v6x.tpl rename to plugins/wazo_fanvil/common/templates/common/model-v6x.tpl diff --git a/plugins/wazo-fanvil/common/templates/common/model.tpl b/plugins/wazo_fanvil/common/templates/common/model.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/common/model.tpl rename to plugins/wazo_fanvil/common/templates/common/model.tpl diff --git a/plugins/wazo-fanvil/common/templates/f0C00580000.cfg b/plugins/wazo_fanvil/common/templates/f0C00580000.cfg similarity index 100% rename from plugins/wazo-fanvil/common/templates/f0C00580000.cfg rename to plugins/wazo_fanvil/common/templates/f0C00580000.cfg diff --git a/plugins/wazo-fanvil/common/templates/f0C00620000.cfg b/plugins/wazo_fanvil/common/templates/f0C00620000.cfg similarity index 100% rename from plugins/wazo-fanvil/common/templates/f0C00620000.cfg rename to plugins/wazo_fanvil/common/templates/f0C00620000.cfg diff --git a/plugins/wazo-fanvil/common/templates/i10S.tpl b/plugins/wazo_fanvil/common/templates/i10S.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i10S.tpl rename to plugins/wazo_fanvil/common/templates/i10S.tpl diff --git a/plugins/wazo-fanvil/common/templates/i10SD.tpl b/plugins/wazo_fanvil/common/templates/i10SD.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i10SD.tpl rename to plugins/wazo_fanvil/common/templates/i10SD.tpl diff --git a/plugins/wazo-fanvil/common/templates/i10SV.tpl b/plugins/wazo_fanvil/common/templates/i10SV.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i10SV.tpl rename to plugins/wazo_fanvil/common/templates/i10SV.tpl diff --git a/plugins/wazo-fanvil/common/templates/i16S.tpl b/plugins/wazo_fanvil/common/templates/i16S.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i16S.tpl rename to plugins/wazo_fanvil/common/templates/i16S.tpl diff --git a/plugins/wazo-fanvil/common/templates/i16SV.tpl b/plugins/wazo_fanvil/common/templates/i16SV.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i16SV.tpl rename to plugins/wazo_fanvil/common/templates/i16SV.tpl diff --git a/plugins/wazo-fanvil/common/templates/i51W.tpl b/plugins/wazo_fanvil/common/templates/i51W.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i51W.tpl rename to plugins/wazo_fanvil/common/templates/i51W.tpl diff --git a/plugins/wazo-fanvil/common/templates/i52W.tpl b/plugins/wazo_fanvil/common/templates/i52W.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i52W.tpl rename to plugins/wazo_fanvil/common/templates/i52W.tpl diff --git a/plugins/wazo-fanvil/common/templates/i53W.tpl b/plugins/wazo_fanvil/common/templates/i53W.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i53W.tpl rename to plugins/wazo_fanvil/common/templates/i53W.tpl diff --git a/plugins/wazo-fanvil/common/templates/i61.tpl b/plugins/wazo_fanvil/common/templates/i61.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i61.tpl rename to plugins/wazo_fanvil/common/templates/i61.tpl diff --git a/plugins/wazo-fanvil/common/templates/i62.tpl b/plugins/wazo_fanvil/common/templates/i62.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i62.tpl rename to plugins/wazo_fanvil/common/templates/i62.tpl diff --git a/plugins/wazo-fanvil/common/templates/i63.tpl b/plugins/wazo_fanvil/common/templates/i63.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i63.tpl rename to plugins/wazo_fanvil/common/templates/i63.tpl diff --git a/plugins/wazo-fanvil/common/templates/i64.tpl b/plugins/wazo_fanvil/common/templates/i64.tpl similarity index 100% rename from plugins/wazo-fanvil/common/templates/i64.tpl rename to plugins/wazo_fanvil/common/templates/i64.tpl diff --git a/plugins/wazo-yealink/__init__.py b/plugins/wazo_fanvil/common/tests/__init__.py similarity index 100% rename from plugins/wazo-yealink/__init__.py rename to plugins/wazo_fanvil/common/tests/__init__.py diff --git a/plugins/wazo-fanvil/common/tests/test_common.py b/plugins/wazo_fanvil/common/tests/test_common.py similarity index 100% rename from plugins/wazo-fanvil/common/tests/test_common.py rename to plugins/wazo_fanvil/common/tests/test_common.py diff --git a/plugins/wazo-fanvil/common/var/tftpboot/Fanvil/.gitignore b/plugins/wazo_fanvil/common/var/tftpboot/Fanvil/.gitignore similarity index 100% rename from plugins/wazo-fanvil/common/var/tftpboot/Fanvil/.gitignore rename to plugins/wazo_fanvil/common/var/tftpboot/Fanvil/.gitignore diff --git a/plugins/wazo-fanvil/serie-i/entry.py b/plugins/wazo_fanvil/serie_i/entry.py similarity index 100% rename from plugins/wazo-fanvil/serie-i/entry.py rename to plugins/wazo_fanvil/serie_i/entry.py diff --git a/plugins/wazo-fanvil/serie-i/pkgs/pkgs.db b/plugins/wazo_fanvil/serie_i/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-fanvil/serie-i/pkgs/pkgs.db rename to plugins/wazo_fanvil/serie_i/pkgs/pkgs.db diff --git a/plugins/wazo-fanvil/serie-i/plugin-info b/plugins/wazo_fanvil/serie_i/plugin-info similarity index 100% rename from plugins/wazo-fanvil/serie-i/plugin-info rename to plugins/wazo_fanvil/serie_i/plugin-info diff --git a/plugins/wazo-fanvil/serie-v/entry.py b/plugins/wazo_fanvil/serie_v/entry.py similarity index 100% rename from plugins/wazo-fanvil/serie-v/entry.py rename to plugins/wazo_fanvil/serie_v/entry.py diff --git a/plugins/wazo-fanvil/serie-v/pkgs/pkgs.db b/plugins/wazo_fanvil/serie_v/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-fanvil/serie-v/pkgs/pkgs.db rename to plugins/wazo_fanvil/serie_v/pkgs/pkgs.db diff --git a/plugins/wazo-fanvil/serie-v/plugin-info b/plugins/wazo_fanvil/serie_v/plugin-info similarity index 100% rename from plugins/wazo-fanvil/serie-v/plugin-info rename to plugins/wazo_fanvil/serie_v/plugin-info diff --git a/plugins/wazo-fanvil/serie-x/entry.py b/plugins/wazo_fanvil/serie_x/entry.py similarity index 100% rename from plugins/wazo-fanvil/serie-x/entry.py rename to plugins/wazo_fanvil/serie_x/entry.py diff --git a/plugins/wazo-fanvil/serie-x/pkgs/pkgs.db b/plugins/wazo_fanvil/serie_x/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-fanvil/serie-x/pkgs/pkgs.db rename to plugins/wazo_fanvil/serie_x/pkgs/pkgs.db diff --git a/plugins/wazo-fanvil/serie-x/plugin-info b/plugins/wazo_fanvil/serie_x/plugin-info similarity index 100% rename from plugins/wazo-fanvil/serie-x/plugin-info rename to plugins/wazo_fanvil/serie_x/plugin-info diff --git a/plugins/wazo-fanvil/2.3/entry.py b/plugins/wazo_fanvil/v2_3/entry.py similarity index 100% rename from plugins/wazo-fanvil/2.3/entry.py rename to plugins/wazo_fanvil/v2_3/entry.py diff --git a/plugins/wazo-fanvil/2.3/pkgs/pkgs.db b/plugins/wazo_fanvil/v2_3/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-fanvil/2.3/pkgs/pkgs.db rename to plugins/wazo_fanvil/v2_3/pkgs/pkgs.db diff --git a/plugins/wazo-fanvil/2.3/plugin-info b/plugins/wazo_fanvil/v2_3/plugin-info similarity index 100% rename from plugins/wazo-fanvil/2.3/plugin-info rename to plugins/wazo_fanvil/v2_3/plugin-info diff --git a/plugins/wazo-gigaset/C470/entry.py b/plugins/wazo_gigaset/C470/entry.py similarity index 100% rename from plugins/wazo-gigaset/C470/entry.py rename to plugins/wazo_gigaset/C470/entry.py diff --git a/plugins/wazo-gigaset/C470/plugin-info b/plugins/wazo_gigaset/C470/plugin-info similarity index 100% rename from plugins/wazo-gigaset/C470/plugin-info rename to plugins/wazo_gigaset/C470/plugin-info diff --git a/plugins/wazo-gigaset/C470/templates/base.tpl b/plugins/wazo_gigaset/C470/templates/base.tpl similarity index 100% rename from plugins/wazo-gigaset/C470/templates/base.tpl rename to plugins/wazo_gigaset/C470/templates/base.tpl diff --git a/plugins/wazo-gigaset/C590/entry.py b/plugins/wazo_gigaset/C590/entry.py similarity index 100% rename from plugins/wazo-gigaset/C590/entry.py rename to plugins/wazo_gigaset/C590/entry.py diff --git a/plugins/wazo-gigaset/C590/installation.md b/plugins/wazo_gigaset/C590/installation.md similarity index 100% rename from plugins/wazo-gigaset/C590/installation.md rename to plugins/wazo_gigaset/C590/installation.md diff --git a/plugins/wazo-gigaset/C590/plugin-info b/plugins/wazo_gigaset/C590/plugin-info similarity index 100% rename from plugins/wazo-gigaset/C590/plugin-info rename to plugins/wazo_gigaset/C590/plugin-info diff --git a/plugins/wazo-gigaset/C590/templates/base.tpl b/plugins/wazo_gigaset/C590/templates/base.tpl similarity index 100% rename from plugins/wazo-gigaset/C590/templates/base.tpl rename to plugins/wazo_gigaset/C590/templates/base.tpl diff --git a/plugins/wazo-gigaset/N510/entry.py b/plugins/wazo_gigaset/N510/entry.py similarity index 100% rename from plugins/wazo-gigaset/N510/entry.py rename to plugins/wazo_gigaset/N510/entry.py diff --git a/plugins/wazo-gigaset/N510/pkgs/pkgs.db b/plugins/wazo_gigaset/N510/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-gigaset/N510/pkgs/pkgs.db rename to plugins/wazo_gigaset/N510/pkgs/pkgs.db diff --git a/plugins/wazo-gigaset/N510/plugin-info b/plugins/wazo_gigaset/N510/plugin-info similarity index 100% rename from plugins/wazo-gigaset/N510/plugin-info rename to plugins/wazo_gigaset/N510/plugin-info diff --git a/plugins/wazo-gigaset/N510/templates/base.tpl b/plugins/wazo_gigaset/N510/templates/base.tpl similarity index 100% rename from plugins/wazo-gigaset/N510/templates/base.tpl rename to plugins/wazo_gigaset/N510/templates/base.tpl diff --git a/plugins/wazo-gigaset/N720/entry.py b/plugins/wazo_gigaset/N720/entry.py similarity index 100% rename from plugins/wazo-gigaset/N720/entry.py rename to plugins/wazo_gigaset/N720/entry.py diff --git a/plugins/wazo-gigaset/N720/pkgs/pkgs.db b/plugins/wazo_gigaset/N720/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-gigaset/N720/pkgs/pkgs.db rename to plugins/wazo_gigaset/N720/pkgs/pkgs.db diff --git a/plugins/wazo-gigaset/N720/plugin-info b/plugins/wazo_gigaset/N720/plugin-info similarity index 100% rename from plugins/wazo-gigaset/N720/plugin-info rename to plugins/wazo_gigaset/N720/plugin-info diff --git a/plugins/wazo-gigaset/N720/templates/base.tpl b/plugins/wazo_gigaset/N720/templates/base.tpl similarity index 100% rename from plugins/wazo-gigaset/N720/templates/base.tpl rename to plugins/wazo_gigaset/N720/templates/base.tpl diff --git a/plugins/wazo-gigaset/N870-83.v2.39.0/common.py b/plugins/wazo_gigaset/N870_83_v2_39_0/common.py similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.39.0/common.py rename to plugins/wazo_gigaset/N870_83_v2_39_0/common.py diff --git a/plugins/wazo-gigaset/N870-83.v2.39.0/entry.py b/plugins/wazo_gigaset/N870_83_v2_39_0/entry.py similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.39.0/entry.py rename to plugins/wazo_gigaset/N870_83_v2_39_0/entry.py diff --git a/plugins/wazo-gigaset/N870-83.v2.39.0/install.md b/plugins/wazo_gigaset/N870_83_v2_39_0/install.md similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.39.0/install.md rename to plugins/wazo_gigaset/N870_83_v2_39_0/install.md diff --git a/plugins/wazo-gigaset/N870-83.v2.39.0/limitations.md b/plugins/wazo_gigaset/N870_83_v2_39_0/limitations.md similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.39.0/limitations.md rename to plugins/wazo_gigaset/N870_83_v2_39_0/limitations.md diff --git a/plugins/wazo-gigaset/N870-83.v2.39.0/pkgs/pkgs.db b/plugins/wazo_gigaset/N870_83_v2_39_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.39.0/pkgs/pkgs.db rename to plugins/wazo_gigaset/N870_83_v2_39_0/pkgs/pkgs.db diff --git a/plugins/wazo-gigaset/N870-83.v2.39.0/plugin-info b/plugins/wazo_gigaset/N870_83_v2_39_0/plugin-info similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.39.0/plugin-info rename to plugins/wazo_gigaset/N870_83_v2_39_0/plugin-info diff --git a/plugins/wazo-gigaset/N870-83.v2.39.0/templates/base.tpl b/plugins/wazo_gigaset/N870_83_v2_39_0/templates/base.tpl similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.39.0/templates/base.tpl rename to plugins/wazo_gigaset/N870_83_v2_39_0/templates/base.tpl diff --git a/plugins/wazo-gigaset/N870-83.v2.48.0/common.py b/plugins/wazo_gigaset/N870_83_v2_48_0/common.py similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.48.0/common.py rename to plugins/wazo_gigaset/N870_83_v2_48_0/common.py diff --git a/plugins/wazo-gigaset/N870-83.v2.48.0/entry.py b/plugins/wazo_gigaset/N870_83_v2_48_0/entry.py similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.48.0/entry.py rename to plugins/wazo_gigaset/N870_83_v2_48_0/entry.py diff --git a/plugins/wazo-gigaset/N870-83.v2.48.0/install.md b/plugins/wazo_gigaset/N870_83_v2_48_0/install.md similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.48.0/install.md rename to plugins/wazo_gigaset/N870_83_v2_48_0/install.md diff --git a/plugins/wazo-gigaset/N870-83.v2.48.0/limitations.md b/plugins/wazo_gigaset/N870_83_v2_48_0/limitations.md similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.48.0/limitations.md rename to plugins/wazo_gigaset/N870_83_v2_48_0/limitations.md diff --git a/plugins/wazo-gigaset/N870-83.v2.48.0/pkgs/pkgs.db b/plugins/wazo_gigaset/N870_83_v2_48_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.48.0/pkgs/pkgs.db rename to plugins/wazo_gigaset/N870_83_v2_48_0/pkgs/pkgs.db diff --git a/plugins/wazo-gigaset/N870-83.v2.48.0/plugin-info b/plugins/wazo_gigaset/N870_83_v2_48_0/plugin-info similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.48.0/plugin-info rename to plugins/wazo_gigaset/N870_83_v2_48_0/plugin-info diff --git a/plugins/wazo-gigaset/N870-83.v2.48.0/templates/base.tpl b/plugins/wazo_gigaset/N870_83_v2_48_0/templates/base.tpl similarity index 100% rename from plugins/wazo-gigaset/N870-83.v2.48.0/templates/base.tpl rename to plugins/wazo_gigaset/N870_83_v2_48_0/templates/base.tpl diff --git a/plugins/wazo-gigaset/Nx70-83.v2.49.1/common.py b/plugins/wazo_gigaset/Nx70_83_v2_49_1/common.py similarity index 100% rename from plugins/wazo-gigaset/Nx70-83.v2.49.1/common.py rename to plugins/wazo_gigaset/Nx70_83_v2_49_1/common.py diff --git a/plugins/wazo-gigaset/Nx70-83.v2.49.1/entry.py b/plugins/wazo_gigaset/Nx70_83_v2_49_1/entry.py similarity index 100% rename from plugins/wazo-gigaset/Nx70-83.v2.49.1/entry.py rename to plugins/wazo_gigaset/Nx70_83_v2_49_1/entry.py diff --git a/plugins/wazo-gigaset/Nx70-83.v2.49.1/install.md b/plugins/wazo_gigaset/Nx70_83_v2_49_1/install.md similarity index 100% rename from plugins/wazo-gigaset/Nx70-83.v2.49.1/install.md rename to plugins/wazo_gigaset/Nx70_83_v2_49_1/install.md diff --git a/plugins/wazo-gigaset/Nx70-83.v2.49.1/limitations.md b/plugins/wazo_gigaset/Nx70_83_v2_49_1/limitations.md similarity index 100% rename from plugins/wazo-gigaset/Nx70-83.v2.49.1/limitations.md rename to plugins/wazo_gigaset/Nx70_83_v2_49_1/limitations.md diff --git a/plugins/wazo-gigaset/Nx70-83.v2.49.1/pkgs/pkgs.db b/plugins/wazo_gigaset/Nx70_83_v2_49_1/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-gigaset/Nx70-83.v2.49.1/pkgs/pkgs.db rename to plugins/wazo_gigaset/Nx70_83_v2_49_1/pkgs/pkgs.db diff --git a/plugins/wazo-gigaset/Nx70-83.v2.49.1/plugin-info b/plugins/wazo_gigaset/Nx70_83_v2_49_1/plugin-info similarity index 100% rename from plugins/wazo-gigaset/Nx70-83.v2.49.1/plugin-info rename to plugins/wazo_gigaset/Nx70_83_v2_49_1/plugin-info diff --git a/plugins/wazo-gigaset/Nx70-83.v2.49.1/templates/base.tpl b/plugins/wazo_gigaset/Nx70_83_v2_49_1/templates/base.tpl similarity index 100% rename from plugins/wazo-gigaset/Nx70-83.v2.49.1/templates/base.tpl rename to plugins/wazo_gigaset/Nx70_83_v2_49_1/templates/base.tpl diff --git a/plugins/wazo_gigaset/build.py b/plugins/wazo_gigaset/build.py new file mode 100644 index 0000000000000000000000000000000000000000..680ced5b506295c9244a8cbeb0c67138b066b633 --- /dev/null +++ b/plugins/wazo_gigaset/build.py @@ -0,0 +1,56 @@ +# Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) +# SPDX-License-Identifier: GPL-3.0-or-later + +# Depends on the following external programs: +# -rsync +from __future__ import annotations + +from typing import TYPE_CHECKING, Callable +from subprocess import check_call + +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + + +@target('N510', 'wazo-gigaset-N510') +def build_N510(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'N510/', path]) + + +@target('N720', 'wazo-gigaset-N720') +def build_N720(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'N720/', path]) + + +@target('N870-83.v2.39.0', 'wazo-gigaset-N870-83.v2.39.0') +def build_N870_83_v2_39_0(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'N870_83_v2_39_0/', path]) + + +@target('N870-83.v2.48.0', 'wazo-gigaset-N870-83.v2.48.0') +def build_N870_83_v2_48_0(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'N870_83_v2_48_0/', path]) + + +@target('Nx70-83.v2.49.1', 'wazo-gigaset-Nx70-83.v2.49.1') +def build_Nx70_83_v2_49_1(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'Nx70_83_v2_49_1/', path]) + + +@target('C470', 'wazo-gigaset-C470') +def build_C470(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common_c/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'C470/', path]) + + +@target('C590', 'wazo-gigaset-C590') +def build_C590(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common_c/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'C590/', path]) diff --git a/plugins/wazo-gigaset/common/common.py b/plugins/wazo_gigaset/common/common.py similarity index 100% rename from plugins/wazo-gigaset/common/common.py rename to plugins/wazo_gigaset/common/common.py diff --git a/plugins/wazo-gigaset/common/var/tftpboot/42/2/master.bin b/plugins/wazo_gigaset/common/var/tftpboot/42/2/master.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/42/2/master.bin rename to plugins/wazo_gigaset/common/var/tftpboot/42/2/master.bin diff --git a/plugins/wazo-gigaset/common/var/tftpboot/70/1/baselines.bin b/plugins/wazo_gigaset/common/var/tftpboot/70/1/baselines.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/70/1/baselines.bin rename to plugins/wazo_gigaset/common/var/tftpboot/70/1/baselines.bin diff --git a/plugins/wazo-gigaset/common/var/tftpboot/70/1/master.bin b/plugins/wazo_gigaset/common/var/tftpboot/70/1/master.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/70/1/master.bin rename to plugins/wazo_gigaset/common/var/tftpboot/70/1/master.bin diff --git a/plugins/wazo-gigaset/common/var/tftpboot/70/222/baselines.bin b/plugins/wazo_gigaset/common/var/tftpboot/70/222/baselines.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/70/222/baselines.bin rename to plugins/wazo_gigaset/common/var/tftpboot/70/222/baselines.bin diff --git a/plugins/wazo-gigaset/common/var/tftpboot/70/222/master.bin b/plugins/wazo_gigaset/common/var/tftpboot/70/222/master.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/70/222/master.bin rename to plugins/wazo_gigaset/common/var/tftpboot/70/222/master.bin diff --git a/plugins/wazo-gigaset/common/var/tftpboot/sifs/sifsroot.bin b/plugins/wazo_gigaset/common/var/tftpboot/sifs/sifsroot.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/sifs/sifsroot.bin rename to plugins/wazo_gigaset/common/var/tftpboot/sifs/sifsroot.bin diff --git a/plugins/wazo-gigaset/common/var/tftpboot/sifs/sih_4xx.bin b/plugins/wazo_gigaset/common/var/tftpboot/sifs/sih_4xx.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/sifs/sih_4xx.bin rename to plugins/wazo_gigaset/common/var/tftpboot/sifs/sih_4xx.bin diff --git a/plugins/wazo-gigaset/common/var/tftpboot/sifs/sit_44x.bin b/plugins/wazo_gigaset/common/var/tftpboot/sifs/sit_44x.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/sifs/sit_44x.bin rename to plugins/wazo_gigaset/common/var/tftpboot/sifs/sit_44x.bin diff --git a/plugins/wazo-gigaset/common/var/tftpboot/sifs/siu_444.bin b/plugins/wazo_gigaset/common/var/tftpboot/sifs/siu_444.bin similarity index 100% rename from plugins/wazo-gigaset/common/var/tftpboot/sifs/siu_444.bin rename to plugins/wazo_gigaset/common/var/tftpboot/sifs/siu_444.bin diff --git a/plugins/wazo-gigaset/common-c/common.py b/plugins/wazo_gigaset/common_c/common.py similarity index 100% rename from plugins/wazo-gigaset/common-c/common.py rename to plugins/wazo_gigaset/common_c/common.py diff --git a/plugins/wazo-grandstream/build.py b/plugins/wazo_grandstream/build.py similarity index 65% rename from plugins/wazo-grandstream/build.py rename to plugins/wazo_grandstream/build.py index fc8295f74a4af0e3fdc48064d94b5fb50afce229..2d4ea2857c2cafffd115c5199762ef9ac6baa262 100644 --- a/plugins/wazo-grandstream/build.py +++ b/plugins/wazo_grandstream/build.py @@ -1,16 +1,26 @@ """ -Copyright 2013-2022 The Wazo Authors (see the AUTHORS file) +Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) SPDX-License-Identifier: GPL-3.0-or-later Depends on the following external programs: -rsync """ +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('1.0.27.2', 'wazo-grandstream-1.0.27.2') -def build_1_0_27_2(path): +def build_1_0_27_2(path: str) -> None: check_call( [ 'rsync', @@ -23,12 +33,11 @@ def build_1_0_27_2(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.0.27.2/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_0_27_2/', path]) @target('1.0.3.27', 'wazo-grandstream-1.0.3.27') -def build_1_0_3_27(path): +def build_1_0_3_27(path: str) -> None: check_call( [ 'rsync', @@ -41,12 +50,11 @@ def build_1_0_3_27(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.0.3.27/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_0_3_27/', path]) @target('1.0.3.2x-android', 'wazo-grandstream-1.0.3.2x-android') -def build_1_0_3_2x_android(path): +def build_1_0_3_2x_android(path: str) -> None: check_call( [ 'rsync', @@ -59,12 +67,11 @@ def build_1_0_3_2x_android(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.0.3.2x-android/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_0_3_2x_android/', path]) @target('1.0.5.48', 'wazo-grandstream-1.0.5.48') -def build_1_0_5_48(path): +def build_1_0_5_48(path: str) -> None: check_call( [ 'rsync', @@ -77,12 +84,11 @@ def build_1_0_5_48(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.0.5.48/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_0_5_48/', path]) @target('1.0.7.13', 'wazo-grandstream-1.0.7.13') -def build_1_0_7_13(path): +def build_1_0_7_13(path: str) -> None: check_call( [ 'rsync', @@ -95,12 +101,11 @@ def build_1_0_7_13(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.0.7.13/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_0_7_13/', path]) @target('1.0.8.6', 'wazo-grandstream-1.0.8.6') -def build_1_0_8_6(path): +def build_1_0_8_6(path: str) -> None: check_call( [ 'rsync', @@ -113,12 +118,11 @@ def build_1_0_8_6(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.0.8.6/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_0_8_6/', path]) @target('1.0.8.9', 'wazo-grandstream-1.0.8.9') -def build_1_0_8_9(path): +def build_1_0_8_9(path: str) -> None: check_call( [ 'rsync', @@ -131,12 +135,11 @@ def build_1_0_8_9(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.0.8.9/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_0_8_9/', path]) @target('1.2.5.3', 'wazo-grandstream-1.2.5.3') -def build_1_2_5_3(path): +def build_1_2_5_3(path: str) -> None: check_call( [ 'rsync', @@ -149,5 +152,4 @@ def build_1_2_5_3(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '1.2.5.3/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1_2_5_3/', path]) diff --git a/plugins/wazo-grandstream/common/common.py b/plugins/wazo_grandstream/common/common.py similarity index 100% rename from plugins/wazo-grandstream/common/common.py rename to plugins/wazo_grandstream/common/common.py diff --git a/plugins/wazo-grandstream/common/templates/GRP2612.tpl b/plugins/wazo_grandstream/common/templates/GRP2612.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GRP2612.tpl rename to plugins/wazo_grandstream/common/templates/GRP2612.tpl diff --git a/plugins/wazo-grandstream/common/templates/GRP2613.tpl b/plugins/wazo_grandstream/common/templates/GRP2613.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GRP2613.tpl rename to plugins/wazo_grandstream/common/templates/GRP2613.tpl diff --git a/plugins/wazo-grandstream/common/templates/GRP2614.tpl b/plugins/wazo_grandstream/common/templates/GRP2614.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GRP2614.tpl rename to plugins/wazo_grandstream/common/templates/GRP2614.tpl diff --git a/plugins/wazo-grandstream/common/templates/GRP2615.tpl b/plugins/wazo_grandstream/common/templates/GRP2615.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GRP2615.tpl rename to plugins/wazo_grandstream/common/templates/GRP2615.tpl diff --git a/plugins/wazo-grandstream/common/templates/GRP2616.tpl b/plugins/wazo_grandstream/common/templates/GRP2616.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GRP2616.tpl rename to plugins/wazo_grandstream/common/templates/GRP2616.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP1160.tpl b/plugins/wazo_grandstream/common/templates/GXP1160.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP1160.tpl rename to plugins/wazo_grandstream/common/templates/GXP1160.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP1405.tpl b/plugins/wazo_grandstream/common/templates/GXP1405.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP1405.tpl rename to plugins/wazo_grandstream/common/templates/GXP1405.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP1610.tpl b/plugins/wazo_grandstream/common/templates/GXP1610.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP1610.tpl rename to plugins/wazo_grandstream/common/templates/GXP1610.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP1615.tpl b/plugins/wazo_grandstream/common/templates/GXP1615.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP1615.tpl rename to plugins/wazo_grandstream/common/templates/GXP1615.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP1620.tpl b/plugins/wazo_grandstream/common/templates/GXP1620.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP1620.tpl rename to plugins/wazo_grandstream/common/templates/GXP1620.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP1625.tpl b/plugins/wazo_grandstream/common/templates/GXP1625.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP1625.tpl rename to plugins/wazo_grandstream/common/templates/GXP1625.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP1628.tpl b/plugins/wazo_grandstream/common/templates/GXP1628.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP1628.tpl rename to plugins/wazo_grandstream/common/templates/GXP1628.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP1630.tpl b/plugins/wazo_grandstream/common/templates/GXP1630.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP1630.tpl rename to plugins/wazo_grandstream/common/templates/GXP1630.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP2000.tpl b/plugins/wazo_grandstream/common/templates/GXP2000.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP2000.tpl rename to plugins/wazo_grandstream/common/templates/GXP2000.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXP2100.tpl b/plugins/wazo_grandstream/common/templates/GXP2100.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXP2100.tpl rename to plugins/wazo_grandstream/common/templates/GXP2100.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXV3350.tpl b/plugins/wazo_grandstream/common/templates/GXV3350.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXV3350.tpl rename to plugins/wazo_grandstream/common/templates/GXV3350.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXV3370.tpl b/plugins/wazo_grandstream/common/templates/GXV3370.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXV3370.tpl rename to plugins/wazo_grandstream/common/templates/GXV3370.tpl diff --git a/plugins/wazo-grandstream/common/templates/GXV3380.tpl b/plugins/wazo_grandstream/common/templates/GXV3380.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/GXV3380.tpl rename to plugins/wazo_grandstream/common/templates/GXV3380.tpl diff --git a/plugins/wazo-grandstream/common/templates/base.tpl b/plugins/wazo_grandstream/common/templates/base.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/base.tpl rename to plugins/wazo_grandstream/common/templates/base.tpl diff --git a/plugins/wazo-grandstream/common/templates/base_v2.tpl b/plugins/wazo_grandstream/common/templates/base_v2.tpl similarity index 100% rename from plugins/wazo-grandstream/common/templates/base_v2.tpl rename to plugins/wazo_grandstream/common/templates/base_v2.tpl diff --git a/plugins/wazo-grandstream/common/var/tftpboot/Grandstream/.gitignore b/plugins/wazo_grandstream/common/var/tftpboot/Grandstream/.gitignore similarity index 100% rename from plugins/wazo-grandstream/common/var/tftpboot/Grandstream/.gitignore rename to plugins/wazo_grandstream/common/var/tftpboot/Grandstream/.gitignore diff --git a/plugins/wazo-grandstream/common_ata/common.py b/plugins/wazo_grandstream/common_ata/common.py similarity index 100% rename from plugins/wazo-grandstream/common_ata/common.py rename to plugins/wazo_grandstream/common_ata/common.py diff --git a/plugins/wazo-grandstream/common_ata/templates/HT801.tpl b/plugins/wazo_grandstream/common_ata/templates/HT801.tpl similarity index 100% rename from plugins/wazo-grandstream/common_ata/templates/HT801.tpl rename to plugins/wazo_grandstream/common_ata/templates/HT801.tpl diff --git a/plugins/wazo-grandstream/common_ata/templates/HT802.tpl b/plugins/wazo_grandstream/common_ata/templates/HT802.tpl similarity index 100% rename from plugins/wazo-grandstream/common_ata/templates/HT802.tpl rename to plugins/wazo_grandstream/common_ata/templates/HT802.tpl diff --git a/plugins/wazo-grandstream/common_ata/templates/base.tpl b/plugins/wazo_grandstream/common_ata/templates/base.tpl similarity index 100% rename from plugins/wazo-grandstream/common_ata/templates/base.tpl rename to plugins/wazo_grandstream/common_ata/templates/base.tpl diff --git a/plugins/wazo-grandstream/1.0.27.2/entry.py b/plugins/wazo_grandstream/v1_0_27_2/entry.py similarity index 100% rename from plugins/wazo-grandstream/1.0.27.2/entry.py rename to plugins/wazo_grandstream/v1_0_27_2/entry.py diff --git a/plugins/wazo-grandstream/1.0.27.2/pkgs/pkgs.db b/plugins/wazo_grandstream/v1_0_27_2/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-grandstream/1.0.27.2/pkgs/pkgs.db rename to plugins/wazo_grandstream/v1_0_27_2/pkgs/pkgs.db diff --git a/plugins/wazo-grandstream/1.0.27.2/plugin-info b/plugins/wazo_grandstream/v1_0_27_2/plugin-info similarity index 100% rename from plugins/wazo-grandstream/1.0.27.2/plugin-info rename to plugins/wazo_grandstream/v1_0_27_2/plugin-info diff --git a/plugins/wazo-grandstream/1.0.3.27/entry.py b/plugins/wazo_grandstream/v1_0_3_27/entry.py similarity index 100% rename from plugins/wazo-grandstream/1.0.3.27/entry.py rename to plugins/wazo_grandstream/v1_0_3_27/entry.py diff --git a/plugins/wazo-grandstream/1.0.3.27/pkgs/pkgs.db b/plugins/wazo_grandstream/v1_0_3_27/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-grandstream/1.0.3.27/pkgs/pkgs.db rename to plugins/wazo_grandstream/v1_0_3_27/pkgs/pkgs.db diff --git a/plugins/wazo-grandstream/1.0.3.27/plugin-info b/plugins/wazo_grandstream/v1_0_3_27/plugin-info similarity index 100% rename from plugins/wazo-grandstream/1.0.3.27/plugin-info rename to plugins/wazo_grandstream/v1_0_3_27/plugin-info diff --git a/plugins/wazo-grandstream/1.0.3.2x-android/entry.py b/plugins/wazo_grandstream/v1_0_3_2x_android/entry.py similarity index 100% rename from plugins/wazo-grandstream/1.0.3.2x-android/entry.py rename to plugins/wazo_grandstream/v1_0_3_2x_android/entry.py diff --git a/plugins/wazo-grandstream/1.0.3.2x-android/limitations.md b/plugins/wazo_grandstream/v1_0_3_2x_android/limitations.md similarity index 100% rename from plugins/wazo-grandstream/1.0.3.2x-android/limitations.md rename to plugins/wazo_grandstream/v1_0_3_2x_android/limitations.md diff --git a/plugins/wazo-grandstream/1.0.3.2x-android/pkgs/pkgs.db b/plugins/wazo_grandstream/v1_0_3_2x_android/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-grandstream/1.0.3.2x-android/pkgs/pkgs.db rename to plugins/wazo_grandstream/v1_0_3_2x_android/pkgs/pkgs.db diff --git a/plugins/wazo-grandstream/1.0.3.2x-android/plugin-info b/plugins/wazo_grandstream/v1_0_3_2x_android/plugin-info similarity index 100% rename from plugins/wazo-grandstream/1.0.3.2x-android/plugin-info rename to plugins/wazo_grandstream/v1_0_3_2x_android/plugin-info diff --git a/plugins/wazo-grandstream/1.0.5.48/entry.py b/plugins/wazo_grandstream/v1_0_5_48/entry.py similarity index 100% rename from plugins/wazo-grandstream/1.0.5.48/entry.py rename to plugins/wazo_grandstream/v1_0_5_48/entry.py diff --git a/plugins/wazo-grandstream/1.0.5.48/limitations.md b/plugins/wazo_grandstream/v1_0_5_48/limitations.md similarity index 100% rename from plugins/wazo-grandstream/1.0.5.48/limitations.md rename to plugins/wazo_grandstream/v1_0_5_48/limitations.md diff --git a/plugins/wazo-grandstream/1.0.5.48/pkgs/pkgs.db b/plugins/wazo_grandstream/v1_0_5_48/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-grandstream/1.0.5.48/pkgs/pkgs.db rename to plugins/wazo_grandstream/v1_0_5_48/pkgs/pkgs.db diff --git a/plugins/wazo-grandstream/1.0.5.48/plugin-info b/plugins/wazo_grandstream/v1_0_5_48/plugin-info similarity index 100% rename from plugins/wazo-grandstream/1.0.5.48/plugin-info rename to plugins/wazo_grandstream/v1_0_5_48/plugin-info diff --git a/plugins/wazo-grandstream/1.0.7.13/entry.py b/plugins/wazo_grandstream/v1_0_7_13/entry.py similarity index 100% rename from plugins/wazo-grandstream/1.0.7.13/entry.py rename to plugins/wazo_grandstream/v1_0_7_13/entry.py diff --git a/plugins/wazo-grandstream/1.0.7.13/install.md b/plugins/wazo_grandstream/v1_0_7_13/install.md similarity index 100% rename from plugins/wazo-grandstream/1.0.7.13/install.md rename to plugins/wazo_grandstream/v1_0_7_13/install.md diff --git a/plugins/wazo-grandstream/1.0.7.13/limitations.md b/plugins/wazo_grandstream/v1_0_7_13/limitations.md similarity index 100% rename from plugins/wazo-grandstream/1.0.7.13/limitations.md rename to plugins/wazo_grandstream/v1_0_7_13/limitations.md diff --git a/plugins/wazo-grandstream/1.0.7.13/pkgs/pkgs.db b/plugins/wazo_grandstream/v1_0_7_13/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-grandstream/1.0.7.13/pkgs/pkgs.db rename to plugins/wazo_grandstream/v1_0_7_13/pkgs/pkgs.db diff --git a/plugins/wazo-grandstream/1.0.7.13/plugin-info b/plugins/wazo_grandstream/v1_0_7_13/plugin-info similarity index 100% rename from plugins/wazo-grandstream/1.0.7.13/plugin-info rename to plugins/wazo_grandstream/v1_0_7_13/plugin-info diff --git a/plugins/wazo-grandstream/1.0.8.6/entry.py b/plugins/wazo_grandstream/v1_0_8_6/entry.py similarity index 100% rename from plugins/wazo-grandstream/1.0.8.6/entry.py rename to plugins/wazo_grandstream/v1_0_8_6/entry.py diff --git a/plugins/wazo-grandstream/1.0.8.6/pkgs/pkgs.db b/plugins/wazo_grandstream/v1_0_8_6/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-grandstream/1.0.8.6/pkgs/pkgs.db rename to plugins/wazo_grandstream/v1_0_8_6/pkgs/pkgs.db diff --git a/plugins/wazo-grandstream/1.0.8.6/plugin-info b/plugins/wazo_grandstream/v1_0_8_6/plugin-info similarity index 100% rename from plugins/wazo-grandstream/1.0.8.6/plugin-info rename to plugins/wazo_grandstream/v1_0_8_6/plugin-info diff --git a/plugins/wazo-grandstream/1.0.8.9/entry.py b/plugins/wazo_grandstream/v1_0_8_9/entry.py similarity index 100% rename from plugins/wazo-grandstream/1.0.8.9/entry.py rename to plugins/wazo_grandstream/v1_0_8_9/entry.py diff --git a/plugins/wazo-grandstream/1.0.8.9/pkgs/pkgs.db b/plugins/wazo_grandstream/v1_0_8_9/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-grandstream/1.0.8.9/pkgs/pkgs.db rename to plugins/wazo_grandstream/v1_0_8_9/pkgs/pkgs.db diff --git a/plugins/wazo-grandstream/1.0.8.9/plugin-info b/plugins/wazo_grandstream/v1_0_8_9/plugin-info similarity index 100% rename from plugins/wazo-grandstream/1.0.8.9/plugin-info rename to plugins/wazo_grandstream/v1_0_8_9/plugin-info diff --git a/plugins/wazo-grandstream/1.2.5.3/entry.py b/plugins/wazo_grandstream/v1_2_5_3/entry.py similarity index 100% rename from plugins/wazo-grandstream/1.2.5.3/entry.py rename to plugins/wazo_grandstream/v1_2_5_3/entry.py diff --git a/plugins/wazo-grandstream/1.2.5.3/pkgs/pkgs.db b/plugins/wazo_grandstream/v1_2_5_3/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-grandstream/1.2.5.3/pkgs/pkgs.db rename to plugins/wazo_grandstream/v1_2_5_3/pkgs/pkgs.db diff --git a/plugins/wazo-grandstream/1.2.5.3/plugin-info b/plugins/wazo_grandstream/v1_2_5_3/plugin-info similarity index 100% rename from plugins/wazo-grandstream/1.2.5.3/plugin-info rename to plugins/wazo_grandstream/v1_2_5_3/plugin-info diff --git a/plugins/wazo_htek/build.py b/plugins/wazo_htek/build.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb39d5fe4ab9015929fca7f6e2f493fc9ce654c --- /dev/null +++ b/plugins/wazo_htek/build.py @@ -0,0 +1,31 @@ +""" +Copyright 2017-2023 The Wazo Authors (see the AUTHORS file) +SPDX-License-Identifier: GPL-3.0-or-later + +Depends on the following external programs: + -rsync +""" +from __future__ import annotations + +from typing import TYPE_CHECKING, Callable +from subprocess import check_call + +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + + +@target('2.0.4.4.58', 'wazo-htek-2.0.4.4.58') +def build_2_0_4_4_58(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v2_0_4_4_58/', path]) + + +@target('2.0.4.6.41', 'wazo-htek-2.0.4.6.41') +def build_2_0_4_6_41(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v2_0_4_6_41/', path]) diff --git a/plugins/wazo-htek/common/common.py b/plugins/wazo_htek/common/common.py similarity index 100% rename from plugins/wazo-htek/common/common.py rename to plugins/wazo_htek/common/common.py diff --git a/plugins/wazo-htek/2.0.4.4.58/entry.py b/plugins/wazo_htek/v2_0_4_4_58/entry.py similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/entry.py rename to plugins/wazo_htek/v2_0_4_4_58/entry.py diff --git a/plugins/wazo-htek/2.0.4.4.58/install.md b/plugins/wazo_htek/v2_0_4_4_58/install.md similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/install.md rename to plugins/wazo_htek/v2_0_4_4_58/install.md diff --git a/plugins/wazo-htek/2.0.4.4.58/pkgs/pkgs.db b/plugins/wazo_htek/v2_0_4_4_58/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/pkgs/pkgs.db rename to plugins/wazo_htek/v2_0_4_4_58/pkgs/pkgs.db diff --git a/plugins/wazo-htek/2.0.4.4.58/plugin-info b/plugins/wazo_htek/v2_0_4_4_58/plugin-info similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/plugin-info rename to plugins/wazo_htek/v2_0_4_4_58/plugin-info diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC902.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC902.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC902.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC902.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC903.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC903.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC903.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC903.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC912.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC912.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC912.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC912.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC912E.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC912E.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC912E.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC912E.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC912G.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC912G.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC912G.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC912G.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC923.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC923.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC923.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC923.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC924.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC924.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC924.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC924.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC924E.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC924E.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC924E.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC924E.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC926.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC926.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC926.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC926.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/UC926E.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/UC926E.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/UC926E.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/UC926E.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/base.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/base.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/base.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/base.tpl diff --git a/plugins/wazo-htek/2.0.4.4.58/templates/common/model.tpl b/plugins/wazo_htek/v2_0_4_4_58/templates/common/model.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.4.58/templates/common/model.tpl rename to plugins/wazo_htek/v2_0_4_4_58/templates/common/model.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/entry.py b/plugins/wazo_htek/v2_0_4_6_41/entry.py similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/entry.py rename to plugins/wazo_htek/v2_0_4_6_41/entry.py diff --git a/plugins/wazo-htek/2.0.4.6.41/install.md b/plugins/wazo_htek/v2_0_4_6_41/install.md similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/install.md rename to plugins/wazo_htek/v2_0_4_6_41/install.md diff --git a/plugins/wazo-htek/2.0.4.6.41/pkgs/pkgs.db b/plugins/wazo_htek/v2_0_4_6_41/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/pkgs/pkgs.db rename to plugins/wazo_htek/v2_0_4_6_41/pkgs/pkgs.db diff --git a/plugins/wazo-htek/2.0.4.6.41/plugin-info b/plugins/wazo_htek/v2_0_4_6_41/plugin-info similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/plugin-info rename to plugins/wazo_htek/v2_0_4_6_41/plugin-info diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/UC902.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/UC902.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/UC902.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/UC902.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/UC903.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/UC903.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/UC903.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/UC903.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/UC912.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/UC912.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/UC912.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/UC912.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/UC912G.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/UC912G.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/UC912G.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/UC912G.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/UC923.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/UC923.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/UC923.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/UC923.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/UC924.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/UC924.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/UC924.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/UC924.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/UC926.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/UC926.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/UC926.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/UC926.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/base.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/base.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/base.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/base.tpl diff --git a/plugins/wazo-htek/2.0.4.6.41/templates/common/model.tpl b/plugins/wazo_htek/v2_0_4_6_41/templates/common/model.tpl similarity index 100% rename from plugins/wazo-htek/2.0.4.6.41/templates/common/model.tpl rename to plugins/wazo_htek/v2_0_4_6_41/templates/common/model.tpl diff --git a/plugins/wazo-jitsi/build.py b/plugins/wazo_jitsi/build.py similarity index 61% rename from plugins/wazo-jitsi/build.py rename to plugins/wazo_jitsi/build.py index 9fbf5b7b16a7bc30a9a97538a1b79ef658bf43d9..34f61207242ca5d7a48fb76a22cbe5b48c8117ac 100644 --- a/plugins/wazo-jitsi/build.py +++ b/plugins/wazo_jitsi/build.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,10 +15,20 @@ # Depends on the following external programs: # -rsync +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('1', 'wazo-jitsi-1') -def build_1(path): - check_call(['rsync', '-rlp', '--exclude', '.*', '1/', path]) +def build_1(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'v1/', path]) diff --git a/plugins/wazo-jitsi/1/entry.py b/plugins/wazo_jitsi/v1/entry.py similarity index 100% rename from plugins/wazo-jitsi/1/entry.py rename to plugins/wazo_jitsi/v1/entry.py diff --git a/plugins/wazo-jitsi/1/installation.md b/plugins/wazo_jitsi/v1/installation.md similarity index 100% rename from plugins/wazo-jitsi/1/installation.md rename to plugins/wazo_jitsi/v1/installation.md diff --git a/plugins/wazo-jitsi/1/plugin-info b/plugins/wazo_jitsi/v1/plugin-info similarity index 100% rename from plugins/wazo-jitsi/1/plugin-info rename to plugins/wazo_jitsi/v1/plugin-info diff --git a/plugins/wazo-jitsi/1/templates/Jitsi.tpl b/plugins/wazo_jitsi/v1/templates/Jitsi.tpl similarity index 100% rename from plugins/wazo-jitsi/1/templates/Jitsi.tpl rename to plugins/wazo_jitsi/v1/templates/Jitsi.tpl diff --git a/plugins/wazo-jitsi/1/templates/base.tpl b/plugins/wazo_jitsi/v1/templates/base.tpl similarity index 100% rename from plugins/wazo-jitsi/1/templates/base.tpl rename to plugins/wazo_jitsi/v1/templates/base.tpl diff --git a/plugins/wazo-panasonic/build.py b/plugins/wazo_panasonic/build.py similarity index 66% rename from plugins/wazo-panasonic/build.py rename to plugins/wazo_panasonic/build.py index 1a98d53f4b84c37149c83eb8e4bc4d5d2dc5a525..b437425de1258c7f7502cda95c3ea5163a6b03e4 100644 --- a/plugins/wazo-panasonic/build.py +++ b/plugins/wazo_panasonic/build.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,12 +15,22 @@ # Depends on the following external programs: # -rsync +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('01.133', 'wazo-panasonic-01.133') -def build_01_133(path): +def build_01_133(path: str) -> None: check_call( [ 'rsync', @@ -33,5 +43,4 @@ def build_01_133(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '01.133/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v01_133/', path]) diff --git a/plugins/wazo-panasonic/common/common.py b/plugins/wazo_panasonic/common/common.py similarity index 100% rename from plugins/wazo-panasonic/common/common.py rename to plugins/wazo_panasonic/common/common.py diff --git a/plugins/wazo-panasonic/common/templates/KX-UT113.cfg b/plugins/wazo_panasonic/common/templates/KX-UT113.cfg similarity index 100% rename from plugins/wazo-panasonic/common/templates/KX-UT113.cfg rename to plugins/wazo_panasonic/common/templates/KX-UT113.cfg diff --git a/plugins/wazo-panasonic/common/templates/KX-UT123.cfg b/plugins/wazo_panasonic/common/templates/KX-UT123.cfg similarity index 100% rename from plugins/wazo-panasonic/common/templates/KX-UT123.cfg rename to plugins/wazo_panasonic/common/templates/KX-UT123.cfg diff --git a/plugins/wazo-panasonic/common/templates/KX-UT133.cfg b/plugins/wazo_panasonic/common/templates/KX-UT133.cfg similarity index 100% rename from plugins/wazo-panasonic/common/templates/KX-UT133.cfg rename to plugins/wazo_panasonic/common/templates/KX-UT133.cfg diff --git a/plugins/wazo-panasonic/common/templates/KX-UT136.cfg b/plugins/wazo_panasonic/common/templates/KX-UT136.cfg similarity index 100% rename from plugins/wazo-panasonic/common/templates/KX-UT136.cfg rename to plugins/wazo_panasonic/common/templates/KX-UT136.cfg diff --git a/plugins/wazo-panasonic/common/templates/base.tpl b/plugins/wazo_panasonic/common/templates/base.tpl similarity index 100% rename from plugins/wazo-panasonic/common/templates/base.tpl rename to plugins/wazo_panasonic/common/templates/base.tpl diff --git a/plugins/wazo-panasonic/common/templates/common/KX-UT113.tpl b/plugins/wazo_panasonic/common/templates/common/KX-UT113.tpl similarity index 100% rename from plugins/wazo-panasonic/common/templates/common/KX-UT113.tpl rename to plugins/wazo_panasonic/common/templates/common/KX-UT113.tpl diff --git a/plugins/wazo-panasonic/common/templates/common/KX-UT123.tpl b/plugins/wazo_panasonic/common/templates/common/KX-UT123.tpl similarity index 100% rename from plugins/wazo-panasonic/common/templates/common/KX-UT123.tpl rename to plugins/wazo_panasonic/common/templates/common/KX-UT123.tpl diff --git a/plugins/wazo-panasonic/common/templates/common/KX-UT133.tpl b/plugins/wazo_panasonic/common/templates/common/KX-UT133.tpl similarity index 100% rename from plugins/wazo-panasonic/common/templates/common/KX-UT133.tpl rename to plugins/wazo_panasonic/common/templates/common/KX-UT133.tpl diff --git a/plugins/wazo-panasonic/common/templates/common/KX-UT136.tpl b/plugins/wazo_panasonic/common/templates/common/KX-UT136.tpl similarity index 100% rename from plugins/wazo-panasonic/common/templates/common/KX-UT136.tpl rename to plugins/wazo_panasonic/common/templates/common/KX-UT136.tpl diff --git a/plugins/wazo-panasonic/01.133/entry.py b/plugins/wazo_panasonic/v01_133/entry.py similarity index 100% rename from plugins/wazo-panasonic/01.133/entry.py rename to plugins/wazo_panasonic/v01_133/entry.py diff --git a/plugins/wazo-panasonic/01.133/pkgs/pkgs.db b/plugins/wazo_panasonic/v01_133/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-panasonic/01.133/pkgs/pkgs.db rename to plugins/wazo_panasonic/v01_133/pkgs/pkgs.db diff --git a/plugins/wazo-panasonic/01.133/plugin-info b/plugins/wazo_panasonic/v01_133/plugin-info similarity index 100% rename from plugins/wazo-panasonic/01.133/plugin-info rename to plugins/wazo_panasonic/v01_133/plugin-info diff --git a/plugins/wazo_patton/build.py b/plugins/wazo_patton/build.py new file mode 100644 index 0000000000000000000000000000000000000000..abfaba8c0aeff6be042d7825ce241bedc9026c28 --- /dev/null +++ b/plugins/wazo_patton/build.py @@ -0,0 +1,31 @@ +""" +Copyright 2016-2023 The Wazo Authors (see the AUTHORS file) +SPDX-License-Identifier: GPL-3.0-or-later + +Depends on the following external programs: + -rsync +""" +from __future__ import annotations + +from typing import TYPE_CHECKING, Callable +from subprocess import check_call + +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + + +@target('6.11', 'wazo-patton-6.11') +def build_6_11(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v6_11/', path]) + + +@target('6.9', 'wazo-patton-6.9') +def build_6_9(path: str) -> None: + check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v6_9/', path]) diff --git a/plugins/wazo-patton/common/common.py b/plugins/wazo_patton/common/common.py similarity index 100% rename from plugins/wazo-patton/common/common.py rename to plugins/wazo_patton/common/common.py diff --git a/plugins/wazo-patton/common/templates/SN4112.tpl b/plugins/wazo_patton/common/templates/SN4112.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/SN4112.tpl rename to plugins/wazo_patton/common/templates/SN4112.tpl diff --git a/plugins/wazo-patton/common/templates/SN4114.tpl b/plugins/wazo_patton/common/templates/SN4114.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/SN4114.tpl rename to plugins/wazo_patton/common/templates/SN4114.tpl diff --git a/plugins/wazo-patton/common/templates/SN4116.tpl b/plugins/wazo_patton/common/templates/SN4116.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/SN4116.tpl rename to plugins/wazo_patton/common/templates/SN4116.tpl diff --git a/plugins/wazo-patton/common/templates/SN4118.tpl b/plugins/wazo_patton/common/templates/SN4118.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/SN4118.tpl rename to plugins/wazo_patton/common/templates/SN4118.tpl diff --git a/plugins/wazo-patton/common/templates/SN4316.tpl b/plugins/wazo_patton/common/templates/SN4316.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/SN4316.tpl rename to plugins/wazo_patton/common/templates/SN4316.tpl diff --git a/plugins/wazo-patton/common/templates/SN4324.tpl b/plugins/wazo_patton/common/templates/SN4324.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/SN4324.tpl rename to plugins/wazo_patton/common/templates/SN4324.tpl diff --git a/plugins/wazo-patton/common/templates/SN4332.tpl b/plugins/wazo_patton/common/templates/SN4332.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/SN4332.tpl rename to plugins/wazo_patton/common/templates/SN4332.tpl diff --git a/plugins/wazo-patton/common/templates/base.tpl b/plugins/wazo_patton/common/templates/base.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/base.tpl rename to plugins/wazo_patton/common/templates/base.tpl diff --git a/plugins/wazo-patton/common/templates/region_FR.tpl b/plugins/wazo_patton/common/templates/region_FR.tpl similarity index 100% rename from plugins/wazo-patton/common/templates/region_FR.tpl rename to plugins/wazo_patton/common/templates/region_FR.tpl diff --git a/plugins/wazo-patton/6.11/entry.py b/plugins/wazo_patton/v6_11/entry.py similarity index 100% rename from plugins/wazo-patton/6.11/entry.py rename to plugins/wazo_patton/v6_11/entry.py diff --git a/plugins/wazo-patton/6.11/pkgs/pkgs.db b/plugins/wazo_patton/v6_11/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-patton/6.11/pkgs/pkgs.db rename to plugins/wazo_patton/v6_11/pkgs/pkgs.db diff --git a/plugins/wazo-patton/6.11/plugin-info b/plugins/wazo_patton/v6_11/plugin-info similarity index 100% rename from plugins/wazo-patton/6.11/plugin-info rename to plugins/wazo_patton/v6_11/plugin-info diff --git a/plugins/wazo-patton/6.9/entry.py b/plugins/wazo_patton/v6_9/entry.py similarity index 100% rename from plugins/wazo-patton/6.9/entry.py rename to plugins/wazo_patton/v6_9/entry.py diff --git a/plugins/wazo-patton/6.9/pkgs/pkgs.db b/plugins/wazo_patton/v6_9/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-patton/6.9/pkgs/pkgs.db rename to plugins/wazo_patton/v6_9/pkgs/pkgs.db diff --git a/plugins/wazo-patton/6.9/plugin-info b/plugins/wazo_patton/v6_9/plugin-info similarity index 100% rename from plugins/wazo-patton/6.9/plugin-info rename to plugins/wazo_patton/v6_9/plugin-info diff --git a/plugins/wazo-polycom/build.py b/plugins/wazo_polycom/build.py similarity index 87% rename from plugins/wazo-polycom/build.py rename to plugins/wazo_polycom/build.py index df498a2a60e3da5d1023e476b2fdba6ba07d106b..8d85ff58d769c1c19dcb80188c8a76991bbdd807 100644 --- a/plugins/wazo-polycom/build.py +++ b/plugins/wazo_polycom/build.py @@ -1,4 +1,4 @@ -# Copyright 2014-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2014-2023 The Wazo Authors (see the AUTHORS file) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,12 +15,22 @@ # Depends on the following external programs: # -rsync +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('4.0.11', 'wazo-polycom-4.0.11') -def build_4_0_11(path): +def build_4_0_11(path: str) -> None: check_call( [ 'rsync', @@ -57,12 +67,11 @@ def build_4_0_11(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '4.0.11/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v4_0_11/', path]) @target('5.4.3', 'wazo-polycom-5.4.3') -def build_5_4_3(path): +def build_5_4_3(path: str) -> None: check_call( [ 'rsync', @@ -95,12 +104,11 @@ def build_5_4_3(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '5.4.3/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v5_4_3/', path]) @target('5.5.1', 'wazo-polycom-5.5.1') -def build_5_5_1(path): +def build_5_5_1(path: str) -> None: check_call( [ 'rsync', @@ -133,12 +141,11 @@ def build_5_5_1(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '5.5.1/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v5_5_1/', path]) @target('5.8.2', 'wazo-polycom-5.8.2') -def build_5_8_2(path): +def build_5_8_2(path: str) -> None: check_call( [ 'rsync', @@ -191,12 +198,11 @@ def build_5_8_2(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '5.8.2/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v5_8_2/', path]) @target('5.9.2', 'wazo-polycom-5.9.2') -def build_5_9_2(path): +def build_5_9_2(path: str) -> None: check_call( [ 'rsync', @@ -249,12 +255,11 @@ def build_5_9_2(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '5.9.2/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v5_9_2/', path]) @target('3.2.4B', 'wazo-polycom-3.2.4B') -def build_3_2_4B(path): +def build_3_2_4B(path: str) -> None: check_call( [ 'rsync', @@ -293,16 +298,15 @@ def build_3_2_4B(path): '/templates/SSIP7000.tpl', '--exclude', '/templates/*', - 'common-v3/', + 'common_v3/', path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '3.2.4B/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v3_2_4B/', path]) @target('3.1.6', 'wazo-polycom-3.1.6') -def build_3_1_6(path): +def build_3_1_6(path: str) -> None: check_call( [ 'rsync', @@ -323,9 +327,8 @@ def build_3_1_6(path): '/templates/SSIP4000.tpl', '--exclude', '/templates/*', - 'common-v3/', + 'common_v3/', path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '3.1.6/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v3_1_6/', path]) diff --git a/plugins/wazo-polycom/common/common.py b/plugins/wazo_polycom/common/common.py similarity index 100% rename from plugins/wazo-polycom/common/common.py rename to plugins/wazo_polycom/common/common.py diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP321.tpl b/plugins/wazo_polycom/common/templates/SPIP321.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP321.tpl rename to plugins/wazo_polycom/common/templates/SPIP321.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP331.tpl b/plugins/wazo_polycom/common/templates/SPIP331.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP331.tpl rename to plugins/wazo_polycom/common/templates/SPIP331.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP335.tpl b/plugins/wazo_polycom/common/templates/SPIP335.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP335.tpl rename to plugins/wazo_polycom/common/templates/SPIP335.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP450.tpl b/plugins/wazo_polycom/common/templates/SPIP450.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP450.tpl rename to plugins/wazo_polycom/common/templates/SPIP450.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP550.tpl b/plugins/wazo_polycom/common/templates/SPIP550.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP550.tpl rename to plugins/wazo_polycom/common/templates/SPIP550.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP560.tpl b/plugins/wazo_polycom/common/templates/SPIP560.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP560.tpl rename to plugins/wazo_polycom/common/templates/SPIP560.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP650.tpl b/plugins/wazo_polycom/common/templates/SPIP650.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP650.tpl rename to plugins/wazo_polycom/common/templates/SPIP650.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP670.tpl b/plugins/wazo_polycom/common/templates/SPIP670.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP670.tpl rename to plugins/wazo_polycom/common/templates/SPIP670.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SSIP5000.tpl b/plugins/wazo_polycom/common/templates/SSIP5000.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SSIP5000.tpl rename to plugins/wazo_polycom/common/templates/SSIP5000.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SSIP6000.tpl b/plugins/wazo_polycom/common/templates/SSIP6000.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SSIP6000.tpl rename to plugins/wazo_polycom/common/templates/SSIP6000.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SSIP7000.tpl b/plugins/wazo_polycom/common/templates/SSIP7000.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SSIP7000.tpl rename to plugins/wazo_polycom/common/templates/SSIP7000.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX101.tpl b/plugins/wazo_polycom/common/templates/VVX101.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX101.tpl rename to plugins/wazo_polycom/common/templates/VVX101.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX150.tpl b/plugins/wazo_polycom/common/templates/VVX150.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX150.tpl rename to plugins/wazo_polycom/common/templates/VVX150.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX1500.tpl b/plugins/wazo_polycom/common/templates/VVX1500.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX1500.tpl rename to plugins/wazo_polycom/common/templates/VVX1500.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX200.tpl b/plugins/wazo_polycom/common/templates/VVX200.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX200.tpl rename to plugins/wazo_polycom/common/templates/VVX200.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX201.tpl b/plugins/wazo_polycom/common/templates/VVX201.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX201.tpl rename to plugins/wazo_polycom/common/templates/VVX201.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX250.tpl b/plugins/wazo_polycom/common/templates/VVX250.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX250.tpl rename to plugins/wazo_polycom/common/templates/VVX250.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX300.tpl b/plugins/wazo_polycom/common/templates/VVX300.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX300.tpl rename to plugins/wazo_polycom/common/templates/VVX300.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX301.tpl b/plugins/wazo_polycom/common/templates/VVX301.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX301.tpl rename to plugins/wazo_polycom/common/templates/VVX301.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX310.tpl b/plugins/wazo_polycom/common/templates/VVX310.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX310.tpl rename to plugins/wazo_polycom/common/templates/VVX310.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX311.tpl b/plugins/wazo_polycom/common/templates/VVX311.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX311.tpl rename to plugins/wazo_polycom/common/templates/VVX311.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX350.tpl b/plugins/wazo_polycom/common/templates/VVX350.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX350.tpl rename to plugins/wazo_polycom/common/templates/VVX350.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX400.tpl b/plugins/wazo_polycom/common/templates/VVX400.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX400.tpl rename to plugins/wazo_polycom/common/templates/VVX400.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX401.tpl b/plugins/wazo_polycom/common/templates/VVX401.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX401.tpl rename to plugins/wazo_polycom/common/templates/VVX401.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX410.tpl b/plugins/wazo_polycom/common/templates/VVX410.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX410.tpl rename to plugins/wazo_polycom/common/templates/VVX410.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX411.tpl b/plugins/wazo_polycom/common/templates/VVX411.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX411.tpl rename to plugins/wazo_polycom/common/templates/VVX411.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX450.tpl b/plugins/wazo_polycom/common/templates/VVX450.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX450.tpl rename to plugins/wazo_polycom/common/templates/VVX450.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX500.tpl b/plugins/wazo_polycom/common/templates/VVX500.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX500.tpl rename to plugins/wazo_polycom/common/templates/VVX500.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX501.tpl b/plugins/wazo_polycom/common/templates/VVX501.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX501.tpl rename to plugins/wazo_polycom/common/templates/VVX501.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX600.tpl b/plugins/wazo_polycom/common/templates/VVX600.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX600.tpl rename to plugins/wazo_polycom/common/templates/VVX600.tpl diff --git a/plugins/wazo-polycom/common/templates/VVX601.tpl b/plugins/wazo_polycom/common/templates/VVX601.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/VVX601.tpl rename to plugins/wazo_polycom/common/templates/VVX601.tpl diff --git a/plugins/wazo-polycom/common/templates/base.tpl b/plugins/wazo_polycom/common/templates/base.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/base.tpl rename to plugins/wazo_polycom/common/templates/base.tpl diff --git a/plugins/wazo-polycom/common-v3/common.py b/plugins/wazo_polycom/common_v3/common.py similarity index 100% rename from plugins/wazo-polycom/common-v3/common.py rename to plugins/wazo_polycom/common_v3/common.py diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP301.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP301.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP301.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP301.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP320.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP320.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP320.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP320.tpl diff --git a/plugins/wazo-polycom/common/templates/SPIP321.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP321.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SPIP321.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP321.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP330.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP330.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP330.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP330.tpl diff --git a/plugins/wazo-polycom/common/templates/SPIP331.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP331.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SPIP331.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP331.tpl diff --git a/plugins/wazo-polycom/common/templates/SPIP335.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP335.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SPIP335.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP335.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP430.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP430.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP430.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP430.tpl diff --git a/plugins/wazo-polycom/common/templates/SPIP450.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP450.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SPIP450.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP450.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP501.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP501.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP501.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP501.tpl diff --git a/plugins/wazo-polycom/common/templates/SPIP550.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP550.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SPIP550.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP550.tpl diff --git a/plugins/wazo-polycom/common/templates/SPIP560.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP560.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SPIP560.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP560.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP600.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP600.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP600.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP600.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SPIP601.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP601.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SPIP601.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP601.tpl diff --git a/plugins/wazo-polycom/common/templates/SPIP650.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP650.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SPIP650.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP650.tpl diff --git a/plugins/wazo-polycom/common/templates/SPIP670.tpl b/plugins/wazo_polycom/common_v3/templates/SPIP670.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SPIP670.tpl rename to plugins/wazo_polycom/common_v3/templates/SPIP670.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/SSIP4000.tpl b/plugins/wazo_polycom/common_v3/templates/SSIP4000.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/SSIP4000.tpl rename to plugins/wazo_polycom/common_v3/templates/SSIP4000.tpl diff --git a/plugins/wazo-polycom/common/templates/SSIP5000.tpl b/plugins/wazo_polycom/common_v3/templates/SSIP5000.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SSIP5000.tpl rename to plugins/wazo_polycom/common_v3/templates/SSIP5000.tpl diff --git a/plugins/wazo-polycom/common/templates/SSIP6000.tpl b/plugins/wazo_polycom/common_v3/templates/SSIP6000.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SSIP6000.tpl rename to plugins/wazo_polycom/common_v3/templates/SSIP6000.tpl diff --git a/plugins/wazo-polycom/common/templates/SSIP7000.tpl b/plugins/wazo_polycom/common_v3/templates/SSIP7000.tpl similarity index 100% rename from plugins/wazo-polycom/common/templates/SSIP7000.tpl rename to plugins/wazo_polycom/common_v3/templates/SSIP7000.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/VVX1500.tpl b/plugins/wazo_polycom/common_v3/templates/VVX1500.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/VVX1500.tpl rename to plugins/wazo_polycom/common_v3/templates/VVX1500.tpl diff --git a/plugins/wazo-polycom/common-v3/templates/base.tpl b/plugins/wazo_polycom/common_v3/templates/base.tpl similarity index 100% rename from plugins/wazo-polycom/common-v3/templates/base.tpl rename to plugins/wazo_polycom/common_v3/templates/base.tpl diff --git a/plugins/wazo-polycom/common-v3/var/tftpboot/common.cfg b/plugins/wazo_polycom/common_v3/var/tftpboot/common.cfg similarity index 100% rename from plugins/wazo-polycom/common-v3/var/tftpboot/common.cfg rename to plugins/wazo_polycom/common_v3/var/tftpboot/common.cfg diff --git a/plugins/wazo-polycom/3.1.6/entry.py b/plugins/wazo_polycom/v3_1_6/entry.py similarity index 100% rename from plugins/wazo-polycom/3.1.6/entry.py rename to plugins/wazo_polycom/v3_1_6/entry.py diff --git a/plugins/wazo-polycom/3.1.6/install.md b/plugins/wazo_polycom/v3_1_6/install.md similarity index 100% rename from plugins/wazo-polycom/3.1.6/install.md rename to plugins/wazo_polycom/v3_1_6/install.md diff --git a/plugins/wazo-polycom/3.1.6/pkgs/pkgs.db b/plugins/wazo_polycom/v3_1_6/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-polycom/3.1.6/pkgs/pkgs.db rename to plugins/wazo_polycom/v3_1_6/pkgs/pkgs.db diff --git a/plugins/wazo-polycom/3.1.6/plugin-info b/plugins/wazo_polycom/v3_1_6/plugin-info similarity index 100% rename from plugins/wazo-polycom/3.1.6/plugin-info rename to plugins/wazo_polycom/v3_1_6/plugin-info diff --git a/plugins/wazo-polycom/3.1.6/var/tftpboot/000000000000.cfg b/plugins/wazo_polycom/v3_1_6/var/tftpboot/000000000000.cfg similarity index 100% rename from plugins/wazo-polycom/3.1.6/var/tftpboot/000000000000.cfg rename to plugins/wazo_polycom/v3_1_6/var/tftpboot/000000000000.cfg diff --git a/plugins/wazo-polycom/3.1.6/var/tftpboot/phone1.cfg b/plugins/wazo_polycom/v3_1_6/var/tftpboot/phone1.cfg similarity index 100% rename from plugins/wazo-polycom/3.1.6/var/tftpboot/phone1.cfg rename to plugins/wazo_polycom/v3_1_6/var/tftpboot/phone1.cfg diff --git a/plugins/wazo-polycom/3.1.6/var/tftpboot/sip.cfg b/plugins/wazo_polycom/v3_1_6/var/tftpboot/sip.cfg similarity index 100% rename from plugins/wazo-polycom/3.1.6/var/tftpboot/sip.cfg rename to plugins/wazo_polycom/v3_1_6/var/tftpboot/sip.cfg diff --git a/plugins/wazo-polycom/3.2.4B/entry.py b/plugins/wazo_polycom/v3_2_4B/entry.py similarity index 100% rename from plugins/wazo-polycom/3.2.4B/entry.py rename to plugins/wazo_polycom/v3_2_4B/entry.py diff --git a/plugins/wazo-polycom/3.2.4B/install.md b/plugins/wazo_polycom/v3_2_4B/install.md similarity index 100% rename from plugins/wazo-polycom/3.2.4B/install.md rename to plugins/wazo_polycom/v3_2_4B/install.md diff --git a/plugins/wazo-polycom/3.2.4B/pkgs/pkgs.db b/plugins/wazo_polycom/v3_2_4B/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-polycom/3.2.4B/pkgs/pkgs.db rename to plugins/wazo_polycom/v3_2_4B/pkgs/pkgs.db diff --git a/plugins/wazo-polycom/3.2.4B/plugin-info b/plugins/wazo_polycom/v3_2_4B/plugin-info similarity index 100% rename from plugins/wazo-polycom/3.2.4B/plugin-info rename to plugins/wazo_polycom/v3_2_4B/plugin-info diff --git a/plugins/wazo-polycom/3.2.4B/var/tftpboot/000000000000.cfg b/plugins/wazo_polycom/v3_2_4B/var/tftpboot/000000000000.cfg similarity index 100% rename from plugins/wazo-polycom/3.2.4B/var/tftpboot/000000000000.cfg rename to plugins/wazo_polycom/v3_2_4B/var/tftpboot/000000000000.cfg diff --git a/plugins/wazo-polycom/3.2.4B/var/tftpboot/phone1.cfg b/plugins/wazo_polycom/v3_2_4B/var/tftpboot/phone1.cfg similarity index 100% rename from plugins/wazo-polycom/3.2.4B/var/tftpboot/phone1.cfg rename to plugins/wazo_polycom/v3_2_4B/var/tftpboot/phone1.cfg diff --git a/plugins/wazo-polycom/3.2.4B/var/tftpboot/sip.cfg b/plugins/wazo_polycom/v3_2_4B/var/tftpboot/sip.cfg similarity index 100% rename from plugins/wazo-polycom/3.2.4B/var/tftpboot/sip.cfg rename to plugins/wazo_polycom/v3_2_4B/var/tftpboot/sip.cfg diff --git a/plugins/wazo-polycom/4.0.11/entry.py b/plugins/wazo_polycom/v4_0_11/entry.py similarity index 100% rename from plugins/wazo-polycom/4.0.11/entry.py rename to plugins/wazo_polycom/v4_0_11/entry.py diff --git a/plugins/wazo-polycom/4.0.11/pkgs/pkgs.db b/plugins/wazo_polycom/v4_0_11/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-polycom/4.0.11/pkgs/pkgs.db rename to plugins/wazo_polycom/v4_0_11/pkgs/pkgs.db diff --git a/plugins/wazo-polycom/4.0.11/plugin-info b/plugins/wazo_polycom/v4_0_11/plugin-info similarity index 100% rename from plugins/wazo-polycom/4.0.11/plugin-info rename to plugins/wazo_polycom/v4_0_11/plugin-info diff --git a/plugins/wazo-polycom/4.0.11/var/tftpboot/000000000000.cfg b/plugins/wazo_polycom/v4_0_11/var/tftpboot/000000000000.cfg similarity index 100% rename from plugins/wazo-polycom/4.0.11/var/tftpboot/000000000000.cfg rename to plugins/wazo_polycom/v4_0_11/var/tftpboot/000000000000.cfg diff --git a/plugins/wazo-polycom/4.0.11/var/tftpboot/common.cfg b/plugins/wazo_polycom/v4_0_11/var/tftpboot/common.cfg similarity index 100% rename from plugins/wazo-polycom/4.0.11/var/tftpboot/common.cfg rename to plugins/wazo_polycom/v4_0_11/var/tftpboot/common.cfg diff --git a/plugins/wazo-polycom/5.4.3/entry.py b/plugins/wazo_polycom/v5_4_3/entry.py similarity index 100% rename from plugins/wazo-polycom/5.4.3/entry.py rename to plugins/wazo_polycom/v5_4_3/entry.py diff --git a/plugins/wazo-polycom/5.4.3/pkgs/pkgs.db b/plugins/wazo_polycom/v5_4_3/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-polycom/5.4.3/pkgs/pkgs.db rename to plugins/wazo_polycom/v5_4_3/pkgs/pkgs.db diff --git a/plugins/wazo-polycom/5.4.3/plugin-info b/plugins/wazo_polycom/v5_4_3/plugin-info similarity index 100% rename from plugins/wazo-polycom/5.4.3/plugin-info rename to plugins/wazo_polycom/v5_4_3/plugin-info diff --git a/plugins/wazo-polycom/5.4.3/var/tftpboot/000000000000.cfg b/plugins/wazo_polycom/v5_4_3/var/tftpboot/000000000000.cfg similarity index 100% rename from plugins/wazo-polycom/5.4.3/var/tftpboot/000000000000.cfg rename to plugins/wazo_polycom/v5_4_3/var/tftpboot/000000000000.cfg diff --git a/plugins/wazo-polycom/5.4.3/var/tftpboot/common.cfg b/plugins/wazo_polycom/v5_4_3/var/tftpboot/common.cfg similarity index 100% rename from plugins/wazo-polycom/5.4.3/var/tftpboot/common.cfg rename to plugins/wazo_polycom/v5_4_3/var/tftpboot/common.cfg diff --git a/plugins/wazo-polycom/5.5.1/entry.py b/plugins/wazo_polycom/v5_5_1/entry.py similarity index 100% rename from plugins/wazo-polycom/5.5.1/entry.py rename to plugins/wazo_polycom/v5_5_1/entry.py diff --git a/plugins/wazo-polycom/5.5.1/pkgs/pkgs.db b/plugins/wazo_polycom/v5_5_1/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-polycom/5.5.1/pkgs/pkgs.db rename to plugins/wazo_polycom/v5_5_1/pkgs/pkgs.db diff --git a/plugins/wazo-polycom/5.5.1/plugin-info b/plugins/wazo_polycom/v5_5_1/plugin-info similarity index 100% rename from plugins/wazo-polycom/5.5.1/plugin-info rename to plugins/wazo_polycom/v5_5_1/plugin-info diff --git a/plugins/wazo-polycom/5.5.1/var/tftpboot/000000000000.cfg b/plugins/wazo_polycom/v5_5_1/var/tftpboot/000000000000.cfg similarity index 100% rename from plugins/wazo-polycom/5.5.1/var/tftpboot/000000000000.cfg rename to plugins/wazo_polycom/v5_5_1/var/tftpboot/000000000000.cfg diff --git a/plugins/wazo-polycom/5.5.1/var/tftpboot/common.cfg b/plugins/wazo_polycom/v5_5_1/var/tftpboot/common.cfg similarity index 100% rename from plugins/wazo-polycom/5.5.1/var/tftpboot/common.cfg rename to plugins/wazo_polycom/v5_5_1/var/tftpboot/common.cfg diff --git a/plugins/wazo-polycom/5.8.2/entry.py b/plugins/wazo_polycom/v5_8_2/entry.py similarity index 100% rename from plugins/wazo-polycom/5.8.2/entry.py rename to plugins/wazo_polycom/v5_8_2/entry.py diff --git a/plugins/wazo-polycom/5.8.2/pkgs/pkgs.db b/plugins/wazo_polycom/v5_8_2/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-polycom/5.8.2/pkgs/pkgs.db rename to plugins/wazo_polycom/v5_8_2/pkgs/pkgs.db diff --git a/plugins/wazo-polycom/5.8.2/plugin-info b/plugins/wazo_polycom/v5_8_2/plugin-info similarity index 100% rename from plugins/wazo-polycom/5.8.2/plugin-info rename to plugins/wazo_polycom/v5_8_2/plugin-info diff --git a/plugins/wazo-polycom/5.8.2/var/tftpboot/000000000000.cfg b/plugins/wazo_polycom/v5_8_2/var/tftpboot/000000000000.cfg similarity index 100% rename from plugins/wazo-polycom/5.8.2/var/tftpboot/000000000000.cfg rename to plugins/wazo_polycom/v5_8_2/var/tftpboot/000000000000.cfg diff --git a/plugins/wazo-polycom/5.8.2/var/tftpboot/common.cfg b/plugins/wazo_polycom/v5_8_2/var/tftpboot/common.cfg similarity index 100% rename from plugins/wazo-polycom/5.8.2/var/tftpboot/common.cfg rename to plugins/wazo_polycom/v5_8_2/var/tftpboot/common.cfg diff --git a/plugins/wazo-polycom/5.9.2/entry.py b/plugins/wazo_polycom/v5_9_2/entry.py similarity index 100% rename from plugins/wazo-polycom/5.9.2/entry.py rename to plugins/wazo_polycom/v5_9_2/entry.py diff --git a/plugins/wazo-polycom/5.9.2/pkgs/pkgs.db b/plugins/wazo_polycom/v5_9_2/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-polycom/5.9.2/pkgs/pkgs.db rename to plugins/wazo_polycom/v5_9_2/pkgs/pkgs.db diff --git a/plugins/wazo-polycom/5.9.2/plugin-info b/plugins/wazo_polycom/v5_9_2/plugin-info similarity index 100% rename from plugins/wazo-polycom/5.9.2/plugin-info rename to plugins/wazo_polycom/v5_9_2/plugin-info diff --git a/plugins/wazo-polycom/5.9.2/var/tftpboot/000000000000.cfg b/plugins/wazo_polycom/v5_9_2/var/tftpboot/000000000000.cfg similarity index 100% rename from plugins/wazo-polycom/5.9.2/var/tftpboot/000000000000.cfg rename to plugins/wazo_polycom/v5_9_2/var/tftpboot/000000000000.cfg diff --git a/plugins/wazo-polycom/5.9.2/var/tftpboot/common.cfg b/plugins/wazo_polycom/v5_9_2/var/tftpboot/common.cfg similarity index 100% rename from plugins/wazo-polycom/5.9.2/var/tftpboot/common.cfg rename to plugins/wazo_polycom/v5_9_2/var/tftpboot/common.cfg diff --git a/plugins/wazo-snom/build.py b/plugins/wazo_snom/build.py similarity index 78% rename from plugins/wazo-snom/build.py rename to plugins/wazo_snom/build.py index 705a8ff6063f8c2a0d1d2df12b2e82e61009d817..daa45bd55cc04205d8de34ce0d4e95d39bdd26bb 100644 --- a/plugins/wazo-snom/build.py +++ b/plugins/wazo_snom/build.py @@ -1,18 +1,28 @@ """ -Copyright 2014-2022 The Wazo Authors (see the AUTHORS file) +Copyright 2014-2023 The Wazo Authors (see the AUTHORS file) SPDX-License-Identifier: GPL-3.0-or-later Depends on the following external programs: - rsync - sed """ +from __future__ import annotations -import os.path +from typing import TYPE_CHECKING, Callable from subprocess import check_call +from pathlib import Path + +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None @target('8.7.5.35', 'wazo-snom-8.7.5.35') -def build_8_7_5_35(path): +def build_8_7_5_35(path: str) -> None: MODELS = [ ('300', 'f'), ('320', 'f'), @@ -29,18 +39,17 @@ def build_8_7_5_35(path): ('MP', 'r'), ('PA1', 'f'), ] - check_call( ['rsync', '-rlp', '--exclude', '.*', '--exclude', '*.btpl', 'common/', path] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' + sed_script = f's/#FW_FILENAME#/snom{model}-8.7.5.35-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -51,28 +60,27 @@ def build_8_7_5_35(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - - check_call(['rsync', '-rlp', '--exclude', '.*', '8.7.5.35/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v8_7_5_35/', path]) @target('8.9.3.40', 'wazo-snom-8.9.3.40') -def build_8_9_3_40(path): +def build_8_9_3_40(path: str) -> None: MODELS = [('D745', 'r')] check_call( @@ -93,14 +101,13 @@ def build_8_9_3_40(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-8.9.3.40-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -111,28 +118,28 @@ def build_8_9_3_40(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '8.9.3.40/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v8_9_3_40/', path]) @target('8.9.3.60', 'wazo-snom-8.9.3.60') -def build_8_9_3_60(path): +def build_8_9_3_60(path: str) -> None: MODELS = [ ('D305', 'r'), ('D315', 'r'), @@ -158,14 +165,13 @@ def build_8_9_3_60(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-8.9.3.60-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -176,24 +182,24 @@ def build_8_9_3_60(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '8.9.3.60/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v8_9_3_60/', path]) @target('8.9.3.80', 'wazo-snom-8.9.3.80') @@ -230,14 +236,13 @@ def build_8_9_3_80(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-8.9.3.80-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -248,24 +253,24 @@ def build_8_9_3_80(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '8.9.3.80/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v8_9_3_80/', path]) @target('10.1.20.0', 'wazo-snom-10.1.20.0') @@ -291,14 +296,13 @@ def build_10_1_20_0(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.20.0-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -309,24 +313,24 @@ def build_10_1_20_0(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.20.0/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_20_0/', path]) @target('10.1.26.1', 'wazo-snom-10.1.26.1') @@ -352,14 +356,13 @@ def build_10_1_26_1(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.26.1-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -370,24 +373,24 @@ def build_10_1_26_1(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.26.1/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_26_1/', path]) @target('10.1.39.11', 'wazo-snom-10.1.39.11') @@ -424,14 +427,13 @@ def build_10_1_39_11(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.39.11-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -442,24 +444,24 @@ def build_10_1_39_11(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.39.11/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_39_11/', path]) @target('10.1.46.16', 'wazo-snom-10.1.46.16') @@ -504,14 +506,15 @@ def build_10_1_46_16(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' + model_tpl = ( + Path(path) / 'templates' / 'common' / f'snom{model}-firmware.xml.tpl' ) sed_script = f's/#FW_FILENAME#/snom{model}-10.1.46.16-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -522,24 +525,24 @@ def build_10_1_46_16(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.46.16/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_46_16/', path]) @target('10.1.49.11', 'wazo-snom-10.1.49.11') @@ -584,14 +587,13 @@ def build_10_1_49_11(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.46.16-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -602,24 +604,24 @@ def build_10_1_49_11(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.49.11/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_49_11/', path]) @target('10.1.51.12', 'wazo-snom-10.1.51.12') @@ -663,14 +665,13 @@ def build_10_1_51_12(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.51.12-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -681,24 +682,24 @@ def build_10_1_51_12(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.51.12/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_51_12/', path]) @target('10.1.54.13', 'wazo-snom-10.1.54.13') @@ -742,14 +743,13 @@ def build_10_1_54_13(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.54.13-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -760,24 +760,24 @@ def build_10_1_54_13(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.54.13/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_54_13/', path]) @target('05.20.0001', 'wazo-snom-dect-05.20.0001') @@ -809,14 +809,13 @@ def build_05_20_0001(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/{model}_v0520_b0001.fwu/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -827,9 +826,9 @@ def build_05_20_0001(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -840,9 +839,9 @@ def build_05_20_0001(path): ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -852,7 +851,7 @@ def build_05_20_0001(path): stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '05.20.0001/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v05_20_0001/', path]) @target('10.1.101.11', 'wazo-snom-10.1.101.11') @@ -895,14 +894,13 @@ def build_10_1_101_11(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.101.11-SIP-{fw_suffix}.bin/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -913,24 +911,24 @@ def build_10_1_101_11(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.101.11/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_101_11/', path]) @target('10.1.141.13', 'wazo-snom-10.1.141.13') @@ -976,16 +974,15 @@ def build_10_1_141_13(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.141.13-SIP-{fw_suffix}.bin/' if model.startswith("D8"): sed_script = f's/#FW_FILENAME#/snom{model}-10.1.141.13-SIP-{fw_suffix}.swu/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -996,24 +993,24 @@ def build_10_1_141_13(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.141.13/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_141_13/', path]) @target('10.1.152.12', 'wazo-snom-10.1.152.12') @@ -1059,16 +1056,15 @@ def build_10_1_152_12(path): path, ] ) + template_dir = Path(path) / 'templates' / 'common' for model, fw_suffix in MODELS: # generate snom-firmware.xml.tpl from snom-model-firmware.xml.tpl.btpl - model_tpl = os.path.join( - path, 'templates', 'common', f'snom{model}-firmware.xml.tpl' - ) + model_tpl = template_dir / f'snom{model}-firmware.xml.tpl' sed_script = f's/#FW_FILENAME#/snom{model}-10.1.152.12-SIP-{fw_suffix}.bin/' if model.startswith("D8"): sed_script = f's/#FW_FILENAME#/snom{model}-10.1.152.12-SIP-{fw_suffix}.swu/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( [ 'sed', @@ -1079,21 +1075,21 @@ def build_10_1_152_12(path): ) # generate snom.htm.tpl from snom-model.htm.tpl.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.htm.tpl') + model_tpl = template_dir / f'snom{model}.htm.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.htm.tpl.btpl'], stdout=f, ) # generate snom.xml.tpl from snom-model.xml.mtpl - model_tpl = os.path.join(path, 'templates', 'common', f'snom{model}.xml.tpl') + model_tpl = template_dir / f'snom{model}.xml.tpl' sed_script = f's/#MODEL#/{model}/' - with open(model_tpl, 'wb') as f: + with model_tpl.open(mode='wb') as f: check_call( ['sed', sed_script, 'common/templates/common/snom-model.xml.tpl.btpl'], stdout=f, ) - check_call(['rsync', '-rlp', '--exclude', '.*', '10.1.152.12/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v10_1_152_12/', path]) diff --git a/plugins/wazo-snom/common/common.py b/plugins/wazo_snom/common/common.py similarity index 100% rename from plugins/wazo-snom/common/common.py rename to plugins/wazo_snom/common/common.py diff --git a/plugins/wazo-snom/common/templates/300.tpl b/plugins/wazo_snom/common/templates/300.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/300.tpl rename to plugins/wazo_snom/common/templates/300.tpl diff --git a/plugins/wazo-snom/common/templates/320.tpl b/plugins/wazo_snom/common/templates/320.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/320.tpl rename to plugins/wazo_snom/common/templates/320.tpl diff --git a/plugins/wazo-snom/common/templates/370.tpl b/plugins/wazo_snom/common/templates/370.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/370.tpl rename to plugins/wazo_snom/common/templates/370.tpl diff --git a/plugins/wazo-snom/common/templates/710.tpl b/plugins/wazo_snom/common/templates/710.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/710.tpl rename to plugins/wazo_snom/common/templates/710.tpl diff --git a/plugins/wazo-snom/common/templates/715.tpl b/plugins/wazo_snom/common/templates/715.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/715.tpl rename to plugins/wazo_snom/common/templates/715.tpl diff --git a/plugins/wazo-snom/common/templates/720.tpl b/plugins/wazo_snom/common/templates/720.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/720.tpl rename to plugins/wazo_snom/common/templates/720.tpl diff --git a/plugins/wazo-snom/common/templates/725.tpl b/plugins/wazo_snom/common/templates/725.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/725.tpl rename to plugins/wazo_snom/common/templates/725.tpl diff --git a/plugins/wazo-snom/common/templates/760.tpl b/plugins/wazo_snom/common/templates/760.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/760.tpl rename to plugins/wazo_snom/common/templates/760.tpl diff --git a/plugins/wazo-snom/common/templates/820.tpl b/plugins/wazo_snom/common/templates/820.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/820.tpl rename to plugins/wazo_snom/common/templates/820.tpl diff --git a/plugins/wazo-snom/common/templates/821.tpl b/plugins/wazo_snom/common/templates/821.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/821.tpl rename to plugins/wazo_snom/common/templates/821.tpl diff --git a/plugins/wazo-snom/common/templates/870.tpl b/plugins/wazo_snom/common/templates/870.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/870.tpl rename to plugins/wazo_snom/common/templates/870.tpl diff --git a/plugins/wazo-snom/common/templates/D305.tpl b/plugins/wazo_snom/common/templates/D305.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D305.tpl rename to plugins/wazo_snom/common/templates/D305.tpl diff --git a/plugins/wazo-snom/common/templates/D315.tpl b/plugins/wazo_snom/common/templates/D315.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D315.tpl rename to plugins/wazo_snom/common/templates/D315.tpl diff --git a/plugins/wazo-snom/common/templates/D335.tpl b/plugins/wazo_snom/common/templates/D335.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D335.tpl rename to plugins/wazo_snom/common/templates/D335.tpl diff --git a/plugins/wazo-snom/common/templates/D345.tpl b/plugins/wazo_snom/common/templates/D345.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D345.tpl rename to plugins/wazo_snom/common/templates/D345.tpl diff --git a/plugins/wazo-snom/common/templates/D375.tpl b/plugins/wazo_snom/common/templates/D375.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D375.tpl rename to plugins/wazo_snom/common/templates/D375.tpl diff --git a/plugins/wazo-snom/common/templates/D385.tpl b/plugins/wazo_snom/common/templates/D385.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D385.tpl rename to plugins/wazo_snom/common/templates/D385.tpl diff --git a/plugins/wazo-snom/common/templates/D712.tpl b/plugins/wazo_snom/common/templates/D712.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D712.tpl rename to plugins/wazo_snom/common/templates/D712.tpl diff --git a/plugins/wazo-snom/common/templates/D713.tpl b/plugins/wazo_snom/common/templates/D713.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D713.tpl rename to plugins/wazo_snom/common/templates/D713.tpl diff --git a/plugins/wazo-snom/common/templates/D717.tpl b/plugins/wazo_snom/common/templates/D717.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D717.tpl rename to plugins/wazo_snom/common/templates/D717.tpl diff --git a/plugins/wazo-snom/common/templates/D735.tpl b/plugins/wazo_snom/common/templates/D735.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D735.tpl rename to plugins/wazo_snom/common/templates/D735.tpl diff --git a/plugins/wazo-snom/common/templates/D745.tpl b/plugins/wazo_snom/common/templates/D745.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D745.tpl rename to plugins/wazo_snom/common/templates/D745.tpl diff --git a/plugins/wazo-snom/common/templates/D765.tpl b/plugins/wazo_snom/common/templates/D765.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D765.tpl rename to plugins/wazo_snom/common/templates/D765.tpl diff --git a/plugins/wazo-snom/common/templates/D785.tpl b/plugins/wazo_snom/common/templates/D785.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D785.tpl rename to plugins/wazo_snom/common/templates/D785.tpl diff --git a/plugins/wazo-snom/common/templates/D862.tpl b/plugins/wazo_snom/common/templates/D862.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D862.tpl rename to plugins/wazo_snom/common/templates/D862.tpl diff --git a/plugins/wazo-snom/common/templates/D865.tpl b/plugins/wazo_snom/common/templates/D865.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/D865.tpl rename to plugins/wazo_snom/common/templates/D865.tpl diff --git a/plugins/wazo-snom/common/templates/MP.tpl b/plugins/wazo_snom/common/templates/MP.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/MP.tpl rename to plugins/wazo_snom/common/templates/MP.tpl diff --git a/plugins/wazo-snom/common/templates/PA1.tpl b/plugins/wazo_snom/common/templates/PA1.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/PA1.tpl rename to plugins/wazo_snom/common/templates/PA1.tpl diff --git a/plugins/wazo-snom/common/templates/base.tpl b/plugins/wazo_snom/common/templates/base.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/base.tpl rename to plugins/wazo_snom/common/templates/base.tpl diff --git a/plugins/wazo-snom/common/templates/common/gui_lang.xml.tpl b/plugins/wazo_snom/common/templates/common/gui_lang.xml.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/common/gui_lang.xml.tpl rename to plugins/wazo_snom/common/templates/common/gui_lang.xml.tpl diff --git a/plugins/wazo-snom/common/templates/common/snom-model-firmware.xml.tpl.btpl b/plugins/wazo_snom/common/templates/common/snom-model-firmware.xml.tpl.btpl similarity index 100% rename from plugins/wazo-snom/common/templates/common/snom-model-firmware.xml.tpl.btpl rename to plugins/wazo_snom/common/templates/common/snom-model-firmware.xml.tpl.btpl diff --git a/plugins/wazo-snom/common/templates/common/snom-model.htm.tpl.btpl b/plugins/wazo_snom/common/templates/common/snom-model.htm.tpl.btpl similarity index 100% rename from plugins/wazo-snom/common/templates/common/snom-model.htm.tpl.btpl rename to plugins/wazo_snom/common/templates/common/snom-model.htm.tpl.btpl diff --git a/plugins/wazo-snom/common/templates/common/snom-model.xml.tpl.btpl b/plugins/wazo_snom/common/templates/common/snom-model.xml.tpl.btpl similarity index 100% rename from plugins/wazo-snom/common/templates/common/snom-model.xml.tpl.btpl rename to plugins/wazo_snom/common/templates/common/snom-model.xml.tpl.btpl diff --git a/plugins/wazo-snom/common/templates/common/web_lang.xml.tpl b/plugins/wazo_snom/common/templates/common/web_lang.xml.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/common/web_lang.xml.tpl rename to plugins/wazo_snom/common/templates/common/web_lang.xml.tpl diff --git a/plugins/wazo-snom/common/templates/other/base.htm.tpl b/plugins/wazo_snom/common/templates/other/base.htm.tpl similarity index 100% rename from plugins/wazo-snom/common/templates/other/base.htm.tpl rename to plugins/wazo_snom/common/templates/other/base.htm.tpl diff --git a/plugins/wazo-snom/common/var/tftpboot/snom-general.xml b/plugins/wazo_snom/common/var/tftpboot/snom-general.xml similarity index 100% rename from plugins/wazo-snom/common/var/tftpboot/snom-general.xml rename to plugins/wazo_snom/common/var/tftpboot/snom-general.xml diff --git a/plugins/wazo-snom/common_dect/common.py b/plugins/wazo_snom/common_dect/common.py similarity index 100% rename from plugins/wazo-snom/common_dect/common.py rename to plugins/wazo_snom/common_dect/common.py diff --git a/plugins/wazo-snom/common_dect/templates/M300.tpl b/plugins/wazo_snom/common_dect/templates/M300.tpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/M300.tpl rename to plugins/wazo_snom/common_dect/templates/M300.tpl diff --git a/plugins/wazo-snom/common_dect/templates/M700.tpl b/plugins/wazo_snom/common_dect/templates/M700.tpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/M700.tpl rename to plugins/wazo_snom/common_dect/templates/M700.tpl diff --git a/plugins/wazo-snom/common_dect/templates/M900.tpl b/plugins/wazo_snom/common_dect/templates/M900.tpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/M900.tpl rename to plugins/wazo_snom/common_dect/templates/M900.tpl diff --git a/plugins/wazo-snom/common_dect/templates/base.tpl b/plugins/wazo_snom/common_dect/templates/base.tpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/base.tpl rename to plugins/wazo_snom/common_dect/templates/base.tpl diff --git a/plugins/wazo-snom/common_dect/templates/common/snom-general.xml.tpl b/plugins/wazo_snom/common_dect/templates/common/snom-general.xml.tpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/common/snom-general.xml.tpl rename to plugins/wazo_snom/common_dect/templates/common/snom-general.xml.tpl diff --git a/plugins/wazo-snom/common_dect/templates/common/snom-model-firmware.xml.tpl.btpl b/plugins/wazo_snom/common_dect/templates/common/snom-model-firmware.xml.tpl.btpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/common/snom-model-firmware.xml.tpl.btpl rename to plugins/wazo_snom/common_dect/templates/common/snom-model-firmware.xml.tpl.btpl diff --git a/plugins/wazo-snom/common_dect/templates/common/snom-model.htm.tpl.btpl b/plugins/wazo_snom/common_dect/templates/common/snom-model.htm.tpl.btpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/common/snom-model.htm.tpl.btpl rename to plugins/wazo_snom/common_dect/templates/common/snom-model.htm.tpl.btpl diff --git a/plugins/wazo-snom/common_dect/templates/common/snom-model.xml.tpl.btpl b/plugins/wazo_snom/common_dect/templates/common/snom-model.xml.tpl.btpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/common/snom-model.xml.tpl.btpl rename to plugins/wazo_snom/common_dect/templates/common/snom-model.xml.tpl.btpl diff --git a/plugins/wazo-snom/common_dect/templates/other/base.htm.tpl b/plugins/wazo_snom/common_dect/templates/other/base.htm.tpl similarity index 100% rename from plugins/wazo-snom/common_dect/templates/other/base.htm.tpl rename to plugins/wazo_snom/common_dect/templates/other/base.htm.tpl diff --git a/plugins/wazo-snom/tools/generate_pkgs-db.sh b/plugins/wazo_snom/tools/generate_pkgs-db.sh similarity index 100% rename from plugins/wazo-snom/tools/generate_pkgs-db.sh rename to plugins/wazo_snom/tools/generate_pkgs-db.sh diff --git a/plugins/wazo-snom/05.20.0001/entry.py b/plugins/wazo_snom/v05_20_0001/entry.py similarity index 100% rename from plugins/wazo-snom/05.20.0001/entry.py rename to plugins/wazo_snom/v05_20_0001/entry.py diff --git a/plugins/wazo-snom/05.20.0001/install.md b/plugins/wazo_snom/v05_20_0001/install.md similarity index 100% rename from plugins/wazo-snom/05.20.0001/install.md rename to plugins/wazo_snom/v05_20_0001/install.md diff --git a/plugins/wazo-snom/05.20.0001/limitations.md b/plugins/wazo_snom/v05_20_0001/limitations.md similarity index 100% rename from plugins/wazo-snom/05.20.0001/limitations.md rename to plugins/wazo_snom/v05_20_0001/limitations.md diff --git a/plugins/wazo-snom/05.20.0001/pkgs/pkgs.db b/plugins/wazo_snom/v05_20_0001/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/05.20.0001/pkgs/pkgs.db rename to plugins/wazo_snom/v05_20_0001/pkgs/pkgs.db diff --git a/plugins/wazo-snom/05.20.0001/plugin-info b/plugins/wazo_snom/v05_20_0001/plugin-info similarity index 100% rename from plugins/wazo-snom/05.20.0001/plugin-info rename to plugins/wazo_snom/v05_20_0001/plugin-info diff --git a/plugins/wazo-snom/10.1.101.11/entry.py b/plugins/wazo_snom/v10_1_101_11/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.101.11/entry.py rename to plugins/wazo_snom/v10_1_101_11/entry.py diff --git a/plugins/wazo-snom/10.1.101.11/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_101_11/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.101.11/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_101_11/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.101.11/plugin-info b/plugins/wazo_snom/v10_1_101_11/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.101.11/plugin-info rename to plugins/wazo_snom/v10_1_101_11/plugin-info diff --git a/plugins/wazo-snom/10.1.141.13/entry.py b/plugins/wazo_snom/v10_1_141_13/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.141.13/entry.py rename to plugins/wazo_snom/v10_1_141_13/entry.py diff --git a/plugins/wazo-snom/10.1.141.13/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_141_13/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.141.13/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_141_13/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.141.13/plugin-info b/plugins/wazo_snom/v10_1_141_13/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.141.13/plugin-info rename to plugins/wazo_snom/v10_1_141_13/plugin-info diff --git a/plugins/wazo-snom/10.1.152.12/entry.py b/plugins/wazo_snom/v10_1_152_12/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.152.12/entry.py rename to plugins/wazo_snom/v10_1_152_12/entry.py diff --git a/plugins/wazo-snom/10.1.152.12/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_152_12/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.152.12/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_152_12/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.152.12/plugin-info b/plugins/wazo_snom/v10_1_152_12/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.152.12/plugin-info rename to plugins/wazo_snom/v10_1_152_12/plugin-info diff --git a/plugins/wazo-snom/10.1.20.0/entry.py b/plugins/wazo_snom/v10_1_20_0/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.20.0/entry.py rename to plugins/wazo_snom/v10_1_20_0/entry.py diff --git a/plugins/wazo-snom/10.1.20.0/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_20_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.20.0/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_20_0/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.20.0/plugin-info b/plugins/wazo_snom/v10_1_20_0/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.20.0/plugin-info rename to plugins/wazo_snom/v10_1_20_0/plugin-info diff --git a/plugins/wazo-snom/10.1.26.1/entry.py b/plugins/wazo_snom/v10_1_26_1/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.26.1/entry.py rename to plugins/wazo_snom/v10_1_26_1/entry.py diff --git a/plugins/wazo-snom/10.1.26.1/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_26_1/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.26.1/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_26_1/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.26.1/plugin-info b/plugins/wazo_snom/v10_1_26_1/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.26.1/plugin-info rename to plugins/wazo_snom/v10_1_26_1/plugin-info diff --git a/plugins/wazo-snom/10.1.39.11/entry.py b/plugins/wazo_snom/v10_1_39_11/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.39.11/entry.py rename to plugins/wazo_snom/v10_1_39_11/entry.py diff --git a/plugins/wazo-snom/10.1.39.11/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_39_11/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.39.11/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_39_11/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.39.11/plugin-info b/plugins/wazo_snom/v10_1_39_11/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.39.11/plugin-info rename to plugins/wazo_snom/v10_1_39_11/plugin-info diff --git a/plugins/wazo-snom/10.1.46.16/entry.py b/plugins/wazo_snom/v10_1_46_16/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.46.16/entry.py rename to plugins/wazo_snom/v10_1_46_16/entry.py diff --git a/plugins/wazo-snom/10.1.46.16/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_46_16/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.46.16/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_46_16/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.46.16/plugin-info b/plugins/wazo_snom/v10_1_46_16/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.46.16/plugin-info rename to plugins/wazo_snom/v10_1_46_16/plugin-info diff --git a/plugins/wazo-snom/10.1.49.11/entry.py b/plugins/wazo_snom/v10_1_49_11/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.49.11/entry.py rename to plugins/wazo_snom/v10_1_49_11/entry.py diff --git a/plugins/wazo-snom/10.1.49.11/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_49_11/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.49.11/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_49_11/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.49.11/plugin-info b/plugins/wazo_snom/v10_1_49_11/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.49.11/plugin-info rename to plugins/wazo_snom/v10_1_49_11/plugin-info diff --git a/plugins/wazo-snom/10.1.51.12/entry.py b/plugins/wazo_snom/v10_1_51_12/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.51.12/entry.py rename to plugins/wazo_snom/v10_1_51_12/entry.py diff --git a/plugins/wazo-snom/10.1.51.12/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_51_12/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.51.12/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_51_12/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.51.12/plugin-info b/plugins/wazo_snom/v10_1_51_12/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.51.12/plugin-info rename to plugins/wazo_snom/v10_1_51_12/plugin-info diff --git a/plugins/wazo-snom/10.1.54.13/entry.py b/plugins/wazo_snom/v10_1_54_13/entry.py similarity index 100% rename from plugins/wazo-snom/10.1.54.13/entry.py rename to plugins/wazo_snom/v10_1_54_13/entry.py diff --git a/plugins/wazo-snom/10.1.54.13/pkgs/pkgs.db b/plugins/wazo_snom/v10_1_54_13/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/10.1.54.13/pkgs/pkgs.db rename to plugins/wazo_snom/v10_1_54_13/pkgs/pkgs.db diff --git a/plugins/wazo-snom/10.1.54.13/plugin-info b/plugins/wazo_snom/v10_1_54_13/plugin-info similarity index 100% rename from plugins/wazo-snom/10.1.54.13/plugin-info rename to plugins/wazo_snom/v10_1_54_13/plugin-info diff --git a/plugins/wazo-snom/8.7.5.35/entry.py b/plugins/wazo_snom/v8_7_5_35/entry.py similarity index 100% rename from plugins/wazo-snom/8.7.5.35/entry.py rename to plugins/wazo_snom/v8_7_5_35/entry.py diff --git a/plugins/wazo-snom/8.7.5.35/pkgs/pkgs.db b/plugins/wazo_snom/v8_7_5_35/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/8.7.5.35/pkgs/pkgs.db rename to plugins/wazo_snom/v8_7_5_35/pkgs/pkgs.db diff --git a/plugins/wazo-snom/8.7.5.35/plugin-info b/plugins/wazo_snom/v8_7_5_35/plugin-info similarity index 100% rename from plugins/wazo-snom/8.7.5.35/plugin-info rename to plugins/wazo_snom/v8_7_5_35/plugin-info diff --git a/plugins/wazo-snom/8.9.3.40/entry.py b/plugins/wazo_snom/v8_9_3_40/entry.py similarity index 100% rename from plugins/wazo-snom/8.9.3.40/entry.py rename to plugins/wazo_snom/v8_9_3_40/entry.py diff --git a/plugins/wazo-snom/8.9.3.40/pkgs/pkgs.db b/plugins/wazo_snom/v8_9_3_40/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/8.9.3.40/pkgs/pkgs.db rename to plugins/wazo_snom/v8_9_3_40/pkgs/pkgs.db diff --git a/plugins/wazo-snom/8.9.3.40/plugin-info b/plugins/wazo_snom/v8_9_3_40/plugin-info similarity index 100% rename from plugins/wazo-snom/8.9.3.40/plugin-info rename to plugins/wazo_snom/v8_9_3_40/plugin-info diff --git a/plugins/wazo-snom/8.9.3.40/var/cache/snomlang_8.9.3.xivo.zip b/plugins/wazo_snom/v8_9_3_40/var/cache/snomlang_8.9.3.xivo.zip similarity index 100% rename from plugins/wazo-snom/8.9.3.40/var/cache/snomlang_8.9.3.xivo.zip rename to plugins/wazo_snom/v8_9_3_40/var/cache/snomlang_8.9.3.xivo.zip diff --git a/plugins/wazo-snom/8.9.3.60/entry.py b/plugins/wazo_snom/v8_9_3_60/entry.py similarity index 100% rename from plugins/wazo-snom/8.9.3.60/entry.py rename to plugins/wazo_snom/v8_9_3_60/entry.py diff --git a/plugins/wazo-snom/8.9.3.60/pkgs/pkgs.db b/plugins/wazo_snom/v8_9_3_60/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/8.9.3.60/pkgs/pkgs.db rename to plugins/wazo_snom/v8_9_3_60/pkgs/pkgs.db diff --git a/plugins/wazo-snom/8.9.3.60/plugin-info b/plugins/wazo_snom/v8_9_3_60/plugin-info similarity index 100% rename from plugins/wazo-snom/8.9.3.60/plugin-info rename to plugins/wazo_snom/v8_9_3_60/plugin-info diff --git a/plugins/wazo-snom/8.9.3.60/var/cache/snomlang_8.9.3.xivo.zip b/plugins/wazo_snom/v8_9_3_60/var/cache/snomlang_8.9.3.xivo.zip similarity index 100% rename from plugins/wazo-snom/8.9.3.60/var/cache/snomlang_8.9.3.xivo.zip rename to plugins/wazo_snom/v8_9_3_60/var/cache/snomlang_8.9.3.xivo.zip diff --git a/plugins/wazo-snom/8.9.3.80/entry.py b/plugins/wazo_snom/v8_9_3_80/entry.py similarity index 100% rename from plugins/wazo-snom/8.9.3.80/entry.py rename to plugins/wazo_snom/v8_9_3_80/entry.py diff --git a/plugins/wazo-snom/8.9.3.80/pkgs/pkgs.db b/plugins/wazo_snom/v8_9_3_80/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-snom/8.9.3.80/pkgs/pkgs.db rename to plugins/wazo_snom/v8_9_3_80/pkgs/pkgs.db diff --git a/plugins/wazo-snom/8.9.3.80/plugin-info b/plugins/wazo_snom/v8_9_3_80/plugin-info similarity index 100% rename from plugins/wazo-snom/8.9.3.80/plugin-info rename to plugins/wazo_snom/v8_9_3_80/plugin-info diff --git a/plugins/wazo-snom/8.9.3.80/var/cache/snomlang_8.9.3.xivo.zip b/plugins/wazo_snom/v8_9_3_80/var/cache/snomlang_8.9.3.xivo.zip similarity index 100% rename from plugins/wazo-snom/8.9.3.80/var/cache/snomlang_8.9.3.xivo.zip rename to plugins/wazo_snom/v8_9_3_80/var/cache/snomlang_8.9.3.xivo.zip diff --git a/plugins/wazo-technicolor/ST2022-4.78.1/entry.py b/plugins/wazo_technicolor/ST2022_v4_78_1/entry.py similarity index 100% rename from plugins/wazo-technicolor/ST2022-4.78.1/entry.py rename to plugins/wazo_technicolor/ST2022_v4_78_1/entry.py diff --git a/plugins/wazo-technicolor/ST2022-4.78.1/pkgs/pkgs.db b/plugins/wazo_technicolor/ST2022_v4_78_1/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-technicolor/ST2022-4.78.1/pkgs/pkgs.db rename to plugins/wazo_technicolor/ST2022_v4_78_1/pkgs/pkgs.db diff --git a/plugins/wazo-technicolor/ST2022-4.78.1/plugin-info b/plugins/wazo_technicolor/ST2022_v4_78_1/plugin-info similarity index 100% rename from plugins/wazo-technicolor/ST2022-4.78.1/plugin-info rename to plugins/wazo_technicolor/ST2022_v4_78_1/plugin-info diff --git a/plugins/wazo-technicolor/ST2022-4.78.1/templates/common/ST2022S.inf.tpl b/plugins/wazo_technicolor/ST2022_v4_78_1/templates/common/ST2022S.inf.tpl similarity index 100% rename from plugins/wazo-technicolor/ST2022-4.78.1/templates/common/ST2022S.inf.tpl rename to plugins/wazo_technicolor/ST2022_v4_78_1/templates/common/ST2022S.inf.tpl diff --git a/plugins/wazo-technicolor/ST2022-4.78.1/var/tftpboot/comconf-4.78.1-1.txt b/plugins/wazo_technicolor/ST2022_v4_78_1/var/tftpboot/comconf-4.78.1-1.txt similarity index 100% rename from plugins/wazo-technicolor/ST2022-4.78.1/var/tftpboot/comconf-4.78.1-1.txt rename to plugins/wazo_technicolor/ST2022_v4_78_1/var/tftpboot/comconf-4.78.1-1.txt diff --git a/plugins/wazo-technicolor/ST2022-4.78.1/var/tftpboot/telconf-4.78.1-1.txt b/plugins/wazo_technicolor/ST2022_v4_78_1/var/tftpboot/telconf-4.78.1-1.txt similarity index 100% rename from plugins/wazo-technicolor/ST2022-4.78.1/var/tftpboot/telconf-4.78.1-1.txt rename to plugins/wazo_technicolor/ST2022_v4_78_1/var/tftpboot/telconf-4.78.1-1.txt diff --git a/plugins/wazo-technicolor/ST2030-2.74/entry.py b/plugins/wazo_technicolor/ST2030_v2_74/entry.py similarity index 100% rename from plugins/wazo-technicolor/ST2030-2.74/entry.py rename to plugins/wazo_technicolor/ST2030_v2_74/entry.py diff --git a/plugins/wazo-technicolor/ST2030-2.74/pkgs/pkgs.db b/plugins/wazo_technicolor/ST2030_v2_74/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-technicolor/ST2030-2.74/pkgs/pkgs.db rename to plugins/wazo_technicolor/ST2030_v2_74/pkgs/pkgs.db diff --git a/plugins/wazo-technicolor/ST2030-2.74/plugin-info b/plugins/wazo_technicolor/ST2030_v2_74/plugin-info similarity index 100% rename from plugins/wazo-technicolor/ST2030-2.74/plugin-info rename to plugins/wazo_technicolor/ST2030_v2_74/plugin-info diff --git a/plugins/wazo-technicolor/ST2030-2.74/templates/common/ST2030S.inf.tpl b/plugins/wazo_technicolor/ST2030_v2_74/templates/common/ST2030S.inf.tpl similarity index 100% rename from plugins/wazo-technicolor/ST2030-2.74/templates/common/ST2030S.inf.tpl rename to plugins/wazo_technicolor/ST2030_v2_74/templates/common/ST2030S.inf.tpl diff --git a/plugins/wazo-technicolor/ST2030-2.74/var/tftpboot/comconf-2.74-1.txt b/plugins/wazo_technicolor/ST2030_v2_74/var/tftpboot/comconf-2.74-1.txt similarity index 100% rename from plugins/wazo-technicolor/ST2030-2.74/var/tftpboot/comconf-2.74-1.txt rename to plugins/wazo_technicolor/ST2030_v2_74/var/tftpboot/comconf-2.74-1.txt diff --git a/plugins/wazo-technicolor/ST2030-2.74/var/tftpboot/telconf-2.74-1.txt b/plugins/wazo_technicolor/ST2030_v2_74/var/tftpboot/telconf-2.74-1.txt similarity index 100% rename from plugins/wazo-technicolor/ST2030-2.74/var/tftpboot/telconf-2.74-1.txt rename to plugins/wazo_technicolor/ST2030_v2_74/var/tftpboot/telconf-2.74-1.txt diff --git a/plugins/wazo-technicolor/TB30-1.74.0/entry.py b/plugins/wazo_technicolor/TB30_v1_74_0/entry.py similarity index 100% rename from plugins/wazo-technicolor/TB30-1.74.0/entry.py rename to plugins/wazo_technicolor/TB30_v1_74_0/entry.py diff --git a/plugins/wazo-technicolor/TB30-1.74.0/install.md b/plugins/wazo_technicolor/TB30_v1_74_0/install.md similarity index 100% rename from plugins/wazo-technicolor/TB30-1.74.0/install.md rename to plugins/wazo_technicolor/TB30_v1_74_0/install.md diff --git a/plugins/wazo-technicolor/TB30-1.74.0/pkgs/pkgs.db b/plugins/wazo_technicolor/TB30_v1_74_0/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-technicolor/TB30-1.74.0/pkgs/pkgs.db rename to plugins/wazo_technicolor/TB30_v1_74_0/pkgs/pkgs.db diff --git a/plugins/wazo-technicolor/TB30-1.74.0/plugin-info b/plugins/wazo_technicolor/TB30_v1_74_0/plugin-info similarity index 100% rename from plugins/wazo-technicolor/TB30-1.74.0/plugin-info rename to plugins/wazo_technicolor/TB30_v1_74_0/plugin-info diff --git a/plugins/wazo-technicolor/TB30-1.74.0/templates/common/TB30S.inf.tpl b/plugins/wazo_technicolor/TB30_v1_74_0/templates/common/TB30S.inf.tpl similarity index 100% rename from plugins/wazo-technicolor/TB30-1.74.0/templates/common/TB30S.inf.tpl rename to plugins/wazo_technicolor/TB30_v1_74_0/templates/common/TB30S.inf.tpl diff --git a/plugins/wazo-technicolor/TB30-1.74.0/var/tftpboot/comconf-1.74.0-1.txt b/plugins/wazo_technicolor/TB30_v1_74_0/var/tftpboot/comconf-1.74.0-1.txt similarity index 100% rename from plugins/wazo-technicolor/TB30-1.74.0/var/tftpboot/comconf-1.74.0-1.txt rename to plugins/wazo_technicolor/TB30_v1_74_0/var/tftpboot/comconf-1.74.0-1.txt diff --git a/plugins/wazo-technicolor/TB30-1.74.0/var/tftpboot/telconf-1.74.0-1.txt b/plugins/wazo_technicolor/TB30_v1_74_0/var/tftpboot/telconf-1.74.0-1.txt similarity index 100% rename from plugins/wazo-technicolor/TB30-1.74.0/var/tftpboot/telconf-1.74.0-1.txt rename to plugins/wazo_technicolor/TB30_v1_74_0/var/tftpboot/telconf-1.74.0-1.txt diff --git a/plugins/wazo-technicolor/build.py b/plugins/wazo_technicolor/build.py similarity index 72% rename from plugins/wazo-technicolor/build.py rename to plugins/wazo_technicolor/build.py index 13635053066556c9efe131f8adc937dd5c1f24ba..1911281eccedc858d06ca89feb0d1c98510c0515 100644 --- a/plugins/wazo-technicolor/build.py +++ b/plugins/wazo_technicolor/build.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,12 +15,22 @@ # Depends on the following external programs: # -rsync +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('ST2022-4.78.1', 'wazo-technicolor-ST2022-4.78.1') -def build_ST2022_4_78_1(path): +def build_ST2022_4_78_1(path: str) -> None: check_call( [ 'rsync', @@ -37,12 +47,11 @@ def build_ST2022_4_78_1(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'ST2022-4.78.1/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'ST2022_v4_78_1/', path]) @target('ST2030-2.74', 'wazo-technicolor-ST2030-2.74') -def build_ST2030_2_74(path): +def build_ST2030_2_74(path: str) -> None: check_call( [ 'rsync', @@ -59,12 +68,11 @@ def build_ST2030_2_74(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'ST2030-2.74/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'ST2030_v2_74/', path]) @target('TB30-1.74.0', 'wazo-technicolor-TB30-1.74.0') -def build_TB30_1_74_0(path): +def build_TB30_1_74_0(path: str) -> None: check_call( [ 'rsync', @@ -81,5 +89,4 @@ def build_TB30_1_74_0(path): path, ] ) - - check_call(['rsync', '-rlp', '--exclude', '.*', 'TB30-1.74.0/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'TB30_v1_74_0/', path]) diff --git a/plugins/wazo-technicolor/common/common.py b/plugins/wazo_technicolor/common/common.py similarity index 100% rename from plugins/wazo-technicolor/common/common.py rename to plugins/wazo_technicolor/common/common.py diff --git a/plugins/wazo-technicolor/common/templates/ST2022.tpl b/plugins/wazo_technicolor/common/templates/ST2022.tpl similarity index 100% rename from plugins/wazo-technicolor/common/templates/ST2022.tpl rename to plugins/wazo_technicolor/common/templates/ST2022.tpl diff --git a/plugins/wazo-technicolor/common/templates/ST2030.tpl b/plugins/wazo_technicolor/common/templates/ST2030.tpl similarity index 100% rename from plugins/wazo-technicolor/common/templates/ST2030.tpl rename to plugins/wazo_technicolor/common/templates/ST2030.tpl diff --git a/plugins/wazo-technicolor/common/templates/TB30.tpl b/plugins/wazo_technicolor/common/templates/TB30.tpl similarity index 100% rename from plugins/wazo-technicolor/common/templates/TB30.tpl rename to plugins/wazo_technicolor/common/templates/TB30.tpl diff --git a/plugins/wazo-technicolor/common/templates/base.tpl b/plugins/wazo_technicolor/common/templates/base.tpl similarity index 100% rename from plugins/wazo-technicolor/common/templates/base.tpl rename to plugins/wazo_technicolor/common/templates/base.tpl diff --git a/plugins/wazo-yealink/v82/__init__.py b/plugins/wazo_yealink/__init__.py similarity index 100% rename from plugins/wazo-yealink/v82/__init__.py rename to plugins/wazo_yealink/__init__.py diff --git a/plugins/wazo-yealink/build.py b/plugins/wazo_yealink/build.py similarity index 70% rename from plugins/wazo-yealink/build.py rename to plugins/wazo_yealink/build.py index c654a11f9024be99a0ff638bf542e457e1be2b7c..09f9595dd59a9b5135028906d027168c14346147 100644 --- a/plugins/wazo-yealink/build.py +++ b/plugins/wazo_yealink/build.py @@ -1,65 +1,67 @@ """ -Copyright 2013-2022 The Wazo Authors (see the AUTHORS file) +Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) SPDX-License-Identifier: GPL-3.0-or-later Depends on the following external programs: -rsync """ +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('v73', 'wazo-yealink-v73') -def build_v73(path): +def build_v73(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'v73/', path]) @target('v80', 'wazo-yealink-v80') -def build_v80(path): +def build_v80(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'v80/', path]) @target('v81', 'wazo-yealink-v81') -def build_v81(path): +def build_v81(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'v81/', path]) @target('v82', 'wazo-yealink-v82') -def build_v82(path): +def build_v82(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'v82/', path]) @target('v83', 'wazo-yealink-v83') -def build_v83(path): +def build_v83(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'v83/', path]) @target('v84', 'wazo-yealink-v84') -def build_v84(path): +def build_v84(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'v84/', path]) @target('v85', 'wazo-yealink-v85') -def build_v85(path): +def build_v85(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'v85/', path]) @target('v86', 'wazo-yealink-v86') -def build_v86(path): +def build_v86(path: str) -> None: check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - check_call(['rsync', '-rlp', '--exclude', '.*', 'v86/', path]) diff --git a/plugins/wazo-yealink/common/common.py b/plugins/wazo_yealink/common/common.py similarity index 100% rename from plugins/wazo-yealink/common/common.py rename to plugins/wazo_yealink/common/common.py diff --git a/plugins/wazo-yealink/common/var/tftpboot/directory_setting.xml b/plugins/wazo_yealink/common/var/tftpboot/directory_setting.xml similarity index 100% rename from plugins/wazo-yealink/common/var/tftpboot/directory_setting.xml rename to plugins/wazo_yealink/common/var/tftpboot/directory_setting.xml diff --git a/plugins/wazo-yealink/v82/tests/__init__.py b/plugins/wazo_yealink/v73/__init__.py similarity index 100% rename from plugins/wazo-yealink/v82/tests/__init__.py rename to plugins/wazo_yealink/v73/__init__.py diff --git a/plugins/wazo-yealink/v73/entry.py b/plugins/wazo_yealink/v73/entry.py similarity index 100% rename from plugins/wazo-yealink/v73/entry.py rename to plugins/wazo_yealink/v73/entry.py diff --git a/plugins/wazo-yealink/v73/pkgs/pkgs.db b/plugins/wazo_yealink/v73/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-yealink/v73/pkgs/pkgs.db rename to plugins/wazo_yealink/v73/pkgs/pkgs.db diff --git a/plugins/wazo-yealink/v73/plugin-info b/plugins/wazo_yealink/v73/plugin-info similarity index 100% rename from plugins/wazo-yealink/v73/plugin-info rename to plugins/wazo_yealink/v73/plugin-info diff --git a/plugins/wazo-yealink/v73/templates/T20P.tpl b/plugins/wazo_yealink/v73/templates/T20P.tpl similarity index 100% rename from plugins/wazo-yealink/v73/templates/T20P.tpl rename to plugins/wazo_yealink/v73/templates/T20P.tpl diff --git a/plugins/wazo-yealink/v73/templates/T22P.tpl b/plugins/wazo_yealink/v73/templates/T22P.tpl similarity index 100% rename from plugins/wazo-yealink/v73/templates/T22P.tpl rename to plugins/wazo_yealink/v73/templates/T22P.tpl diff --git a/plugins/wazo-yealink/v73/templates/T26P.tpl b/plugins/wazo_yealink/v73/templates/T26P.tpl similarity index 100% rename from plugins/wazo-yealink/v73/templates/T26P.tpl rename to plugins/wazo_yealink/v73/templates/T26P.tpl diff --git a/plugins/wazo-yealink/v73/templates/T28P.tpl b/plugins/wazo_yealink/v73/templates/T28P.tpl similarity index 100% rename from plugins/wazo-yealink/v73/templates/T28P.tpl rename to plugins/wazo_yealink/v73/templates/T28P.tpl diff --git a/plugins/wazo-yealink/v73/templates/W52P.tpl b/plugins/wazo_yealink/v73/templates/W52P.tpl similarity index 100% rename from plugins/wazo-yealink/v73/templates/W52P.tpl rename to plugins/wazo_yealink/v73/templates/W52P.tpl diff --git a/plugins/wazo-yealink/v73/templates/base.tpl b/plugins/wazo_yealink/v73/templates/base.tpl similarity index 100% rename from plugins/wazo-yealink/v73/templates/base.tpl rename to plugins/wazo_yealink/v73/templates/base.tpl diff --git a/plugins/wazo-yealink/v73/templates/common/W52P.tpl b/plugins/wazo_yealink/v73/templates/common/W52P.tpl similarity index 100% rename from plugins/wazo-yealink/v73/templates/common/W52P.tpl rename to plugins/wazo_yealink/v73/templates/common/W52P.tpl diff --git a/plugins/wazo-yealink/v73/templates/common/model-M7+M1.tpl b/plugins/wazo_yealink/v73/templates/common/model-M7+M1.tpl similarity index 100% rename from plugins/wazo-yealink/v73/templates/common/model-M7+M1.tpl rename to plugins/wazo_yealink/v73/templates/common/model-M7+M1.tpl diff --git a/plugins/wazo-yealink/v83/__init__.py b/plugins/wazo_yealink/v80/__init__.py similarity index 100% rename from plugins/wazo-yealink/v83/__init__.py rename to plugins/wazo_yealink/v80/__init__.py diff --git a/plugins/wazo-yealink/v80/entry.py b/plugins/wazo_yealink/v80/entry.py similarity index 100% rename from plugins/wazo-yealink/v80/entry.py rename to plugins/wazo_yealink/v80/entry.py diff --git a/plugins/wazo-yealink/v80/pkgs/pkgs.db b/plugins/wazo_yealink/v80/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-yealink/v80/pkgs/pkgs.db rename to plugins/wazo_yealink/v80/pkgs/pkgs.db diff --git a/plugins/wazo-yealink/v80/plugin-info b/plugins/wazo_yealink/v80/plugin-info similarity index 100% rename from plugins/wazo-yealink/v80/plugin-info rename to plugins/wazo_yealink/v80/plugin-info diff --git a/plugins/wazo-yealink/v80/templates/CP860.tpl b/plugins/wazo_yealink/v80/templates/CP860.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/CP860.tpl rename to plugins/wazo_yealink/v80/templates/CP860.tpl diff --git a/plugins/wazo-yealink/v80/templates/CP960.tpl b/plugins/wazo_yealink/v80/templates/CP960.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/CP960.tpl rename to plugins/wazo_yealink/v80/templates/CP960.tpl diff --git a/plugins/wazo-yealink/v80/templates/T19P_E2.tpl b/plugins/wazo_yealink/v80/templates/T19P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T19P_E2.tpl rename to plugins/wazo_yealink/v80/templates/T19P_E2.tpl diff --git a/plugins/wazo-yealink/v80/templates/T21P_E2.tpl b/plugins/wazo_yealink/v80/templates/T21P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T21P_E2.tpl rename to plugins/wazo_yealink/v80/templates/T21P_E2.tpl diff --git a/plugins/wazo-yealink/v80/templates/T23G.tpl b/plugins/wazo_yealink/v80/templates/T23G.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T23G.tpl rename to plugins/wazo_yealink/v80/templates/T23G.tpl diff --git a/plugins/wazo-yealink/v80/templates/T23P.tpl b/plugins/wazo_yealink/v80/templates/T23P.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T23P.tpl rename to plugins/wazo_yealink/v80/templates/T23P.tpl diff --git a/plugins/wazo-yealink/v80/templates/T27P.tpl b/plugins/wazo_yealink/v80/templates/T27P.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T27P.tpl rename to plugins/wazo_yealink/v80/templates/T27P.tpl diff --git a/plugins/wazo-yealink/v80/templates/T29G.tpl b/plugins/wazo_yealink/v80/templates/T29G.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T29G.tpl rename to plugins/wazo_yealink/v80/templates/T29G.tpl diff --git a/plugins/wazo-yealink/v80/templates/T40P.tpl b/plugins/wazo_yealink/v80/templates/T40P.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T40P.tpl rename to plugins/wazo_yealink/v80/templates/T40P.tpl diff --git a/plugins/wazo-yealink/v80/templates/T41P.tpl b/plugins/wazo_yealink/v80/templates/T41P.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T41P.tpl rename to plugins/wazo_yealink/v80/templates/T41P.tpl diff --git a/plugins/wazo-yealink/v80/templates/T42G.tpl b/plugins/wazo_yealink/v80/templates/T42G.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T42G.tpl rename to plugins/wazo_yealink/v80/templates/T42G.tpl diff --git a/plugins/wazo-yealink/v80/templates/T46G.tpl b/plugins/wazo_yealink/v80/templates/T46G.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T46G.tpl rename to plugins/wazo_yealink/v80/templates/T46G.tpl diff --git a/plugins/wazo-yealink/v80/templates/T48G.tpl b/plugins/wazo_yealink/v80/templates/T48G.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T48G.tpl rename to plugins/wazo_yealink/v80/templates/T48G.tpl diff --git a/plugins/wazo-yealink/v80/templates/T49G.tpl b/plugins/wazo_yealink/v80/templates/T49G.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/T49G.tpl rename to plugins/wazo_yealink/v80/templates/T49G.tpl diff --git a/plugins/wazo-yealink/v80/templates/W52P.tpl b/plugins/wazo_yealink/v80/templates/W52P.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/W52P.tpl rename to plugins/wazo_yealink/v80/templates/W52P.tpl diff --git a/plugins/wazo-yealink/v80/templates/base.tpl b/plugins/wazo_yealink/v80/templates/base.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/base.tpl rename to plugins/wazo_yealink/v80/templates/base.tpl diff --git a/plugins/wazo-yealink/v80/templates/common/W52P.tpl b/plugins/wazo_yealink/v80/templates/common/W52P.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/common/W52P.tpl rename to plugins/wazo_yealink/v80/templates/common/W52P.tpl diff --git a/plugins/wazo-yealink/v80/templates/common/model.tpl b/plugins/wazo_yealink/v80/templates/common/model.tpl similarity index 100% rename from plugins/wazo-yealink/v80/templates/common/model.tpl rename to plugins/wazo_yealink/v80/templates/common/model.tpl diff --git a/plugins/wazo-yealink/v80/var/tftpboot/lang/T19-T21-T23-T40/003.GUI.French.lang b/plugins/wazo_yealink/v80/var/tftpboot/lang/T19-T21-T23-T40/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v80/var/tftpboot/lang/T19-T21-T23-T40/003.GUI.French.lang rename to plugins/wazo_yealink/v80/var/tftpboot/lang/T19-T21-T23-T40/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v80/var/tftpboot/lang/T41-T42/003.GUI.French.lang b/plugins/wazo_yealink/v80/var/tftpboot/lang/T41-T42/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v80/var/tftpboot/lang/T41-T42/003.GUI.French.lang rename to plugins/wazo_yealink/v80/var/tftpboot/lang/T41-T42/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v80/var/tftpboot/lang/T46/003.GUI.French.lang b/plugins/wazo_yealink/v80/var/tftpboot/lang/T46/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v80/var/tftpboot/lang/T46/003.GUI.French.lang rename to plugins/wazo_yealink/v80/var/tftpboot/lang/T46/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v80/var/tftpboot/lang/T48/003.GUI.French.lang b/plugins/wazo_yealink/v80/var/tftpboot/lang/T48/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v80/var/tftpboot/lang/T48/003.GUI.French.lang rename to plugins/wazo_yealink/v80/var/tftpboot/lang/T48/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v83/tests/__init__.py b/plugins/wazo_yealink/v81/__init__.py similarity index 100% rename from plugins/wazo-yealink/v83/tests/__init__.py rename to plugins/wazo_yealink/v81/__init__.py diff --git a/plugins/wazo-yealink/v81/entry.py b/plugins/wazo_yealink/v81/entry.py similarity index 100% rename from plugins/wazo-yealink/v81/entry.py rename to plugins/wazo_yealink/v81/entry.py diff --git a/plugins/wazo-yealink/v81/pkgs/pkgs.db b/plugins/wazo_yealink/v81/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-yealink/v81/pkgs/pkgs.db rename to plugins/wazo_yealink/v81/pkgs/pkgs.db diff --git a/plugins/wazo-yealink/v81/plugin-info b/plugins/wazo_yealink/v81/plugin-info similarity index 100% rename from plugins/wazo-yealink/v81/plugin-info rename to plugins/wazo_yealink/v81/plugin-info diff --git a/plugins/wazo-yealink/v81/templates/CP860.tpl b/plugins/wazo_yealink/v81/templates/CP860.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/CP860.tpl rename to plugins/wazo_yealink/v81/templates/CP860.tpl diff --git a/plugins/wazo-yealink/v81/templates/CP920.tpl b/plugins/wazo_yealink/v81/templates/CP920.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/CP920.tpl rename to plugins/wazo_yealink/v81/templates/CP920.tpl diff --git a/plugins/wazo-yealink/v81/templates/T19P_E2.tpl b/plugins/wazo_yealink/v81/templates/T19P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T19P_E2.tpl rename to plugins/wazo_yealink/v81/templates/T19P_E2.tpl diff --git a/plugins/wazo-yealink/v81/templates/T21P_E2.tpl b/plugins/wazo_yealink/v81/templates/T21P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T21P_E2.tpl rename to plugins/wazo_yealink/v81/templates/T21P_E2.tpl diff --git a/plugins/wazo-yealink/v81/templates/T23G.tpl b/plugins/wazo_yealink/v81/templates/T23G.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T23G.tpl rename to plugins/wazo_yealink/v81/templates/T23G.tpl diff --git a/plugins/wazo-yealink/v81/templates/T23P.tpl b/plugins/wazo_yealink/v81/templates/T23P.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T23P.tpl rename to plugins/wazo_yealink/v81/templates/T23P.tpl diff --git a/plugins/wazo-yealink/v81/templates/T27G.tpl b/plugins/wazo_yealink/v81/templates/T27G.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T27G.tpl rename to plugins/wazo_yealink/v81/templates/T27G.tpl diff --git a/plugins/wazo-yealink/v81/templates/T27P.tpl b/plugins/wazo_yealink/v81/templates/T27P.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T27P.tpl rename to plugins/wazo_yealink/v81/templates/T27P.tpl diff --git a/plugins/wazo-yealink/v81/templates/T29G.tpl b/plugins/wazo_yealink/v81/templates/T29G.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T29G.tpl rename to plugins/wazo_yealink/v81/templates/T29G.tpl diff --git a/plugins/wazo-yealink/v81/templates/T40G.tpl b/plugins/wazo_yealink/v81/templates/T40G.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T40G.tpl rename to plugins/wazo_yealink/v81/templates/T40G.tpl diff --git a/plugins/wazo-yealink/v81/templates/T40P.tpl b/plugins/wazo_yealink/v81/templates/T40P.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T40P.tpl rename to plugins/wazo_yealink/v81/templates/T40P.tpl diff --git a/plugins/wazo-yealink/v81/templates/T41P.tpl b/plugins/wazo_yealink/v81/templates/T41P.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T41P.tpl rename to plugins/wazo_yealink/v81/templates/T41P.tpl diff --git a/plugins/wazo-yealink/v81/templates/T41S.tpl b/plugins/wazo_yealink/v81/templates/T41S.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T41S.tpl rename to plugins/wazo_yealink/v81/templates/T41S.tpl diff --git a/plugins/wazo-yealink/v81/templates/T42G.tpl b/plugins/wazo_yealink/v81/templates/T42G.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T42G.tpl rename to plugins/wazo_yealink/v81/templates/T42G.tpl diff --git a/plugins/wazo-yealink/v81/templates/T42S.tpl b/plugins/wazo_yealink/v81/templates/T42S.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T42S.tpl rename to plugins/wazo_yealink/v81/templates/T42S.tpl diff --git a/plugins/wazo-yealink/v81/templates/T46G.tpl b/plugins/wazo_yealink/v81/templates/T46G.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T46G.tpl rename to plugins/wazo_yealink/v81/templates/T46G.tpl diff --git a/plugins/wazo-yealink/v81/templates/T46S.tpl b/plugins/wazo_yealink/v81/templates/T46S.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T46S.tpl rename to plugins/wazo_yealink/v81/templates/T46S.tpl diff --git a/plugins/wazo-yealink/v81/templates/T48G.tpl b/plugins/wazo_yealink/v81/templates/T48G.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T48G.tpl rename to plugins/wazo_yealink/v81/templates/T48G.tpl diff --git a/plugins/wazo-yealink/v81/templates/T48S.tpl b/plugins/wazo_yealink/v81/templates/T48S.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/T48S.tpl rename to plugins/wazo_yealink/v81/templates/T48S.tpl diff --git a/plugins/wazo-yealink/v81/templates/W52P.tpl b/plugins/wazo_yealink/v81/templates/W52P.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/W52P.tpl rename to plugins/wazo_yealink/v81/templates/W52P.tpl diff --git a/plugins/wazo-yealink/v81/templates/base.tpl b/plugins/wazo_yealink/v81/templates/base.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/base.tpl rename to plugins/wazo_yealink/v81/templates/base.tpl diff --git a/plugins/wazo-yealink/v81/templates/common/W52P.tpl b/plugins/wazo_yealink/v81/templates/common/W52P.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/common/W52P.tpl rename to plugins/wazo_yealink/v81/templates/common/W52P.tpl diff --git a/plugins/wazo-yealink/v81/templates/common/model.tpl b/plugins/wazo_yealink/v81/templates/common/model.tpl similarity index 100% rename from plugins/wazo-yealink/v81/templates/common/model.tpl rename to plugins/wazo_yealink/v81/templates/common/model.tpl diff --git a/plugins/wazo-yealink/v81/var/tftpboot/directory_setting.xml b/plugins/wazo_yealink/v81/var/tftpboot/directory_setting.xml similarity index 100% rename from plugins/wazo-yealink/v81/var/tftpboot/directory_setting.xml rename to plugins/wazo_yealink/v81/var/tftpboot/directory_setting.xml diff --git a/plugins/wazo-yealink/v81/var/tftpboot/lang/T19-T21-T23-T40/003.GUI.French.lang b/plugins/wazo_yealink/v81/var/tftpboot/lang/T19-T21-T23-T40/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v81/var/tftpboot/lang/T19-T21-T23-T40/003.GUI.French.lang rename to plugins/wazo_yealink/v81/var/tftpboot/lang/T19-T21-T23-T40/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v81/var/tftpboot/lang/T29-T46/003.GUI.French.lang b/plugins/wazo_yealink/v81/var/tftpboot/lang/T29-T46/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v81/var/tftpboot/lang/T29-T46/003.GUI.French.lang rename to plugins/wazo_yealink/v81/var/tftpboot/lang/T29-T46/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v81/var/tftpboot/lang/T41-T42-T27/003.GUI.French.lang b/plugins/wazo_yealink/v81/var/tftpboot/lang/T41-T42-T27/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v81/var/tftpboot/lang/T41-T42-T27/003.GUI.French.lang rename to plugins/wazo_yealink/v81/var/tftpboot/lang/T41-T42-T27/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v81/var/tftpboot/lang/T48/003.GUI.French.lang b/plugins/wazo_yealink/v81/var/tftpboot/lang/T48/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v81/var/tftpboot/lang/T48/003.GUI.French.lang rename to plugins/wazo_yealink/v81/var/tftpboot/lang/T48/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v81/var/tftpboot/lang/T49/003.GUI.French.lang b/plugins/wazo_yealink/v81/var/tftpboot/lang/T49/003.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v81/var/tftpboot/lang/T49/003.GUI.French.lang rename to plugins/wazo_yealink/v81/var/tftpboot/lang/T49/003.GUI.French.lang diff --git a/plugins/wazo-yealink/v84/__init__.py b/plugins/wazo_yealink/v82/__init__.py similarity index 100% rename from plugins/wazo-yealink/v84/__init__.py rename to plugins/wazo_yealink/v82/__init__.py diff --git a/plugins/wazo-yealink/v82/common.py b/plugins/wazo_yealink/v82/common.py similarity index 100% rename from plugins/wazo-yealink/v82/common.py rename to plugins/wazo_yealink/v82/common.py diff --git a/plugins/wazo-yealink/v82/entry.py b/plugins/wazo_yealink/v82/entry.py similarity index 100% rename from plugins/wazo-yealink/v82/entry.py rename to plugins/wazo_yealink/v82/entry.py diff --git a/plugins/wazo-yealink/v82/pkgs/pkgs.db b/plugins/wazo_yealink/v82/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-yealink/v82/pkgs/pkgs.db rename to plugins/wazo_yealink/v82/pkgs/pkgs.db diff --git a/plugins/wazo-yealink/v82/plugin-info b/plugins/wazo_yealink/v82/plugin-info similarity index 100% rename from plugins/wazo-yealink/v82/plugin-info rename to plugins/wazo_yealink/v82/plugin-info diff --git a/plugins/wazo-yealink/v82/templates/T19P_E2.tpl b/plugins/wazo_yealink/v82/templates/T19P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T19P_E2.tpl rename to plugins/wazo_yealink/v82/templates/T19P_E2.tpl diff --git a/plugins/wazo-yealink/v82/templates/T21P_E2.tpl b/plugins/wazo_yealink/v82/templates/T21P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T21P_E2.tpl rename to plugins/wazo_yealink/v82/templates/T21P_E2.tpl diff --git a/plugins/wazo-yealink/v82/templates/T23G.tpl b/plugins/wazo_yealink/v82/templates/T23G.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T23G.tpl rename to plugins/wazo_yealink/v82/templates/T23G.tpl diff --git a/plugins/wazo-yealink/v82/templates/T23P.tpl b/plugins/wazo_yealink/v82/templates/T23P.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T23P.tpl rename to plugins/wazo_yealink/v82/templates/T23P.tpl diff --git a/plugins/wazo-yealink/v82/templates/T27G.tpl b/plugins/wazo_yealink/v82/templates/T27G.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T27G.tpl rename to plugins/wazo_yealink/v82/templates/T27G.tpl diff --git a/plugins/wazo-yealink/v82/templates/T27P.tpl b/plugins/wazo_yealink/v82/templates/T27P.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T27P.tpl rename to plugins/wazo_yealink/v82/templates/T27P.tpl diff --git a/plugins/wazo-yealink/v82/templates/T29G.tpl b/plugins/wazo_yealink/v82/templates/T29G.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T29G.tpl rename to plugins/wazo_yealink/v82/templates/T29G.tpl diff --git a/plugins/wazo-yealink/v82/templates/T40G.tpl b/plugins/wazo_yealink/v82/templates/T40G.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T40G.tpl rename to plugins/wazo_yealink/v82/templates/T40G.tpl diff --git a/plugins/wazo-yealink/v82/templates/T40P.tpl b/plugins/wazo_yealink/v82/templates/T40P.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T40P.tpl rename to plugins/wazo_yealink/v82/templates/T40P.tpl diff --git a/plugins/wazo-yealink/v82/templates/T41P.tpl b/plugins/wazo_yealink/v82/templates/T41P.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T41P.tpl rename to plugins/wazo_yealink/v82/templates/T41P.tpl diff --git a/plugins/wazo-yealink/v82/templates/T41S.tpl b/plugins/wazo_yealink/v82/templates/T41S.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T41S.tpl rename to plugins/wazo_yealink/v82/templates/T41S.tpl diff --git a/plugins/wazo-yealink/v82/templates/T42G.tpl b/plugins/wazo_yealink/v82/templates/T42G.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T42G.tpl rename to plugins/wazo_yealink/v82/templates/T42G.tpl diff --git a/plugins/wazo-yealink/v82/templates/T42S.tpl b/plugins/wazo_yealink/v82/templates/T42S.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T42S.tpl rename to plugins/wazo_yealink/v82/templates/T42S.tpl diff --git a/plugins/wazo-yealink/v82/templates/T46G.tpl b/plugins/wazo_yealink/v82/templates/T46G.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T46G.tpl rename to plugins/wazo_yealink/v82/templates/T46G.tpl diff --git a/plugins/wazo-yealink/v82/templates/T46S.tpl b/plugins/wazo_yealink/v82/templates/T46S.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T46S.tpl rename to plugins/wazo_yealink/v82/templates/T46S.tpl diff --git a/plugins/wazo-yealink/v82/templates/T48G.tpl b/plugins/wazo_yealink/v82/templates/T48G.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T48G.tpl rename to plugins/wazo_yealink/v82/templates/T48G.tpl diff --git a/plugins/wazo-yealink/v82/templates/T48S.tpl b/plugins/wazo_yealink/v82/templates/T48S.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/T48S.tpl rename to plugins/wazo_yealink/v82/templates/T48S.tpl diff --git a/plugins/wazo-yealink/v82/templates/base.tpl b/plugins/wazo_yealink/v82/templates/base.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/base.tpl rename to plugins/wazo_yealink/v82/templates/base.tpl diff --git a/plugins/wazo-yealink/v82/templates/common/model.tpl b/plugins/wazo_yealink/v82/templates/common/model.tpl similarity index 100% rename from plugins/wazo-yealink/v82/templates/common/model.tpl rename to plugins/wazo_yealink/v82/templates/common/model.tpl diff --git a/plugins/wazo-yealink/v84/tests/__init__.py b/plugins/wazo_yealink/v82/tests/__init__.py similarity index 100% rename from plugins/wazo-yealink/v84/tests/__init__.py rename to plugins/wazo_yealink/v82/tests/__init__.py diff --git a/plugins/wazo-yealink/v82/tests/conftest.py b/plugins/wazo_yealink/v82/tests/conftest.py similarity index 79% rename from plugins/wazo-yealink/v82/tests/conftest.py rename to plugins/wazo_yealink/v82/tests/conftest.py index ea52d1135e842f838320698a6966af4b0f161dfd..743d1dca120a6f08ce6edc87f1081c97472f7ff1 100644 --- a/plugins/wazo-yealink/v82/tests/conftest.py +++ b/plugins/wazo_yealink/v82/tests/conftest.py @@ -15,7 +15,7 @@ def v82_entry(module_initializer): @pytest.fixture def v82_plugin(v82_entry): - with patch('v82.common.FetchfwPluginHelper'), patch( - 'v82.common.TemplatePluginHelper' + with patch('plugins.wazo_yealink.v82.common.FetchfwPluginHelper'), patch( + 'plugins.wazo_yealink.v82.common.TemplatePluginHelper' ): yield v82_entry.YealinkPlugin(MagicMock(), 'test_dir', MagicMock(), MagicMock()) diff --git a/plugins/wazo-yealink/v82/tests/test_common.py b/plugins/wazo_yealink/v82/tests/test_common.py similarity index 97% rename from plugins/wazo-yealink/v82/tests/test_common.py rename to plugins/wazo_yealink/v82/tests/test_common.py index af56a39bab247834dbccd2f0281c4827ad71f06f..e8ff4aeb75f08bf860bc9268b8579d3ea9788145 100644 --- a/plugins/wazo-yealink/v82/tests/test_common.py +++ b/plugins/wazo_yealink/v82/tests/test_common.py @@ -72,7 +72,7 @@ class TestInfoExtraction: def test_http_ua_extractor_when_no_info(self): assert self.http_info_extractor._extract_from_ua('') is None - @patch('v82.common.defer') + @patch('plugins.wazo_yealink.v82.common.defer') def test_extract(self, mocked_defer): self.http_info_extractor.extract( self._mock_request(b'Yealink SIP-T31G 124.85.257.55 80:5e:c0:d5:7d:72'), @@ -104,7 +104,7 @@ class TestInfoExtraction: self._mock_request(path=b'/y000000000025.cfg') ) == {'vendor': 'Yealink', 'model': 'W52P'} - @patch('v82.common.logger') + @patch('plugins.wazo_yealink.v82.common.logger') def test_invalid_mac(self, mocked_logger): self.http_info_extractor._extract_from_ua( 'Yealink SIP-T20P 9.72.0.30 00:15:6525ef16a7c' @@ -163,7 +163,7 @@ class TestPluginAssociation: class TestPlugin: - @patch('v82.common.FetchfwPluginHelper') + @patch('plugins.wazo_yealink.v82.common.FetchfwPluginHelper') def test_init(self, fetch_fw, v82_entry): fetch_fw.return_value.services.return_value = sentinel.fetchfw_services fetch_fw.new_downloaders.return_value = sentinel.fetchfw_downloaders @@ -209,14 +209,14 @@ class TestPlugin: v82_plugin.deconfigure({'mac': '80:5e:c0:d5:7d:72'}) mocked_remove.assert_called_with('test_dir/var/tftpboot/805ec0d57d72.cfg') - @patch('v82.common.logger') + @patch('plugins.wazo_yealink.v82.common.logger') def test_deconfigure_no_file(self, mocked_logger, v82_plugin): v82_plugin.deconfigure({'mac': '00:00:00:00:00:00'}) message, exception = mocked_logger.info.call_args[0] assert message == 'error while removing file: %s' assert isinstance(exception, FileNotFoundError) - @patch('v82.common.synchronize') + @patch('plugins.wazo_yealink.v82.common.synchronize') def test_synchronize(self, provd_synchronize, v82_plugin): device = {'mac': '80:5e:c0:d5:7d:72'} v82_plugin.synchronize(device, {}) @@ -250,7 +250,7 @@ class TestPlugin: with pytest.raises(Exception): v82_plugin._check_device({}) - @patch('v82.common.plugins') + @patch('plugins.wazo_yealink.v82.common.plugins') def test_phonebook_url(self, provd_plugins, v82_plugin): raw_config = {'config_version': 1} v82_plugin._add_xivo_phonebook_url(raw_config) @@ -292,7 +292,7 @@ class TestPlugin: '3': None, } - @patch('v82.common.logger') + @patch('plugins.wazo_yealink.v82.common.logger') def test_timezones(self, mocked_logger, v82_plugin): raw_config = {'timezone': 'America/Montreal'} v82_plugin._add_timezone(raw_config) @@ -328,7 +328,7 @@ class TestPlugin: assert message == 'Unknown timezone: %s' assert isinstance(exception, TimezoneNotFoundError) - @patch('v82.common.logger') + @patch('plugins.wazo_yealink.v82.common.logger') def test_function_keys(self, mocked_logger, v82_plugin): raw_config = { 'funckeys': { diff --git a/plugins/wazo-yealink/v82/var/tftpboot/directory_setting.xml b/plugins/wazo_yealink/v82/var/tftpboot/directory_setting.xml similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/directory_setting.xml rename to plugins/wazo_yealink/v82/var/tftpboot/directory_setting.xml diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T19-T21-T23-T40G/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T19-T21-T23-T40G/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T19-T21-T23-T40G/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T19-T21-T23-T40G/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T27/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T27/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T27/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T27/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T29G/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T29G/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T29G/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T29G/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T40P/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T40P/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T40P/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T40P/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T41P-T42G/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T41P-T42G/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T41P-T42G/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T41P-T42G/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T41S-T42S/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T41S-T42S/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T41S-T42S/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T41S-T42S/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T46G/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T46G/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T46G/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T46G/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T46S/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T46S/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T46S/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T46S/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T48G/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T48G/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T48G/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T48G/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v82/var/tftpboot/lang/T48S/004.GUI.French.lang b/plugins/wazo_yealink/v82/var/tftpboot/lang/T48S/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v82/var/tftpboot/lang/T48S/004.GUI.French.lang rename to plugins/wazo_yealink/v82/var/tftpboot/lang/T48S/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v85/__init__.py b/plugins/wazo_yealink/v83/__init__.py similarity index 100% rename from plugins/wazo-yealink/v85/__init__.py rename to plugins/wazo_yealink/v83/__init__.py diff --git a/plugins/wazo-yealink/v83/common.py b/plugins/wazo_yealink/v83/common.py similarity index 100% rename from plugins/wazo-yealink/v83/common.py rename to plugins/wazo_yealink/v83/common.py diff --git a/plugins/wazo-yealink/v83/entry.py b/plugins/wazo_yealink/v83/entry.py similarity index 100% rename from plugins/wazo-yealink/v83/entry.py rename to plugins/wazo_yealink/v83/entry.py diff --git a/plugins/wazo-yealink/v83/pkgs/pkgs.db b/plugins/wazo_yealink/v83/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-yealink/v83/pkgs/pkgs.db rename to plugins/wazo_yealink/v83/pkgs/pkgs.db diff --git a/plugins/wazo-yealink/v83/plugin-info b/plugins/wazo_yealink/v83/plugin-info similarity index 100% rename from plugins/wazo-yealink/v83/plugin-info rename to plugins/wazo_yealink/v83/plugin-info diff --git a/plugins/wazo-yealink/v83/templates/CP960.tpl b/plugins/wazo_yealink/v83/templates/CP960.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/CP960.tpl rename to plugins/wazo_yealink/v83/templates/CP960.tpl diff --git a/plugins/wazo-yealink/v83/templates/T19P_E2.tpl b/plugins/wazo_yealink/v83/templates/T19P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T19P_E2.tpl rename to plugins/wazo_yealink/v83/templates/T19P_E2.tpl diff --git a/plugins/wazo-yealink/v83/templates/T21P_E2.tpl b/plugins/wazo_yealink/v83/templates/T21P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T21P_E2.tpl rename to plugins/wazo_yealink/v83/templates/T21P_E2.tpl diff --git a/plugins/wazo-yealink/v83/templates/T23G.tpl b/plugins/wazo_yealink/v83/templates/T23G.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T23G.tpl rename to plugins/wazo_yealink/v83/templates/T23G.tpl diff --git a/plugins/wazo-yealink/v83/templates/T23P.tpl b/plugins/wazo_yealink/v83/templates/T23P.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T23P.tpl rename to plugins/wazo_yealink/v83/templates/T23P.tpl diff --git a/plugins/wazo-yealink/v83/templates/T27G.tpl b/plugins/wazo_yealink/v83/templates/T27G.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T27G.tpl rename to plugins/wazo_yealink/v83/templates/T27G.tpl diff --git a/plugins/wazo-yealink/v83/templates/T29G.tpl b/plugins/wazo_yealink/v83/templates/T29G.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T29G.tpl rename to plugins/wazo_yealink/v83/templates/T29G.tpl diff --git a/plugins/wazo-yealink/v83/templates/T40G.tpl b/plugins/wazo_yealink/v83/templates/T40G.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T40G.tpl rename to plugins/wazo_yealink/v83/templates/T40G.tpl diff --git a/plugins/wazo-yealink/v83/templates/T40P.tpl b/plugins/wazo_yealink/v83/templates/T40P.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T40P.tpl rename to plugins/wazo_yealink/v83/templates/T40P.tpl diff --git a/plugins/wazo-yealink/v83/templates/T41P.tpl b/plugins/wazo_yealink/v83/templates/T41P.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T41P.tpl rename to plugins/wazo_yealink/v83/templates/T41P.tpl diff --git a/plugins/wazo-yealink/v83/templates/T41S.tpl b/plugins/wazo_yealink/v83/templates/T41S.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T41S.tpl rename to plugins/wazo_yealink/v83/templates/T41S.tpl diff --git a/plugins/wazo-yealink/v83/templates/T42G.tpl b/plugins/wazo_yealink/v83/templates/T42G.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T42G.tpl rename to plugins/wazo_yealink/v83/templates/T42G.tpl diff --git a/plugins/wazo-yealink/v83/templates/T42S.tpl b/plugins/wazo_yealink/v83/templates/T42S.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T42S.tpl rename to plugins/wazo_yealink/v83/templates/T42S.tpl diff --git a/plugins/wazo-yealink/v83/templates/T46G.tpl b/plugins/wazo_yealink/v83/templates/T46G.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T46G.tpl rename to plugins/wazo_yealink/v83/templates/T46G.tpl diff --git a/plugins/wazo-yealink/v83/templates/T46S.tpl b/plugins/wazo_yealink/v83/templates/T46S.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T46S.tpl rename to plugins/wazo_yealink/v83/templates/T46S.tpl diff --git a/plugins/wazo-yealink/v83/templates/T48G.tpl b/plugins/wazo_yealink/v83/templates/T48G.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T48G.tpl rename to plugins/wazo_yealink/v83/templates/T48G.tpl diff --git a/plugins/wazo-yealink/v83/templates/T48S.tpl b/plugins/wazo_yealink/v83/templates/T48S.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T48S.tpl rename to plugins/wazo_yealink/v83/templates/T48S.tpl diff --git a/plugins/wazo-yealink/v83/templates/T52S.tpl b/plugins/wazo_yealink/v83/templates/T52S.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T52S.tpl rename to plugins/wazo_yealink/v83/templates/T52S.tpl diff --git a/plugins/wazo-yealink/v83/templates/T54S.tpl b/plugins/wazo_yealink/v83/templates/T54S.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T54S.tpl rename to plugins/wazo_yealink/v83/templates/T54S.tpl diff --git a/plugins/wazo-yealink/v83/templates/T56A.tpl b/plugins/wazo_yealink/v83/templates/T56A.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T56A.tpl rename to plugins/wazo_yealink/v83/templates/T56A.tpl diff --git a/plugins/wazo-yealink/v83/templates/T58A.tpl b/plugins/wazo_yealink/v83/templates/T58A.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T58A.tpl rename to plugins/wazo_yealink/v83/templates/T58A.tpl diff --git a/plugins/wazo-yealink/v83/templates/T58V.tpl b/plugins/wazo_yealink/v83/templates/T58V.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/T58V.tpl rename to plugins/wazo_yealink/v83/templates/T58V.tpl diff --git a/plugins/wazo-yealink/v83/templates/W60B.tpl b/plugins/wazo_yealink/v83/templates/W60B.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/W60B.tpl rename to plugins/wazo_yealink/v83/templates/W60B.tpl diff --git a/plugins/wazo-yealink/v83/templates/W80B.tpl b/plugins/wazo_yealink/v83/templates/W80B.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/W80B.tpl rename to plugins/wazo_yealink/v83/templates/W80B.tpl diff --git a/plugins/wazo-yealink/v83/templates/base.tpl b/plugins/wazo_yealink/v83/templates/base.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/base.tpl rename to plugins/wazo_yealink/v83/templates/base.tpl diff --git a/plugins/wazo-yealink/v83/templates/common/dect_model.tpl b/plugins/wazo_yealink/v83/templates/common/dect_model.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/common/dect_model.tpl rename to plugins/wazo_yealink/v83/templates/common/dect_model.tpl diff --git a/plugins/wazo-yealink/v83/templates/common/model.tpl b/plugins/wazo_yealink/v83/templates/common/model.tpl similarity index 100% rename from plugins/wazo-yealink/v83/templates/common/model.tpl rename to plugins/wazo_yealink/v83/templates/common/model.tpl diff --git a/plugins/wazo-yealink/v85/tests/__init__.py b/plugins/wazo_yealink/v83/tests/__init__.py similarity index 100% rename from plugins/wazo-yealink/v85/tests/__init__.py rename to plugins/wazo_yealink/v83/tests/__init__.py diff --git a/plugins/wazo-yealink/v83/tests/conftest.py b/plugins/wazo_yealink/v83/tests/conftest.py similarity index 79% rename from plugins/wazo-yealink/v83/tests/conftest.py rename to plugins/wazo_yealink/v83/tests/conftest.py index cbea420ff091957314391b73ca863319d39d017d..3d28b2b57794b5477e2b625459d4cbff0c1382bd 100644 --- a/plugins/wazo-yealink/v83/tests/conftest.py +++ b/plugins/wazo_yealink/v83/tests/conftest.py @@ -15,7 +15,7 @@ def v83_entry(module_initializer): @pytest.fixture def v83_plugin(v83_entry): - with patch('v83.common.FetchfwPluginHelper'), patch( - 'v83.common.TemplatePluginHelper' + with patch('plugins.wazo_yealink.v83.common.FetchfwPluginHelper'), patch( + 'plugins.wazo_yealink.v83.common.TemplatePluginHelper' ): yield v83_entry.YealinkPlugin(MagicMock(), 'test_dir', MagicMock(), MagicMock()) diff --git a/plugins/wazo-yealink/v83/tests/test_common.py b/plugins/wazo_yealink/v83/tests/test_common.py similarity index 97% rename from plugins/wazo-yealink/v83/tests/test_common.py rename to plugins/wazo_yealink/v83/tests/test_common.py index 73daf814026d1d8b0698b67917296b31a2e28145..efe9c4046318bface42ff972ed466017f7963f41 100644 --- a/plugins/wazo-yealink/v83/tests/test_common.py +++ b/plugins/wazo_yealink/v83/tests/test_common.py @@ -71,7 +71,7 @@ class TestInfoExtraction: def test_http_ua_extractor_when_no_info(self): assert self.http_info_extractor._extract_from_ua('') is None - @patch('v83.common.defer') + @patch('plugins.wazo_yealink.v83.common.defer') def test_extract(self, mocked_defer): self.http_info_extractor.extract( self._mock_request(b'Yealink SIP-T31G 124.85.257.55 80:5e:c0:d5:7d:72'), @@ -103,7 +103,7 @@ class TestInfoExtraction: self._mock_request(path=b'/y000000000025.cfg') ) == {'vendor': 'Yealink', 'model': 'W52P'} - @patch('v83.common.logger') + @patch('plugins.wazo_yealink.v83.common.logger') def test_invalid_mac(self, mocked_logger): self.http_info_extractor._extract_from_ua( 'Yealink SIP-T20P 9.72.0.30 00:15:6525ef16a7c' @@ -162,7 +162,7 @@ class TestPluginAssociation: class TestPlugin: - @patch('v83.common.FetchfwPluginHelper') + @patch('plugins.wazo_yealink.v83.common.FetchfwPluginHelper') def test_init(self, fetch_fw, v83_entry): fetch_fw.return_value.services.return_value = sentinel.fetchfw_services fetch_fw.new_downloaders.return_value = sentinel.fetchfw_downloaders @@ -208,14 +208,14 @@ class TestPlugin: v83_plugin.deconfigure({'mac': '80:5e:c0:d5:7d:72'}) mocked_remove.assert_called_with('test_dir/var/tftpboot/805ec0d57d72.cfg') - @patch('v83.common.logger') + @patch('plugins.wazo_yealink.v83.common.logger') def test_deconfigure_no_file(self, mocked_logger, v83_plugin): v83_plugin.deconfigure({'mac': '00:00:00:00:00:00'}) message, exception = mocked_logger.info.call_args[0] assert message == 'error while removing file: %s' assert isinstance(exception, FileNotFoundError) - @patch('v83.common.synchronize') + @patch('plugins.wazo_yealink.v83.common.synchronize') def test_synchronize(self, provd_synchronize, v83_plugin): device = {'mac': '80:5e:c0:d5:7d:72'} v83_plugin.synchronize(device, {}) @@ -249,7 +249,7 @@ class TestPlugin: with pytest.raises(Exception): v83_plugin._check_device({}) - @patch('v83.common.plugins') + @patch('plugins.wazo_yealink.v83.common.plugins') def test_phonebook_url(self, provd_plugins, v83_plugin): raw_config = {'config_version': 1} v83_plugin._add_xivo_phonebook_url(raw_config) @@ -292,7 +292,7 @@ class TestPlugin: '3': None, } - @patch('v83.common.logger') + @patch('plugins.wazo_yealink.v83.common.logger') def test_timezones(self, mocked_logger, v83_plugin): raw_config = {'timezone': 'America/Montreal'} v83_plugin._add_timezone(raw_config) @@ -328,7 +328,7 @@ class TestPlugin: assert message == 'Unknown timezone: %s' assert isinstance(exception, TimezoneNotFoundError) - @patch('v83.common.logger') + @patch('plugins.wazo_yealink.v83.common.logger') def test_function_keys(self, mocked_logger, v83_plugin): raw_config = { 'funckeys': { diff --git a/plugins/wazo-yealink/v83/var/tftpboot/directory_setting.xml b/plugins/wazo_yealink/v83/var/tftpboot/directory_setting.xml similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/directory_setting.xml rename to plugins/wazo_yealink/v83/var/tftpboot/directory_setting.xml diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/000.GUI.English.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/000.GUI.English.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/000.GUI.English.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/000.GUI.English.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/001.GUI.Chinese_S.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/001.GUI.Chinese_S.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/001.GUI.Chinese_S.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/001.GUI.Chinese_S.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/002.GUI.Chinese_T.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/002.GUI.Chinese_T.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/002.GUI.Chinese_T.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/002.GUI.Chinese_T.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/003.GUI.French_CA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/003.GUI.French_CA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/003.GUI.French_CA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/003.GUI.French_CA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/004.GUI.French.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/004.GUI.French.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/005.GUI.German.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/005.GUI.German.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/005.GUI.German.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/005.GUI.German.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/006.GUI.Italian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/006.GUI.Italian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/006.GUI.Italian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/006.GUI.Italian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/007.GUI.Polish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/007.GUI.Polish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/007.GUI.Polish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/007.GUI.Polish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/008.GUI.Portuguese.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/008.GUI.Portuguese.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/008.GUI.Portuguese.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/008.GUI.Portuguese.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/009.GUI.Portuguese_LA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/009.GUI.Portuguese_LA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/009.GUI.Portuguese_LA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/009.GUI.Portuguese_LA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/010.GUI.Spanish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/010.GUI.Spanish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/010.GUI.Spanish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/010.GUI.Spanish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/011.GUI.Spanish_LA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/011.GUI.Spanish_LA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/011.GUI.Spanish_LA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/011.GUI.Spanish_LA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/012.GUI.Turkish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/012.GUI.Turkish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/012.GUI.Turkish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/012.GUI.Turkish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/013.GUI.Russian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/013.GUI.Russian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T19-T21-T23/013.GUI.Russian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T19-T21-T23/013.GUI.Russian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/000.GUI.English.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/000.GUI.English.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/000.GUI.English.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/000.GUI.English.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/001.GUI.Chinese_S.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/001.GUI.Chinese_S.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/001.GUI.Chinese_S.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/001.GUI.Chinese_S.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/002.GUI.Chinese_T.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/002.GUI.Chinese_T.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/002.GUI.Chinese_T.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/002.GUI.Chinese_T.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/003.GUI.French_CA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/003.GUI.French_CA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/003.GUI.French_CA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/003.GUI.French_CA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/004.GUI.French.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/004.GUI.French.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/005.GUI.German.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/005.GUI.German.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/005.GUI.German.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/005.GUI.German.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/006.GUI.Italian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/006.GUI.Italian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/006.GUI.Italian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/006.GUI.Italian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/007.GUI.Polish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/007.GUI.Polish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/007.GUI.Polish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/007.GUI.Polish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/008.GUI.Portuguese.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/008.GUI.Portuguese.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/008.GUI.Portuguese.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/008.GUI.Portuguese.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/009.GUI.Portuguese_LA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/009.GUI.Portuguese_LA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/009.GUI.Portuguese_LA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/009.GUI.Portuguese_LA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/010.GUI.Spanish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/010.GUI.Spanish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/010.GUI.Spanish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/010.GUI.Spanish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/011.GUI.Spanish_LA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/011.GUI.Spanish_LA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/011.GUI.Spanish_LA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/011.GUI.Spanish_LA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/012.GUI.Turkish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/012.GUI.Turkish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/012.GUI.Turkish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/012.GUI.Turkish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T27/013.GUI.Russian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T27/013.GUI.Russian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T27/013.GUI.Russian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T27/013.GUI.Russian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/000.GUI.English.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/000.GUI.English.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/000.GUI.English.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/000.GUI.English.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/001.GUI.Chinese_S.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/001.GUI.Chinese_S.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/001.GUI.Chinese_S.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/001.GUI.Chinese_S.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/002.GUI.Chinese_T.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/002.GUI.Chinese_T.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/002.GUI.Chinese_T.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/002.GUI.Chinese_T.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/003.GUI.French_CA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/003.GUI.French_CA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/003.GUI.French_CA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/003.GUI.French_CA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/004.GUI.French.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/004.GUI.French.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/005.GUI.German.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/005.GUI.German.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/005.GUI.German.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/005.GUI.German.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/006.GUI.Italian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/006.GUI.Italian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/006.GUI.Italian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/006.GUI.Italian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/007.GUI.Polish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/007.GUI.Polish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/007.GUI.Polish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/007.GUI.Polish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/008.GUI.Portuguese.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/008.GUI.Portuguese.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/008.GUI.Portuguese.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/008.GUI.Portuguese.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/009.GUI.Portuguese_LA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/009.GUI.Portuguese_LA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/009.GUI.Portuguese_LA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/009.GUI.Portuguese_LA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/010.GUI.Spanish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/010.GUI.Spanish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/010.GUI.Spanish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/010.GUI.Spanish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/011.GUI.Spanish_LA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/011.GUI.Spanish_LA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/011.GUI.Spanish_LA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/011.GUI.Spanish_LA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/012.GUI.Turkish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/012.GUI.Turkish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/012.GUI.Turkish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/012.GUI.Turkish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/013.GUI.Russian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/013.GUI.Russian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T29G/013.GUI.Russian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T29G/013.GUI.Russian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/000.GUI.English.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/000.GUI.English.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/000.GUI.English.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/000.GUI.English.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/001.GUI.Chinese_S.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/001.GUI.Chinese_S.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/001.GUI.Chinese_S.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/001.GUI.Chinese_S.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/002.GUI.Chinese_T.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/002.GUI.Chinese_T.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/002.GUI.Chinese_T.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/002.GUI.Chinese_T.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/004.GUI.French.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/004.GUI.French.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/005.GUI.German.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/005.GUI.German.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/005.GUI.German.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/005.GUI.German.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/006.GUI.Italian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/006.GUI.Italian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/006.GUI.Italian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/006.GUI.Italian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/007.GUI.Polish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/007.GUI.Polish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/007.GUI.Polish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/007.GUI.Polish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/008.GUI.Portuguese.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/008.GUI.Portuguese.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/008.GUI.Portuguese.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/008.GUI.Portuguese.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/010.GUI.Spanish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/010.GUI.Spanish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/010.GUI.Spanish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/010.GUI.Spanish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/012.GUI.Turkish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/012.GUI.Turkish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/012.GUI.Turkish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/012.GUI.Turkish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T40/013.GUI.Russian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T40/013.GUI.Russian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T40/013.GUI.Russian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T40/013.GUI.Russian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/000.GUI.English.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/000.GUI.English.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/000.GUI.English.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/000.GUI.English.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/001.GUI.Chinese_S.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/001.GUI.Chinese_S.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/001.GUI.Chinese_S.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/001.GUI.Chinese_S.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/002.GUI.Chinese_T.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/002.GUI.Chinese_T.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/002.GUI.Chinese_T.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/002.GUI.Chinese_T.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/004.GUI.French.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/004.GUI.French.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/005.GUI.German.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/005.GUI.German.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/005.GUI.German.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/005.GUI.German.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/006.GUI.Italian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/006.GUI.Italian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/006.GUI.Italian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/006.GUI.Italian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/007.GUI.Polish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/007.GUI.Polish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/007.GUI.Polish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/007.GUI.Polish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/008.GUI.Portuguese.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/008.GUI.Portuguese.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/008.GUI.Portuguese.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/008.GUI.Portuguese.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/010.GUI.Spanish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/010.GUI.Spanish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/010.GUI.Spanish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/010.GUI.Spanish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/012.GUI.Turkish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/012.GUI.Turkish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/012.GUI.Turkish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/012.GUI.Turkish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/013.GUI.Russian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/013.GUI.Russian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41P-T42G/013.GUI.Russian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41P-T42G/013.GUI.Russian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/000.GUI.English.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/000.GUI.English.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/000.GUI.English.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/000.GUI.English.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/001.GUI.Chinese_S.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/001.GUI.Chinese_S.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/001.GUI.Chinese_S.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/001.GUI.Chinese_S.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/002.GUI.Chinese_T.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/002.GUI.Chinese_T.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/002.GUI.Chinese_T.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/002.GUI.Chinese_T.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/003.GUI.French_CA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/003.GUI.French_CA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/003.GUI.French_CA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/003.GUI.French_CA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/004.GUI.French.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/004.GUI.French.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/004.GUI.French.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/004.GUI.French.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/005.GUI.German.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/005.GUI.German.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/005.GUI.German.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/005.GUI.German.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/006.GUI.Italian.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/006.GUI.Italian.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/006.GUI.Italian.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/006.GUI.Italian.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/007.GUI.Polish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/007.GUI.Polish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/007.GUI.Polish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/007.GUI.Polish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/008.GUI.Portuguese.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/008.GUI.Portuguese.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/008.GUI.Portuguese.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/008.GUI.Portuguese.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/009.GUI.Portuguese_LA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/009.GUI.Portuguese_LA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/009.GUI.Portuguese_LA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/009.GUI.Portuguese_LA.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/010.GUI.Spanish.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/010.GUI.Spanish.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/010.GUI.Spanish.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/010.GUI.Spanish.lang diff --git a/plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/011.GUI.Spanish_LA.lang b/plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/011.GUI.Spanish_LA.lang similarity index 100% rename from plugins/wazo-yealink/v83/var/tftpboot/lang/T41S-T42S/011.GUI.Spanish_LA.lang rename to plugins/wazo_yealink/v83/var/tftpboot/lang/T41S-T42S/011.GUI.Spanish_LA.lang diff --git a/plugins/wazo-yealink/v86/__init__.py b/plugins/wazo_yealink/v84/__init__.py similarity index 100% rename from plugins/wazo-yealink/v86/__init__.py rename to plugins/wazo_yealink/v84/__init__.py diff --git a/plugins/wazo-yealink/v84/common.py b/plugins/wazo_yealink/v84/common.py similarity index 100% rename from plugins/wazo-yealink/v84/common.py rename to plugins/wazo_yealink/v84/common.py diff --git a/plugins/wazo-yealink/v84/entry.py b/plugins/wazo_yealink/v84/entry.py similarity index 100% rename from plugins/wazo-yealink/v84/entry.py rename to plugins/wazo_yealink/v84/entry.py diff --git a/plugins/wazo-yealink/v84/pkgs/pkgs.db b/plugins/wazo_yealink/v84/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-yealink/v84/pkgs/pkgs.db rename to plugins/wazo_yealink/v84/pkgs/pkgs.db diff --git a/plugins/wazo-yealink/v84/plugin-info b/plugins/wazo_yealink/v84/plugin-info similarity index 100% rename from plugins/wazo-yealink/v84/plugin-info rename to plugins/wazo_yealink/v84/plugin-info diff --git a/plugins/wazo-yealink/v84/templates/CP920.tpl b/plugins/wazo_yealink/v84/templates/CP920.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/CP920.tpl rename to plugins/wazo_yealink/v84/templates/CP920.tpl diff --git a/plugins/wazo-yealink/v84/templates/CP960.tpl b/plugins/wazo_yealink/v84/templates/CP960.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/CP960.tpl rename to plugins/wazo_yealink/v84/templates/CP960.tpl diff --git a/plugins/wazo-yealink/v84/templates/T19P_E2.tpl b/plugins/wazo_yealink/v84/templates/T19P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T19P_E2.tpl rename to plugins/wazo_yealink/v84/templates/T19P_E2.tpl diff --git a/plugins/wazo-yealink/v84/templates/T21P_E2.tpl b/plugins/wazo_yealink/v84/templates/T21P_E2.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T21P_E2.tpl rename to plugins/wazo_yealink/v84/templates/T21P_E2.tpl diff --git a/plugins/wazo-yealink/v84/templates/T23G.tpl b/plugins/wazo_yealink/v84/templates/T23G.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T23G.tpl rename to plugins/wazo_yealink/v84/templates/T23G.tpl diff --git a/plugins/wazo-yealink/v84/templates/T23P.tpl b/plugins/wazo_yealink/v84/templates/T23P.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T23P.tpl rename to plugins/wazo_yealink/v84/templates/T23P.tpl diff --git a/plugins/wazo-yealink/v84/templates/T27G.tpl b/plugins/wazo_yealink/v84/templates/T27G.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T27G.tpl rename to plugins/wazo_yealink/v84/templates/T27G.tpl diff --git a/plugins/wazo-yealink/v84/templates/T40G.tpl b/plugins/wazo_yealink/v84/templates/T40G.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T40G.tpl rename to plugins/wazo_yealink/v84/templates/T40G.tpl diff --git a/plugins/wazo-yealink/v84/templates/T40P.tpl b/plugins/wazo_yealink/v84/templates/T40P.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T40P.tpl rename to plugins/wazo_yealink/v84/templates/T40P.tpl diff --git a/plugins/wazo-yealink/v84/templates/T41S.tpl b/plugins/wazo_yealink/v84/templates/T41S.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T41S.tpl rename to plugins/wazo_yealink/v84/templates/T41S.tpl diff --git a/plugins/wazo-yealink/v84/templates/T42S.tpl b/plugins/wazo_yealink/v84/templates/T42S.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T42S.tpl rename to plugins/wazo_yealink/v84/templates/T42S.tpl diff --git a/plugins/wazo-yealink/v84/templates/T46S.tpl b/plugins/wazo_yealink/v84/templates/T46S.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T46S.tpl rename to plugins/wazo_yealink/v84/templates/T46S.tpl diff --git a/plugins/wazo-yealink/v84/templates/T48S.tpl b/plugins/wazo_yealink/v84/templates/T48S.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T48S.tpl rename to plugins/wazo_yealink/v84/templates/T48S.tpl diff --git a/plugins/wazo-yealink/v84/templates/T52S.tpl b/plugins/wazo_yealink/v84/templates/T52S.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T52S.tpl rename to plugins/wazo_yealink/v84/templates/T52S.tpl diff --git a/plugins/wazo-yealink/v84/templates/T53.tpl b/plugins/wazo_yealink/v84/templates/T53.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T53.tpl rename to plugins/wazo_yealink/v84/templates/T53.tpl diff --git a/plugins/wazo-yealink/v84/templates/T53W.tpl b/plugins/wazo_yealink/v84/templates/T53W.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T53W.tpl rename to plugins/wazo_yealink/v84/templates/T53W.tpl diff --git a/plugins/wazo-yealink/v84/templates/T54S.tpl b/plugins/wazo_yealink/v84/templates/T54S.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T54S.tpl rename to plugins/wazo_yealink/v84/templates/T54S.tpl diff --git a/plugins/wazo-yealink/v84/templates/T54W.tpl b/plugins/wazo_yealink/v84/templates/T54W.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T54W.tpl rename to plugins/wazo_yealink/v84/templates/T54W.tpl diff --git a/plugins/wazo-yealink/v84/templates/T57W.tpl b/plugins/wazo_yealink/v84/templates/T57W.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T57W.tpl rename to plugins/wazo_yealink/v84/templates/T57W.tpl diff --git a/plugins/wazo-yealink/v84/templates/T58.tpl b/plugins/wazo_yealink/v84/templates/T58.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/T58.tpl rename to plugins/wazo_yealink/v84/templates/T58.tpl diff --git a/plugins/wazo-yealink/v84/templates/base.tpl b/plugins/wazo_yealink/v84/templates/base.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/base.tpl rename to plugins/wazo_yealink/v84/templates/base.tpl diff --git a/plugins/wazo-yealink/v84/templates/common/model.tpl b/plugins/wazo_yealink/v84/templates/common/model.tpl similarity index 100% rename from plugins/wazo-yealink/v84/templates/common/model.tpl rename to plugins/wazo_yealink/v84/templates/common/model.tpl diff --git a/plugins/wazo-yealink/v86/tests/__init__.py b/plugins/wazo_yealink/v84/tests/__init__.py similarity index 100% rename from plugins/wazo-yealink/v86/tests/__init__.py rename to plugins/wazo_yealink/v84/tests/__init__.py diff --git a/plugins/wazo-yealink/v84/tests/conftest.py b/plugins/wazo_yealink/v84/tests/conftest.py similarity index 79% rename from plugins/wazo-yealink/v84/tests/conftest.py rename to plugins/wazo_yealink/v84/tests/conftest.py index c1556e1a9a3ea6fe9d2d560e84588dd27a23b446..ab11e12f0cbae0bcec8b13c6afa3514dd9672368 100644 --- a/plugins/wazo-yealink/v84/tests/conftest.py +++ b/plugins/wazo_yealink/v84/tests/conftest.py @@ -15,7 +15,7 @@ def v84_entry(module_initializer): @pytest.fixture def v84_plugin(v84_entry): - with patch('v84.common.FetchfwPluginHelper'), patch( - 'v84.common.TemplatePluginHelper' + with patch('plugins.wazo_yealink.v84.common.FetchfwPluginHelper'), patch( + 'plugins.wazo_yealink.v84.common.TemplatePluginHelper' ): yield v84_entry.YealinkPlugin(MagicMock(), 'test_dir', MagicMock(), MagicMock()) diff --git a/plugins/wazo-yealink/v84/tests/test_common.py b/plugins/wazo_yealink/v84/tests/test_common.py similarity index 97% rename from plugins/wazo-yealink/v84/tests/test_common.py rename to plugins/wazo_yealink/v84/tests/test_common.py index 574b7a6593a628e65210f785b1c263aedefaa9d0..821486126f7e1b7d61aa41ee10ad77d9a623e076 100644 --- a/plugins/wazo-yealink/v84/tests/test_common.py +++ b/plugins/wazo_yealink/v84/tests/test_common.py @@ -71,7 +71,7 @@ class TestInfoExtraction: def test_http_ua_extractor_when_no_info(self): assert self.http_info_extractor._extract_from_ua('') is None - @patch('v84.common.defer') + @patch('plugins.wazo_yealink.v84.common.defer') def test_extract(self, mocked_defer): self.http_info_extractor.extract( self._mock_request(b'Yealink SIP-T31G 124.85.257.55 80:5e:c0:d5:7d:72'), @@ -100,7 +100,7 @@ class TestInfoExtraction: self._mock_request(path=path) ) == {'mac': mac} - @patch('v84.common.logger') + @patch('plugins.wazo_yealink.v84.common.logger') def test_invalid_mac(self, mocked_logger): self.http_info_extractor._extract_from_ua( 'Yealink SIP-T20P 9.72.0.30 00:15:6525ef16a7c' @@ -159,7 +159,7 @@ class TestPluginAssociation: class TestPlugin: - @patch('v84.common.FetchfwPluginHelper') + @patch('plugins.wazo_yealink.v84.common.FetchfwPluginHelper') def test_init(self, fetch_fw, v84_entry): fetch_fw.return_value.services.return_value = sentinel.fetchfw_services fetch_fw.new_downloaders.return_value = sentinel.fetchfw_downloaders @@ -205,14 +205,14 @@ class TestPlugin: v84_plugin.deconfigure({'mac': '80:5e:c0:d5:7d:72'}) mocked_remove.assert_called_with('test_dir/var/tftpboot/805ec0d57d72.cfg') - @patch('v84.common.logger') + @patch('plugins.wazo_yealink.v84.common.logger') def test_deconfigure_no_file(self, mocked_logger, v84_plugin): v84_plugin.deconfigure({'mac': '00:00:00:00:00:00'}) message, exception = mocked_logger.info.call_args[0] assert message == 'error while removing file: %s' assert isinstance(exception, FileNotFoundError) - @patch('v84.common.synchronize') + @patch('plugins.wazo_yealink.v84.common.synchronize') def test_synchronize(self, provd_synchronize, v84_plugin): device = {'mac': '80:5e:c0:d5:7d:72'} v84_plugin.synchronize(device, {}) @@ -246,7 +246,7 @@ class TestPlugin: with pytest.raises(Exception): v84_plugin._check_device({}) - @patch('v84.common.plugins') + @patch('plugins.wazo_yealink.v84.common.plugins') def test_phonebook_url(self, provd_plugins, v84_plugin): raw_config = {'config_version': 1} v84_plugin._add_xivo_phonebook_url(raw_config) @@ -287,7 +287,7 @@ class TestPlugin: '3': None, } - @patch('v84.common.logger') + @patch('plugins.wazo_yealink.v84.common.logger') def test_timezones(self, mocked_logger, v84_plugin): raw_config = {'timezone': 'America/Montreal'} v84_plugin._add_timezone(raw_config) @@ -323,7 +323,7 @@ class TestPlugin: assert message == 'Unknown timezone: %s' assert isinstance(exception, TimezoneNotFoundError) - @patch('v84.common.logger') + @patch('plugins.wazo_yealink.v84.common.logger') def test_function_keys(self, mocked_logger, v84_plugin): raw_config = { 'funckeys': { diff --git a/plugins/wazo-yealink/v84/var/tftpboot/directory_setting.xml b/plugins/wazo_yealink/v84/var/tftpboot/directory_setting.xml similarity index 100% rename from plugins/wazo-yealink/v84/var/tftpboot/directory_setting.xml rename to plugins/wazo_yealink/v84/var/tftpboot/directory_setting.xml diff --git a/plugins/wazo_yealink/v85/__init__.py b/plugins/wazo_yealink/v85/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/plugins/wazo-yealink/v85/common.py b/plugins/wazo_yealink/v85/common.py similarity index 100% rename from plugins/wazo-yealink/v85/common.py rename to plugins/wazo_yealink/v85/common.py diff --git a/plugins/wazo-yealink/v85/entry.py b/plugins/wazo_yealink/v85/entry.py similarity index 100% rename from plugins/wazo-yealink/v85/entry.py rename to plugins/wazo_yealink/v85/entry.py diff --git a/plugins/wazo-yealink/v85/pkgs/pkgs.db b/plugins/wazo_yealink/v85/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-yealink/v85/pkgs/pkgs.db rename to plugins/wazo_yealink/v85/pkgs/pkgs.db diff --git a/plugins/wazo-yealink/v85/plugin-info b/plugins/wazo_yealink/v85/plugin-info similarity index 100% rename from plugins/wazo-yealink/v85/plugin-info rename to plugins/wazo_yealink/v85/plugin-info diff --git a/plugins/wazo-yealink/v85/templates/CP920.tpl b/plugins/wazo_yealink/v85/templates/CP920.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/CP920.tpl rename to plugins/wazo_yealink/v85/templates/CP920.tpl diff --git a/plugins/wazo-yealink/v85/templates/CP960.tpl b/plugins/wazo_yealink/v85/templates/CP960.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/CP960.tpl rename to plugins/wazo_yealink/v85/templates/CP960.tpl diff --git a/plugins/wazo-yealink/v85/templates/T27G.tpl b/plugins/wazo_yealink/v85/templates/T27G.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T27G.tpl rename to plugins/wazo_yealink/v85/templates/T27G.tpl diff --git a/plugins/wazo-yealink/v85/templates/T30.tpl b/plugins/wazo_yealink/v85/templates/T30.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T30.tpl rename to plugins/wazo_yealink/v85/templates/T30.tpl diff --git a/plugins/wazo-yealink/v85/templates/T30P.tpl b/plugins/wazo_yealink/v85/templates/T30P.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T30P.tpl rename to plugins/wazo_yealink/v85/templates/T30P.tpl diff --git a/plugins/wazo-yealink/v85/templates/T31.tpl b/plugins/wazo_yealink/v85/templates/T31.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T31.tpl rename to plugins/wazo_yealink/v85/templates/T31.tpl diff --git a/plugins/wazo-yealink/v85/templates/T31G.tpl b/plugins/wazo_yealink/v85/templates/T31G.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T31G.tpl rename to plugins/wazo_yealink/v85/templates/T31G.tpl diff --git a/plugins/wazo-yealink/v85/templates/T31P.tpl b/plugins/wazo_yealink/v85/templates/T31P.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T31P.tpl rename to plugins/wazo_yealink/v85/templates/T31P.tpl diff --git a/plugins/wazo-yealink/v86/templates/T31W.tpl b/plugins/wazo_yealink/v85/templates/T31W.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T31W.tpl rename to plugins/wazo_yealink/v85/templates/T31W.tpl diff --git a/plugins/wazo-yealink/v85/templates/T33G.tpl b/plugins/wazo_yealink/v85/templates/T33G.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T33G.tpl rename to plugins/wazo_yealink/v85/templates/T33G.tpl diff --git a/plugins/wazo-yealink/v85/templates/T33P.tpl b/plugins/wazo_yealink/v85/templates/T33P.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T33P.tpl rename to plugins/wazo_yealink/v85/templates/T33P.tpl diff --git a/plugins/wazo-yealink/v86/templates/T34W.tpl b/plugins/wazo_yealink/v85/templates/T34W.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T34W.tpl rename to plugins/wazo_yealink/v85/templates/T34W.tpl diff --git a/plugins/wazo-yealink/v85/templates/T41S.tpl b/plugins/wazo_yealink/v85/templates/T41S.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T41S.tpl rename to plugins/wazo_yealink/v85/templates/T41S.tpl diff --git a/plugins/wazo-yealink/v85/templates/T42S.tpl b/plugins/wazo_yealink/v85/templates/T42S.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T42S.tpl rename to plugins/wazo_yealink/v85/templates/T42S.tpl diff --git a/plugins/wazo-yealink/v85/templates/T46S.tpl b/plugins/wazo_yealink/v85/templates/T46S.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T46S.tpl rename to plugins/wazo_yealink/v85/templates/T46S.tpl diff --git a/plugins/wazo-yealink/v85/templates/T48S.tpl b/plugins/wazo_yealink/v85/templates/T48S.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T48S.tpl rename to plugins/wazo_yealink/v85/templates/T48S.tpl diff --git a/plugins/wazo-yealink/v85/templates/T53.tpl b/plugins/wazo_yealink/v85/templates/T53.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T53.tpl rename to plugins/wazo_yealink/v85/templates/T53.tpl diff --git a/plugins/wazo-yealink/v85/templates/T53W.tpl b/plugins/wazo_yealink/v85/templates/T53W.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T53W.tpl rename to plugins/wazo_yealink/v85/templates/T53W.tpl diff --git a/plugins/wazo-yealink/v85/templates/T54W.tpl b/plugins/wazo_yealink/v85/templates/T54W.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T54W.tpl rename to plugins/wazo_yealink/v85/templates/T54W.tpl diff --git a/plugins/wazo-yealink/v85/templates/T57W.tpl b/plugins/wazo_yealink/v85/templates/T57W.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T57W.tpl rename to plugins/wazo_yealink/v85/templates/T57W.tpl diff --git a/plugins/wazo-yealink/v85/templates/T58.tpl b/plugins/wazo_yealink/v85/templates/T58.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/T58.tpl rename to plugins/wazo_yealink/v85/templates/T58.tpl diff --git a/plugins/wazo-yealink/v85/templates/W60B.tpl b/plugins/wazo_yealink/v85/templates/W60B.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/W60B.tpl rename to plugins/wazo_yealink/v85/templates/W60B.tpl diff --git a/plugins/wazo-yealink/v85/templates/W70B.tpl b/plugins/wazo_yealink/v85/templates/W70B.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/W70B.tpl rename to plugins/wazo_yealink/v85/templates/W70B.tpl diff --git a/plugins/wazo-yealink/v85/templates/W90B.tpl b/plugins/wazo_yealink/v85/templates/W90B.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/W90B.tpl rename to plugins/wazo_yealink/v85/templates/W90B.tpl diff --git a/plugins/wazo-yealink/v85/templates/W90DM.tpl b/plugins/wazo_yealink/v85/templates/W90DM.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/W90DM.tpl rename to plugins/wazo_yealink/v85/templates/W90DM.tpl diff --git a/plugins/wazo-yealink/v85/templates/base.tpl b/plugins/wazo_yealink/v85/templates/base.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/base.tpl rename to plugins/wazo_yealink/v85/templates/base.tpl diff --git a/plugins/wazo-yealink/v85/templates/common/dect_model.tpl b/plugins/wazo_yealink/v85/templates/common/dect_model.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/common/dect_model.tpl rename to plugins/wazo_yealink/v85/templates/common/dect_model.tpl diff --git a/plugins/wazo-yealink/v85/templates/common/model.tpl b/plugins/wazo_yealink/v85/templates/common/model.tpl similarity index 100% rename from plugins/wazo-yealink/v85/templates/common/model.tpl rename to plugins/wazo_yealink/v85/templates/common/model.tpl diff --git a/plugins/wazo_yealink/v85/tests/__init__.py b/plugins/wazo_yealink/v85/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/plugins/wazo-yealink/v85/tests/conftest.py b/plugins/wazo_yealink/v85/tests/conftest.py similarity index 79% rename from plugins/wazo-yealink/v85/tests/conftest.py rename to plugins/wazo_yealink/v85/tests/conftest.py index 7211cd7c6b5fd619ecb1e78d0cccbe6c03cedbe4..e999a0959ba79307c50ddb359893510b89a892e0 100644 --- a/plugins/wazo-yealink/v85/tests/conftest.py +++ b/plugins/wazo_yealink/v85/tests/conftest.py @@ -15,7 +15,7 @@ def v85_entry(module_initializer): @pytest.fixture def v85_plugin(v85_entry): - with patch('v85.common.FetchfwPluginHelper'), patch( - 'v85.common.TemplatePluginHelper' + with patch('plugins.wazo_yealink.v85.common.FetchfwPluginHelper'), patch( + 'plugins.wazo_yealink.v85.common.TemplatePluginHelper' ): yield v85_entry.YealinkPlugin(MagicMock(), 'test_dir', MagicMock(), MagicMock()) diff --git a/plugins/wazo-yealink/v85/tests/test_common.py b/plugins/wazo_yealink/v85/tests/test_common.py similarity index 97% rename from plugins/wazo-yealink/v85/tests/test_common.py rename to plugins/wazo_yealink/v85/tests/test_common.py index d4be439f49a107b4fa29e07562f2c1cbbd8f3abb..548c72c6c9957d5116c2d488aba68f135adbb0b1 100644 --- a/plugins/wazo-yealink/v85/tests/test_common.py +++ b/plugins/wazo_yealink/v85/tests/test_common.py @@ -66,7 +66,7 @@ class TestInfoExtraction: def test_http_ua_extractor_when_no_info(self): assert self.http_info_extractor._extract_from_ua('') is None - @patch('v85.common.defer') + @patch('plugins.wazo_yealink.v85.common.defer') def test_extract(self, mocked_defer): self.http_info_extractor.extract( self._mock_request(b'Yealink SIP-T31G 124.85.257.55 80:5e:c0:d5:7d:72'), @@ -94,7 +94,7 @@ class TestInfoExtraction: self._mock_request(path=path) ) == {'mac': mac} - @patch('v85.common.logger') + @patch('plugins.wazo_yealink.v85.common.logger') def test_invalid_mac(self, mocked_logger): self.http_info_extractor._extract_from_ua( 'Yealink SIP-T20P 9.72.0.30 00:15:6525ef16a7c' @@ -153,7 +153,7 @@ class TestPluginAssociation: class TestPlugin: - @patch('v85.common.FetchfwPluginHelper') + @patch('plugins.wazo_yealink.v85.common.FetchfwPluginHelper') def test_init(self, fetch_fw, v85_entry): fetch_fw.return_value.services.return_value = sentinel.fetchfw_services fetch_fw.new_downloaders.return_value = sentinel.fetchfw_downloaders @@ -199,14 +199,14 @@ class TestPlugin: v85_plugin.deconfigure({'mac': '80:5e:c0:d5:7d:72'}) mocked_remove.assert_called_with('test_dir/var/tftpboot/805ec0d57d72.cfg') - @patch('v85.common.logger') + @patch('plugins.wazo_yealink.v85.common.logger') def test_deconfigure_no_file(self, mocked_logger, v85_plugin): v85_plugin.deconfigure({'mac': '00:00:00:00:00:00'}) message, exception = mocked_logger.info.call_args[0] assert message == 'error while removing file: %s' assert isinstance(exception, FileNotFoundError) - @patch('v85.common.synchronize') + @patch('plugins.wazo_yealink.v85.common.synchronize') def test_synchronize(self, provd_synchronize, v85_plugin): device = {'mac': '80:5e:c0:d5:7d:72'} v85_plugin.synchronize(device, {}) @@ -240,7 +240,7 @@ class TestPlugin: with pytest.raises(Exception): v85_plugin._check_device({}) - @patch('v85.common.plugins') + @patch('plugins.wazo_yealink.v85.common.plugins') def test_phonebook_url(self, provd_plugins, v85_plugin): raw_config = {'config_version': 1} v85_plugin._add_xivo_phonebook_url(raw_config) @@ -284,7 +284,7 @@ class TestPlugin: '4': None, } - @patch('v85.common.logger') + @patch('plugins.wazo_yealink.v85.common.logger') def test_timezones(self, mocked_logger, v85_plugin): raw_config = {'timezone': 'America/Montreal'} v85_plugin._add_timezone(raw_config) @@ -320,7 +320,7 @@ class TestPlugin: assert message == 'Unknown timezone: %s' assert isinstance(exception, TimezoneNotFoundError) - @patch('v85.common.logger') + @patch('plugins.wazo_yealink.v85.common.logger') def test_function_keys(self, mocked_logger, v85_plugin): raw_config = { 'funckeys': { diff --git a/plugins/wazo-yealink/v85/var/tftpboot/directory_setting.xml b/plugins/wazo_yealink/v85/var/tftpboot/directory_setting.xml similarity index 100% rename from plugins/wazo-yealink/v85/var/tftpboot/directory_setting.xml rename to plugins/wazo_yealink/v85/var/tftpboot/directory_setting.xml diff --git a/plugins/wazo_yealink/v86/__init__.py b/plugins/wazo_yealink/v86/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/plugins/wazo-yealink/v86/common.py b/plugins/wazo_yealink/v86/common.py similarity index 100% rename from plugins/wazo-yealink/v86/common.py rename to plugins/wazo_yealink/v86/common.py diff --git a/plugins/wazo-yealink/v86/entry.py b/plugins/wazo_yealink/v86/entry.py similarity index 100% rename from plugins/wazo-yealink/v86/entry.py rename to plugins/wazo_yealink/v86/entry.py diff --git a/plugins/wazo-yealink/v86/pkgs/pkgs.db b/plugins/wazo_yealink/v86/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-yealink/v86/pkgs/pkgs.db rename to plugins/wazo_yealink/v86/pkgs/pkgs.db diff --git a/plugins/wazo-yealink/v86/plugin-info b/plugins/wazo_yealink/v86/plugin-info similarity index 100% rename from plugins/wazo-yealink/v86/plugin-info rename to plugins/wazo_yealink/v86/plugin-info diff --git a/plugins/wazo-yealink/v86/templates/CP920.tpl b/plugins/wazo_yealink/v86/templates/CP920.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/CP920.tpl rename to plugins/wazo_yealink/v86/templates/CP920.tpl diff --git a/plugins/wazo-yealink/v86/templates/T27G.tpl b/plugins/wazo_yealink/v86/templates/T27G.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T27G.tpl rename to plugins/wazo_yealink/v86/templates/T27G.tpl diff --git a/plugins/wazo-yealink/v86/templates/T30.tpl b/plugins/wazo_yealink/v86/templates/T30.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T30.tpl rename to plugins/wazo_yealink/v86/templates/T30.tpl diff --git a/plugins/wazo-yealink/v86/templates/T30P.tpl b/plugins/wazo_yealink/v86/templates/T30P.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T30P.tpl rename to plugins/wazo_yealink/v86/templates/T30P.tpl diff --git a/plugins/wazo-yealink/v86/templates/T31.tpl b/plugins/wazo_yealink/v86/templates/T31.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T31.tpl rename to plugins/wazo_yealink/v86/templates/T31.tpl diff --git a/plugins/wazo-yealink/v86/templates/T31G.tpl b/plugins/wazo_yealink/v86/templates/T31G.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T31G.tpl rename to plugins/wazo_yealink/v86/templates/T31G.tpl diff --git a/plugins/wazo-yealink/v86/templates/T31P.tpl b/plugins/wazo_yealink/v86/templates/T31P.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T31P.tpl rename to plugins/wazo_yealink/v86/templates/T31P.tpl diff --git a/plugins/wazo-yealink/v86/templates/T33G.tpl b/plugins/wazo_yealink/v86/templates/T33G.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T33G.tpl rename to plugins/wazo_yealink/v86/templates/T33G.tpl diff --git a/plugins/wazo-yealink/v86/templates/T33P.tpl b/plugins/wazo_yealink/v86/templates/T33P.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T33P.tpl rename to plugins/wazo_yealink/v86/templates/T33P.tpl diff --git a/plugins/wazo-yealink/v86/templates/T41S.tpl b/plugins/wazo_yealink/v86/templates/T41S.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T41S.tpl rename to plugins/wazo_yealink/v86/templates/T41S.tpl diff --git a/plugins/wazo-yealink/v86/templates/T41U.tpl b/plugins/wazo_yealink/v86/templates/T41U.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T41U.tpl rename to plugins/wazo_yealink/v86/templates/T41U.tpl diff --git a/plugins/wazo-yealink/v86/templates/T42S.tpl b/plugins/wazo_yealink/v86/templates/T42S.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T42S.tpl rename to plugins/wazo_yealink/v86/templates/T42S.tpl diff --git a/plugins/wazo-yealink/v86/templates/T42U.tpl b/plugins/wazo_yealink/v86/templates/T42U.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T42U.tpl rename to plugins/wazo_yealink/v86/templates/T42U.tpl diff --git a/plugins/wazo-yealink/v86/templates/T43U.tpl b/plugins/wazo_yealink/v86/templates/T43U.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T43U.tpl rename to plugins/wazo_yealink/v86/templates/T43U.tpl diff --git a/plugins/wazo-yealink/v86/templates/T46S.tpl b/plugins/wazo_yealink/v86/templates/T46S.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T46S.tpl rename to plugins/wazo_yealink/v86/templates/T46S.tpl diff --git a/plugins/wazo-yealink/v86/templates/T46U.tpl b/plugins/wazo_yealink/v86/templates/T46U.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T46U.tpl rename to plugins/wazo_yealink/v86/templates/T46U.tpl diff --git a/plugins/wazo-yealink/v86/templates/T48S.tpl b/plugins/wazo_yealink/v86/templates/T48S.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T48S.tpl rename to plugins/wazo_yealink/v86/templates/T48S.tpl diff --git a/plugins/wazo-yealink/v86/templates/T48U.tpl b/plugins/wazo_yealink/v86/templates/T48U.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T48U.tpl rename to plugins/wazo_yealink/v86/templates/T48U.tpl diff --git a/plugins/wazo-yealink/v86/templates/T53.tpl b/plugins/wazo_yealink/v86/templates/T53.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T53.tpl rename to plugins/wazo_yealink/v86/templates/T53.tpl diff --git a/plugins/wazo-yealink/v86/templates/T53W.tpl b/plugins/wazo_yealink/v86/templates/T53W.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T53W.tpl rename to plugins/wazo_yealink/v86/templates/T53W.tpl diff --git a/plugins/wazo-yealink/v86/templates/T54W.tpl b/plugins/wazo_yealink/v86/templates/T54W.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T54W.tpl rename to plugins/wazo_yealink/v86/templates/T54W.tpl diff --git a/plugins/wazo-yealink/v86/templates/T57W.tpl b/plugins/wazo_yealink/v86/templates/T57W.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T57W.tpl rename to plugins/wazo_yealink/v86/templates/T57W.tpl diff --git a/plugins/wazo-yealink/v86/templates/T58.tpl b/plugins/wazo_yealink/v86/templates/T58.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T58.tpl rename to plugins/wazo_yealink/v86/templates/T58.tpl diff --git a/plugins/wazo-yealink/v86/templates/T58W.tpl b/plugins/wazo_yealink/v86/templates/T58W.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/T58W.tpl rename to plugins/wazo_yealink/v86/templates/T58W.tpl diff --git a/plugins/wazo-yealink/v86/templates/base.tpl b/plugins/wazo_yealink/v86/templates/base.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/base.tpl rename to plugins/wazo_yealink/v86/templates/base.tpl diff --git a/plugins/wazo-yealink/v86/templates/common/dect_model.tpl b/plugins/wazo_yealink/v86/templates/common/dect_model.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/common/dect_model.tpl rename to plugins/wazo_yealink/v86/templates/common/dect_model.tpl diff --git a/plugins/wazo-yealink/v86/templates/common/model.tpl b/plugins/wazo_yealink/v86/templates/common/model.tpl similarity index 100% rename from plugins/wazo-yealink/v86/templates/common/model.tpl rename to plugins/wazo_yealink/v86/templates/common/model.tpl diff --git a/plugins/wazo_yealink/v86/tests/__init__.py b/plugins/wazo_yealink/v86/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/plugins/wazo-yealink/v86/tests/conftest.py b/plugins/wazo_yealink/v86/tests/conftest.py similarity index 79% rename from plugins/wazo-yealink/v86/tests/conftest.py rename to plugins/wazo_yealink/v86/tests/conftest.py index 13fbf7c20b89021bc12bcb68d8097bad0fae7f27..3fade25e92daa4caaf31b8bf8ae337a69de10f68 100644 --- a/plugins/wazo-yealink/v86/tests/conftest.py +++ b/plugins/wazo_yealink/v86/tests/conftest.py @@ -15,7 +15,7 @@ def v86_entry(module_initializer): @pytest.fixture def v86_plugin(v86_entry): - with patch('v86.common.FetchfwPluginHelper'), patch( - 'v86.common.TemplatePluginHelper' + with patch('plugins.wazo_yealink.v86.common.FetchfwPluginHelper'), patch( + 'plugins.wazo_yealink.v86.common.TemplatePluginHelper' ): yield v86_entry.YealinkPlugin(MagicMock(), 'test_dir', MagicMock(), MagicMock()) diff --git a/plugins/wazo-yealink/v86/tests/test_common.py b/plugins/wazo_yealink/v86/tests/test_common.py similarity index 97% rename from plugins/wazo-yealink/v86/tests/test_common.py rename to plugins/wazo_yealink/v86/tests/test_common.py index e5a5636533b6f88f5c2887a3fc69acb6f14cb72a..7218915222615f6e9ab038bbd851699524861232 100644 --- a/plugins/wazo-yealink/v86/tests/test_common.py +++ b/plugins/wazo_yealink/v86/tests/test_common.py @@ -66,7 +66,7 @@ class TestInfoExtraction: def test_http_ua_extractor_when_no_info(self): assert self.http_info_extractor._extract_from_ua('') is None - @patch('v86.common.defer') + @patch('plugins.wazo_yealink.v86.common.defer') def test_extract(self, mocked_defer): self.http_info_extractor.extract( self._mock_request(b'Yealink SIP-T31G 124.85.257.55 80:5e:c0:d5:7d:72'), @@ -96,7 +96,7 @@ class TestInfoExtraction: raise Exception(path, mac) assert {'vendor': 'Yealink', 'mac': mac}.items() <= result.items() - @patch('v86.common.logger') + @patch('plugins.wazo_yealink.v86.common.logger') def test_invalid_mac(self, mocked_logger): self.http_info_extractor._extract_from_ua( 'Yealink SIP-T20P 9.72.0.30 00:15:6525ef16a7c' @@ -149,7 +149,7 @@ class TestPluginAssociation: class TestPlugin: - @patch('v86.common.FetchfwPluginHelper') + @patch('plugins.wazo_yealink.v86.common.FetchfwPluginHelper') def test_init(self, fetch_fw, v86_entry): fetch_fw.return_value.services.return_value = sentinel.fetchfw_services fetch_fw.new_downloaders.return_value = sentinel.fetchfw_downloaders @@ -195,14 +195,14 @@ class TestPlugin: v86_plugin.deconfigure({'mac': '80:5e:c0:d5:7d:72'}) mocked_remove.assert_called_with('test_dir/var/tftpboot/805ec0d57d72.cfg') - @patch('v86.common.logger') + @patch('plugins.wazo_yealink.v86.common.logger') def test_deconfigure_no_file(self, mocked_logger, v86_plugin): v86_plugin.deconfigure({'mac': '00:00:00:00:00:00'}) message, exception = mocked_logger.info.call_args[0] assert message == 'error while removing file: %s' assert isinstance(exception, FileNotFoundError) - @patch('v86.common.synchronize') + @patch('plugins.wazo_yealink.v86.common.synchronize') def test_synchronize(self, provd_synchronize, v86_plugin): device = {'mac': '80:5e:c0:d5:7d:72'} v86_plugin.synchronize(device, {}) @@ -236,7 +236,7 @@ class TestPlugin: with pytest.raises(Exception): v86_plugin._check_device({}) - @patch('v86.common.plugins') + @patch('plugins.wazo_yealink.v86.common.plugins') def test_phonebook_url(self, provd_plugins, v86_plugin): raw_config = {'config_version': 1} v86_plugin._add_xivo_phonebook_url(raw_config) @@ -280,7 +280,7 @@ class TestPlugin: '4': None, } - @patch('v86.common.logger') + @patch('plugins.wazo_yealink.v86.common.logger') def test_timezones(self, mocked_logger, v86_plugin): raw_config = {'timezone': 'America/Montreal'} v86_plugin._add_timezone(raw_config) @@ -316,7 +316,7 @@ class TestPlugin: assert message == 'Unknown timezone: %s' assert isinstance(exception, TimezoneNotFoundError) - @patch('v86.common.logger') + @patch('plugins.wazo_yealink.v86.common.logger') def test_function_keys(self, mocked_logger, v86_plugin): raw_config = { 'funckeys': { diff --git a/plugins/wazo-yealink/v86/var/tftpboot/directory_setting.xml b/plugins/wazo_yealink/v86/var/tftpboot/directory_setting.xml similarity index 100% rename from plugins/wazo-yealink/v86/var/tftpboot/directory_setting.xml rename to plugins/wazo_yealink/v86/var/tftpboot/directory_setting.xml diff --git a/plugins/wazo-zenitel/build.py b/plugins/wazo_zenitel/build.py similarity index 65% rename from plugins/wazo-zenitel/build.py rename to plugins/wazo_zenitel/build.py index cd11cc9e58c6051da382e1ca5bfa52129defc296..18513d33887c023b62a8530b20c938d5de925e9e 100644 --- a/plugins/wazo-zenitel/build.py +++ b/plugins/wazo_zenitel/build.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2022 The Wazo Authors (see the AUTHORS file) +# Copyright 2013-2023 The Wazo Authors (see the AUTHORS file) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,12 +15,21 @@ # Depends on the following external programs: # -rsync +from __future__ import annotations +from typing import TYPE_CHECKING, Callable from subprocess import check_call +if TYPE_CHECKING: + + def target( + target_id: str, plugin_id: str, std_dirs: bool = True + ) -> Callable[[str], None]: + """The `target` method is injected in `exec` call by the build script.""" + return lambda x: None + @target('01.11.3.2', 'wazo-zenitel-01.11.3.2') def build_01_11_3_2(path): check_call(['rsync', '-rlp', '--exclude', '.*', 'common/', path]) - - check_call(['rsync', '-rlp', '--exclude', '.*', '01.11.3.2/', path]) + check_call(['rsync', '-rlp', '--exclude', '.*', 'v01_11_3_2/', path]) diff --git a/plugins/wazo-zenitel/common/common.py b/plugins/wazo_zenitel/common/common.py similarity index 100% rename from plugins/wazo-zenitel/common/common.py rename to plugins/wazo_zenitel/common/common.py diff --git a/plugins/wazo-zenitel/common/templates/base.tpl b/plugins/wazo_zenitel/common/templates/base.tpl similarity index 100% rename from plugins/wazo-zenitel/common/templates/base.tpl rename to plugins/wazo_zenitel/common/templates/base.tpl diff --git a/plugins/wazo-zenitel/common/var/tftpboot/tftp_test.txt b/plugins/wazo_zenitel/common/var/tftpboot/tftp_test.txt similarity index 100% rename from plugins/wazo-zenitel/common/var/tftpboot/tftp_test.txt rename to plugins/wazo_zenitel/common/var/tftpboot/tftp_test.txt diff --git a/plugins/wazo-zenitel/01.11.3.2/entry.py b/plugins/wazo_zenitel/v01_11_3_2/entry.py similarity index 100% rename from plugins/wazo-zenitel/01.11.3.2/entry.py rename to plugins/wazo_zenitel/v01_11_3_2/entry.py diff --git a/plugins/wazo-zenitel/01.11.3.2/pkgs/pkgs.db b/plugins/wazo_zenitel/v01_11_3_2/pkgs/pkgs.db similarity index 100% rename from plugins/wazo-zenitel/01.11.3.2/pkgs/pkgs.db rename to plugins/wazo_zenitel/v01_11_3_2/pkgs/pkgs.db diff --git a/plugins/wazo-zenitel/01.11.3.2/plugin-info b/plugins/wazo_zenitel/v01_11_3_2/plugin-info similarity index 100% rename from plugins/wazo-zenitel/01.11.3.2/plugin-info rename to plugins/wazo_zenitel/v01_11_3_2/plugin-info diff --git a/plugins/wazo-zenitel/01.11.3.2/var/tftpboot/ipst_config.cfg b/plugins/wazo_zenitel/v01_11_3_2/var/tftpboot/ipst_config.cfg similarity index 100% rename from plugins/wazo-zenitel/01.11.3.2/var/tftpboot/ipst_config.cfg rename to plugins/wazo_zenitel/v01_11_3_2/var/tftpboot/ipst_config.cfg