From 99a92aab9540eb21428a00a9b7e247060c2d5aee Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Wed, 24 Jun 2026 17:58:43 +0200 Subject: [PATCH] MT#65377 fix ngcp-provisioning-template Catalyst stub missing license methods The CLI mock context lacked $c->license() and related helpers used by Subscriber.pm during provisioning, causing "Can't locate object method license" when processing PBX templates. Change-Id: I7485a425effb2d1d26e676191aff75ddd2d802d3 --- tools_bin/ngcp-provisioning-template | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tools_bin/ngcp-provisioning-template b/tools_bin/ngcp-provisioning-template index 158beccc09..93beb096a2 100755 --- a/tools_bin/ngcp-provisioning-template +++ b/tools_bin/ngcp-provisioning-template @@ -17,6 +17,7 @@ use NGCP::Schema qw(); #use lib "/home/rkrenn/sipwise/git/ngcp-panel/lib"; #use lib "/usr/local/devel/ngcp-panel/lib"; use NGCP::Panel::Utils::ProvisioningTemplates qw(); +use NGCP::Panel::Utils::License qw(); my @panel_configs = qw( /etc/ngcp-panel/ngcp_panel.conf @@ -277,6 +278,42 @@ sub _create_c { }, request => $req, req => $req, + license => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_license($self, @_); + }, + licenses => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_licenses($self, @_); + }, + license_meta => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_license_meta($self, @_); + }, + license_max_pbx_groups => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_max_pbx_groups($self, @_); + }, + license_max_pbx_subscribers => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_max_pbx_subscribers($self, @_); + }, + license_max_subscribers => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_max_subscribers($self, @_); + }, + license_current_pbx_groups => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_current_pbx_groups($self, @_); + }, + license_current_pbx_subscribers => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_current_pbx_subscribers($self, @_); + }, + license_current_subscribers => sub { + my $self = shift; + return NGCP::Panel::Utils::License::get_current_subscribers($self, @_); + }, );