From a9afbc4164d31883674f593080ebaf3a88b3f745 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 10 Sep 2021 18:24:33 +0200 Subject: [PATCH] TT#141100 lib: Remove deprecated functions and methods These have been around for enough time to leave admins room to switch to the new alternatives. Time for cleanup. Change-Id: I40a51c8107daf53a6d7fd24b5035bbc2aff77bb6 --- debian/ngcp-ngcpcfg.install | 1 - lib/NGCP/Template/Object.pm | 13 ------------- lib/get_debian_release | 13 ------------- lib/get_firstname | 11 ----------- lib/get_hostname | 10 ---------- lib/get_mgmt_name | 8 -------- lib/get_ngcp_type | 11 ----------- lib/get_nodename | 10 ---------- lib/get_peername | 11 ----------- lib/has_role | 13 ------------- 10 files changed, 101 deletions(-) delete mode 100644 lib/get_debian_release delete mode 100644 lib/get_firstname delete mode 100644 lib/get_hostname delete mode 100644 lib/get_mgmt_name delete mode 100644 lib/get_ngcp_type delete mode 100644 lib/get_nodename delete mode 100644 lib/get_peername delete mode 100644 lib/has_role diff --git a/debian/ngcp-ngcpcfg.install b/debian/ngcp-ngcpcfg.install index 46878a34..36f9d8d7 100644 --- a/debian/ngcp-ngcpcfg.install +++ b/debian/ngcp-ngcpcfg.install @@ -11,7 +11,6 @@ helper/tt2-process usr/share/ngcp-ngcpcfg/helper/ helper/validate-yml usr/share/ngcp-ngcpcfg/helper/ hooks/ usr/share/ngcp-ngcpcfg/ lib/get_* usr/lib/ngcp-ngcpcfg/ -lib/has_* usr/lib/ngcp-ngcpcfg/ lib/set_* usr/lib/ngcp-ngcpcfg/ sbin/ngcp-network usr/sbin/ sbin/ngcp-network-validator usr/sbin/ diff --git a/lib/NGCP/Template/Object.pm b/lib/NGCP/Template/Object.pm index c58cf2b1..4c794064 100644 --- a/lib/NGCP/Template/Object.pm +++ b/lib/NGCP/Template/Object.pm @@ -146,14 +146,6 @@ sub get_mgmt_node return; } -sub get_mgmt_name -{ - my ($self) = shift; - - warnings::warnif('deprecated', 'deprecated alias for get_mgmt_node()'); - return $self->get_mgmt_node(); -} - sub get_ssh_pub_key { my ($self, $key_type) = @_; @@ -244,11 +236,6 @@ $hostname. Returns the NGCP management node shared name. -=item $mgmtname = $t->get_mgmt_name() - -This function is a deprecated alias for $t->get_mgmt_node(). It will be -removed in the future. - =item $ssh_pub_keye = $t->get_ssh_pub_key($key_type) Returns the SSH public key with $key_type ('rsa', 'ed25519', etc.) from diff --git a/lib/get_debian_release b/lib/get_debian_release deleted file mode 100644 index 47a0ad6a..00000000 --- a/lib/get_debian_release +++ /dev/null @@ -1,13 +0,0 @@ -[% -# vi: ft=tt2 - -# Returns the Debian release codename of the node calling this function. -# -# @return out The Debian release codename of the node calling this function. - -# XXX: This is a deprecated alias for set_debian_info. - -PROCESS '/usr/lib/ngcp-ngcpcfg/set_debian_info'; -out = debian.codename; - --%] diff --git a/lib/get_firstname b/lib/get_firstname deleted file mode 100644 index 8c4bc57c..00000000 --- a/lib/get_firstname +++ /dev/null @@ -1,11 +0,0 @@ -[% -# vi: ft=tt2 - -# Returns the (alphabetically) first ngcp_hostname of a node pair for a given host. -# -# @param argv.host The ngcp_hostname to get the first name for. -# @return out The alphabetically first name. - -out = ngcp.get_firstname(argv.host); - --%] diff --git a/lib/get_hostname b/lib/get_hostname deleted file mode 100644 index 1ce602b6..00000000 --- a/lib/get_hostname +++ /dev/null @@ -1,10 +0,0 @@ -[% -# vi: ft=tt2 - -# Returns the hostname of the node calling this function. -# -# @return out The hostname of the node calling this function. - -out = ngcp.get_hostname(); - --%] diff --git a/lib/get_mgmt_name b/lib/get_mgmt_name deleted file mode 100644 index fde3a860..00000000 --- a/lib/get_mgmt_name +++ /dev/null @@ -1,8 +0,0 @@ -[% -# vi: ft=tt2 - -# This is a deprecated alias for get_mgmt_node. - -out = ngcp.get_mgmt_name(); - --%] diff --git a/lib/get_ngcp_type b/lib/get_ngcp_type deleted file mode 100644 index 0fa52217..00000000 --- a/lib/get_ngcp_type +++ /dev/null @@ -1,11 +0,0 @@ -[% -# vi: ft=tt2 - -# Returns the NGCP type of the node calling this function. -# -# @return out The NGCP type, one of: -# spce, sppro, carrier - -out = general.ngcp_type - --%] diff --git a/lib/get_nodename b/lib/get_nodename deleted file mode 100644 index 74579f9b..00000000 --- a/lib/get_nodename +++ /dev/null @@ -1,10 +0,0 @@ -[% -# vi: ft=tt2 - -# Returns the nodename of the node calling this function. -# -# @return out The nodename of the node calling this function. - -out = ngcp.get_nodename(); - --%] diff --git a/lib/get_peername b/lib/get_peername deleted file mode 100644 index d7c3b497..00000000 --- a/lib/get_peername +++ /dev/null @@ -1,11 +0,0 @@ -[% -# vi: ft=tt2 - -# Returns the peer name of a given host. -# -# @param argv.host The hostname to get the peername for. -# @return out The peername. - -out = ngcp.get_peername(argv.host); - --%] diff --git a/lib/has_role b/lib/has_role deleted file mode 100644 index 8da224b5..00000000 --- a/lib/has_role +++ /dev/null @@ -1,13 +0,0 @@ -[% -# vi: ft=tt2 - -# Checks whether a given host has a given role. -# -# @param argv.host The hostname to check the role for. -# @param argv.role The role of the node to process, one of: -# proxy, lb, mgmt -# @return out 0 if false, 1 if true. - -out = ngcp.has_role(argv.host, argv.role); - --%]