From a456eb20c555d915856ab4e2a59dad4dc5bf98d1 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 16 Dec 2025 00:32:18 +0100 Subject: [PATCH] MT#63479 Remove deprecated CLI options These were for backwards compatibility to provide a smooth upgrade path, which happened long time ago. Time to remove. Change-Id: I07052ff0394f3ab33bb7141a5e387004739a5e27 --- bin/ngcp-api-admins | 18 ------------------ bin/ngcp-create-customer | 10 ---------- bin/ngcp-create-domain | 11 ----------- bin/ngcp-create-subscriber | 12 ------------ bin/ngcp-delete-domain | 10 ---------- bin/ngcp-get-customer | 9 --------- bin/ngcp-terminate-customer | 9 --------- 7 files changed, 79 deletions(-) diff --git a/bin/ngcp-api-admins b/bin/ngcp-api-admins index 3a60daf..ea7908b 100755 --- a/bin/ngcp-api-admins +++ b/bin/ngcp-api-admins @@ -15,14 +15,6 @@ my $opts = { verbose => 0, }; -# XXX: Remove after mr10.5. -sub old_option { - my ($name, $value) = @_; - my $newname = $name =~ tr/_/-/r; - $opts->{$name} = $value; - warn "$0: option --$name is deprecated; use --$newname instead\n"; -} - sub parse_option { my ($name, $value) = @_; $name =~ tr/-/_/; @@ -35,25 +27,15 @@ GetOptions($opts, 'login=s', 'password=s', 'email=s', - 'reseller_id=i' => \&old_option, 'reseller-id=i' => \&parse_option, - 'is_system=i' => \&old_option, 'is-system=i' => \&parse_option, - 'is_master=i' => \&old_option, 'is-master=i' => \&parse_option, - 'is_superuser=i' => \&old_option, 'is-superuser=i' => \&parse_option, - 'is_ccare=i' => \&old_option, 'is-ccare=i' => \&parse_option, - 'read_only=i' => \&old_option, 'read-only=i' => \&parse_option, - 'show_paswords=i' => \&old_option, 'show-paswords=i' => \&parse_option, - 'call_data=i' => \&old_option, 'call-data=i' => \&parse_option, - 'billing_data=i' => \&old_option, 'billing-data=i' => \&parse_option, - 'lawful_intercept=i' => \&old_option, 'lawful-intercept=i' => \&parse_option, 'verbose', ) or usage(); diff --git a/bin/ngcp-create-customer b/bin/ngcp-create-customer index 678029e..6b18283 100755 --- a/bin/ngcp-create-customer +++ b/bin/ngcp-create-customer @@ -17,14 +17,6 @@ my $opts = { verbose => 0, }; -# XXX: Remove after mr10.5. -sub old_option { - my ($name, $value) = @_; - my $newname = $name =~ tr/_/-/r; - $opts->{$name} = $value; - warn "$0: option --$name is deprecated; use --$newname instead\n"; -} - sub parse_option { my ($name, $value) = @_; $name =~ tr/-/_/; @@ -33,9 +25,7 @@ sub parse_option { GetOptions($opts, 'help|h' => sub { usage() }, - 'billing_profile_id=i' => \&old_option, 'billing-profile-id=i' => \&parse_option, - 'contact_id=i' => \&old_option, 'contact-id=i' => \&parse_option, 'type=s', 'verbose', diff --git a/bin/ngcp-create-domain b/bin/ngcp-create-domain index ffc00c5..fa5a02f 100755 --- a/bin/ngcp-create-domain +++ b/bin/ngcp-create-domain @@ -18,14 +18,6 @@ my $opts = { verbose => 0, }; -# XXX: Remove after mr10.5. -sub old_option { - my ($name, $value) = @_; - my $newname = $name =~ tr/_/-/r; - $opts->{$name} = $value; - warn "$0: option --$name is deprecated; use --$newname instead\n"; -} - sub parse_option { my ($name, $value) = @_; $name =~ tr/-/_/; @@ -35,11 +27,8 @@ sub parse_option { GetOptions($opts, 'help|h' => sub { usage() }, 'domain=s', - 'reseller_id=i' => \&old_option, 'reseller-id=i' => \&parse_option, - 'skip_xmpp' => \&old_option, 'skip-xmpp' => \&parse_option, - 'skip_sip' => \&old_option, 'skip-sip' => \&parse_option, 'verbose', ) or usage(); diff --git a/bin/ngcp-create-subscriber b/bin/ngcp-create-subscriber index cc51834..7930952 100755 --- a/bin/ngcp-create-subscriber +++ b/bin/ngcp-create-subscriber @@ -17,14 +17,6 @@ my $opts = { pbx_pilot => 0, }; -# XXX: Remove after mr10.5. -sub old_option { - my ($name, $value) = @_; - my $newname = $name =~ tr/_/-/r; - $opts->{$name} = $value; - warn "$0: option --$name is deprecated; use --$newname instead\n"; -} - sub parse_option { my ($name, $value) = @_; $name =~ tr/-/_/; @@ -33,7 +25,6 @@ sub parse_option { GetOptions($opts, 'help|h' => sub { usage() }, - 'customer_id=i' => \&old_option, 'customer-id=i' => \&parse_option, 'username|u=s', 'password|p=s', @@ -43,12 +34,9 @@ GetOptions($opts, 'ac|a=s', 'sn|n=s', 'aliases=s@', - 'display_name=s' => \&old_option, 'display-name=s' => \&parse_option, 'webpassword|w=s', - 'pbx_pilot' => \&old_option, 'pbx-pilot' => \&parse_option, - 'pbx_extension=s' => \&old_option, 'pbx-extension=s' => \&parse_option, 'verbose', ) or usage(); diff --git a/bin/ngcp-delete-domain b/bin/ngcp-delete-domain index c29f75f..40d409c 100755 --- a/bin/ngcp-delete-domain +++ b/bin/ngcp-delete-domain @@ -18,14 +18,6 @@ my $opts = { verbose => 0, }; -# XXX: Remove after mr10.5. -sub old_option { - my ($name, $value) = @_; - my $newname = $name =~ tr/_/-/r; - $opts->{$name} = $value; - warn "$0: option --$name is deprecated; use --$newname instead\n"; -} - sub parse_option { my ($name, $value) = @_; $name =~ tr/-/_/; @@ -35,9 +27,7 @@ sub parse_option { GetOptions($opts, 'help|h' => sub { usage() }, 'domain=s', - 'skip_xmpp' => \&old_option, 'skip-xmpp' => \&parse_option, - 'skip_sip' => \&old_option, 'skip-sip' => \&parse_option, 'verbose', ) or usage(); diff --git a/bin/ngcp-get-customer b/bin/ngcp-get-customer index b83acd2..fc0a7f6 100755 --- a/bin/ngcp-get-customer +++ b/bin/ngcp-get-customer @@ -15,14 +15,6 @@ my $opts = { verbose => 0, }; -# XXX: Remove after mr10.5. -sub old_option { - my ($name, $value) = @_; - my $newname = $name =~ tr/_/-/r; - $opts->{$name} = $value; - warn "$0: option --$name is deprecated; use --$newname instead\n"; -} - sub parse_option { my ($name, $value) = @_; $name =~ tr/-/_/; @@ -31,7 +23,6 @@ sub parse_option { GetOptions($opts, 'help|h' => sub { usage() }, - 'customer_id=i' => \&old_option, 'customer-id=i' => \&parse_option, 'verbose', ) or usage(); diff --git a/bin/ngcp-terminate-customer b/bin/ngcp-terminate-customer index e407fa3..b59768e 100755 --- a/bin/ngcp-terminate-customer +++ b/bin/ngcp-terminate-customer @@ -15,14 +15,6 @@ my $opts = { verbose => 0, }; -# XXX: Remove after mr10.5. -sub old_option { - my ($name, $value) = @_; - my $newname = $name =~ tr/_/-/r; - $opts->{$name} = $value; - warn "$0: option --$name is deprecated; use --$newname instead\n"; -} - sub parse_option { my ($name, $value) = @_; $name =~ tr/-/_/; @@ -31,7 +23,6 @@ sub parse_option { GetOptions($opts, 'help|h' => sub { usage() }, - 'customer_id=i' => \&old_option, 'customer-id=i' => \&parse_option, 'verbose', ) or usage();