Skip to content

Commit

Permalink
Leave an empty line between pod and code to all the files under lib
Browse files Browse the repository at this point in the history
Following the recommendation all the perl POD documentation should have a
empty line before the beginning of the code as a good practice. In this PR all
the files which found under lib directory and its subdirectories are adding a
new line from all the cases which matched `=cut\nsub`

Signed-off-by: Ioannis Bonatakis <ybonatakis@suse.com>
  • Loading branch information
b10n1k committed Jun 27, 2022
1 parent eb9f318 commit 17b8842
Show file tree
Hide file tree
Showing 79 changed files with 654 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Distribution/Opensuse/Leap/15.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Returns controller for license agreement which differs from SLE due to
openSUSE use a different UI flow to accept the default license.
=cut

sub get_firstboot_license_agreement {
return Installation::License::Opensuse::Firstboot::LicenseAgreementController->new();
}
Expand Down
1 change: 1 addition & 0 deletions lib/DistributionProvider.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Returns the certain distribution depending on the version of the product.
If there is no matched version, then returns Tumbleweed as the default one.
=cut

sub provide {
return Distribution::Sle::15_current->new() if is_sle('>=15-sp3');
return Distribution::Sle::15sp2->new() if is_sle('>15');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ see C<_add_partition>.
$args->{raid_level} defines wanted raid level.
=cut

sub add_raid();

=head2 accept_changes_and_press_next
Expand All @@ -31,6 +32,7 @@ sub add_raid();
Accept partitioning setup and proceed to the next page.
=cut

sub accept_changes_and_press_next();

=head2 run_expert_partitioner
Expand All @@ -40,6 +42,7 @@ sub accept_changes_and_press_next();
Open Expert Partitioner with existing partitions.
=cut

sub run_expert_partitioner();

=head2 add_partition_on_gpt_disk
Expand All @@ -52,6 +55,7 @@ $args->{partition}`contains hash reference with parameters for the partition,
see C<_add_partition>.
=cut

sub add_partition_on_gpt_disk();

=head2 _finish_partition_creation
Expand All @@ -62,6 +66,7 @@ Method finished partitioning, has different implementation in libstorage and
libstorage-ng
=cut

sub _finish_partition_creation();

sub _set_partition_size {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Expected values are [existing|current].
if none is given the existing partiotion is used as deault.
=cut

sub run_expert_partitioner {
my ($self, $option) = @_;
$option //= 'existing';
Expand Down
1 change: 1 addition & 0 deletions lib/Mitigation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ To reboot and waiting system back and login it.
This could support IPMI and QEMU backend.
C<$timeout> in seconds.
=cut

sub reboot_and_wait {
my ($self, $timeout) = @_;
if (is_ipmi) {
Expand Down
1 change: 1 addition & 0 deletions lib/Remote/Lab.pm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Setup tunnel(s) over SSH based on an openSSH configuration configuring a
"jumpbox" including forwarding a port for remote log uploading.
=cut

sub setup_ssh_tunnels {
my ($self) = @_;
return if get_var('_SSH_TUNNELS_INITIALIZED');
Expand Down
11 changes: 11 additions & 0 deletions lib/Utils/Architectures.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ our %EXPORT_TAGS = (
Returns C<check_var('ARCH', 's390x')>.
=cut

sub is_s390x {
return check_var('ARCH', 's390x');
}
Expand All @@ -59,6 +60,7 @@ sub is_s390x {
Returns C<check_var('ARCH', 'is_i586')>.
=cut

sub is_i586 {
return check_var('ARCH', 'i586');
}
Expand All @@ -70,6 +72,7 @@ sub is_i586 {
Returns C<check_var('ARCH', 'is_i686')>.
=cut

sub is_i686 {
return check_var('ARCH', 'i686');
}
Expand All @@ -81,6 +84,7 @@ sub is_i686 {
Returns C<check_var('ARCH', 'x86_64')>.
=cut

sub is_x86_64 {
return check_var('ARCH', 'x86_64');
}
Expand All @@ -92,6 +96,7 @@ sub is_x86_64 {
Returns C<check_var('ARCH', 'is_x86_64_v2')>.
=cut

sub is_x86_64_v2 {
return 0 unless is_x86_64;
my $cpu_flags = script_output('lscpu | grep -i flags');
Expand All @@ -108,6 +113,7 @@ sub is_x86_64_v2 {
Returns C<check_var('ARCH', 'aarch64')>.
=cut

sub is_aarch64 {
return check_var('ARCH', 'aarch64');
}
Expand All @@ -119,6 +125,7 @@ sub is_aarch64 {
Returns C<get_var('ARCH') =~ /arm/>.
=cut

sub is_arm {
return (get_var('ARCH') =~ /arm/); # Can match arm, armv7, armv7l, armv7hl, ...
}
Expand All @@ -130,6 +137,7 @@ sub is_arm {
Returns C<check_var('ARCH', 'ppc64le')>.
=cut

sub is_ppc64le {
return check_var('ARCH', 'ppc64le');
}
Expand All @@ -141,6 +149,7 @@ sub is_ppc64le {
Returns C<check_var('ARCH', 'ppc64')>.
=cut

sub is_ppc64 {
return check_var('ARCH', 'ppc64');
}
Expand All @@ -152,6 +161,7 @@ sub is_ppc64 {
Returns C<true if machine FQDN has arch.suse.de suffix>.
=cut

sub is_orthos_machine {
my $sut_fqdn = get_var('SUT_IP', 'nosutip');
return 1 if $sut_fqdn =~ /(arch\.suse\.de)/im;
Expand All @@ -165,6 +175,7 @@ sub is_orthos_machine {
Returns C<true if machine FQDN has qa.suse.de, qa2.suse.asia or arch.suse.de suffix>.
=cut

sub is_supported_suse_domain {
my $sut_fqdn = get_var('SUT_IP', 'nosutip');
return 1 if $sut_fqdn =~ /(arch\.suse\.de|qa2\.suse\.asia|qa\.suse\.de)/im;
Expand Down
1 change: 1 addition & 0 deletions lib/Utils/Firewalld.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Adds tcp C<$port> to C<$zone> of permanent configuration. Port can be a single p
number or a range of ports e.g. 3000-5000
=cut

sub add_port_to_zone {
my ($args) = @_;
assert_script_run("firewall-cmd --zone=$args->{zone} --add-port=$args->{port}/tcp --permanent");
Expand Down
4 changes: 4 additions & 0 deletions lib/Utils/Systemd.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Mask it if I<$mask_service> evaluates to true. Default: false
Raise a failure if I<$ignore_failure> evaluates to true. Default: false
=cut

sub disable_and_stop_service {
my ($service_name, %args) = @_;
die "disable_and_stop_service(): no service name given" if ($service_name =~ /^ *$/);
Expand All @@ -53,6 +54,7 @@ Wrapper around systemctl call to be able to add some useful options.
Please note that return code of this function is handle by 'script_run' or
'assert_script_run' function, and as such, can be different.
=cut

sub systemctl {
my ($command, %args) = @_;
croak "systemctl(): no command specified" if ($command =~ /^ *$/);
Expand All @@ -74,6 +76,7 @@ sub systemctl {
Return list of started systemd services
=cut

sub get_started_systemd_services {
return keys(%started_systemd_services);
}
Expand All @@ -83,6 +86,7 @@ sub get_started_systemd_services {
Clear the list of started systemd services
=cut

sub clear_started_systemd_services {
%started_systemd_services = ();
}
Expand Down
5 changes: 5 additions & 0 deletions lib/YaST/NetworkSettings/AbstractNetworkSettingsController.pm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ The function just adds the device, but does not save the changes by closing
Network Settings Dialog.
=cut

sub add_bridged_device();

=head2 add_bond_slave
Expand All @@ -72,6 +73,7 @@ The function just adds the device, but does not save the changes by closing
Network Settings Dialog.
=cut

sub add_bond_slave();

=head2 add_vlan_device
Expand All @@ -84,6 +86,7 @@ The function just adds the device, but does not save the changes by closing
Network Settings Dialog.
=cut

sub add_vlan_device();

=head2 view_bridged_device_without_editing
Expand All @@ -94,6 +97,7 @@ Open already created Bridged Device for editing, view its settings, do not
change any settings and close the Edit Dialog.
=cut

sub view_bridged_device_without_editing();

=head2 view_bond_slave_without_editing
Expand All @@ -104,6 +108,7 @@ Open already created Bond Slave Device for editing, view its settings, do not
change any settings and close the Edit Dialog.
=cut

sub view_bond_slave_without_editing();

sub delete_bridged_device {
Expand Down
5 changes: 5 additions & 0 deletions lib/apachetest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Possible values for C<$mode> are: SSL, NSS, NSSFIPS, PHP7 and PHP8
setup_apache2(mode => 'SSL');
=cut

sub setup_apache2 {
my %args = @_;
my $mode = uc $args{mode} || "";
Expand Down Expand Up @@ -163,6 +164,7 @@ sub setup_apache2 {
Set up a postgres data base
=cut

sub setup_pgsqldb {
# without changing current working directory we get:
# 'could not change directory to "/root": Permission denied'
Expand All @@ -183,6 +185,7 @@ sub setup_pgsqldb {
Destroy a postgres data base
=cut

sub destroy_pgsqldb {
assert_script_run 'pushd /tmp';

Expand Down Expand Up @@ -221,6 +224,7 @@ Set up a postgres database and configure for:
=back
=cut

sub test_pgsql {
# configuration so that PHP can access PostgreSQL
# setup password
Expand Down Expand Up @@ -365,6 +369,7 @@ EOF
Create the 'openQAdb' database with table 'test' and insert one element
=cut

sub test_mysql {
# create the 'openQAdb' database with table 'test' and insert one element 'can php read this?'
my $setup_openQAdb = "CREATE DATABASE openQAdb; USE openQAdb; " .
Expand Down
9 changes: 9 additions & 0 deletions lib/apparmortest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ sub aa_tmp_prof_prepare {
Verify that program can start with temporary profiles and then restore to the enforce status with normal profiles
=cut

sub aa_tmp_prof_verify {
my ($self, $prof_dir_tmp, $prog) = @_;

Expand All @@ -127,6 +128,7 @@ sub aa_tmp_prof_verify {
Remove appamor temporary profiles
=cut

sub aa_tmp_prof_clean {
my ($self, $prof_dir_tmp) = @_;

Expand All @@ -142,6 +144,7 @@ sub aa_tmp_prof_clean {
Get the named profile for an executable program
=cut

sub get_named_profile {
my ($self, $profile_name) = @_;

Expand All @@ -158,6 +161,7 @@ sub get_named_profile {
Check the output of aa-status: if a given profile belongs to a given mode
=cut

sub aa_status_stdout_check {
my ($self, $profile_name, $profile_mode) = @_;

Expand All @@ -175,6 +179,7 @@ sub aa_status_stdout_check {
Fetch ip details
=cut

sub ip_fetch {
# "# hostname -i/-I" can not work in some cases
my $ip = script_output("ip -4 -f inet -o a | grep -E \'eth0|ens\' | sed -n 's/\.*inet \\([0-9.]\\+\\)\.*/\\1/p'");
Expand Down Expand Up @@ -204,6 +209,7 @@ Set up mail server with Postfix and Dovecot:
=back
=cut

sub setup_mail_server_postfix_dovecot {
my ($self) = @_;
my $ip = "";
Expand Down Expand Up @@ -754,6 +760,7 @@ sub create_log_content_is_special {
Upload mail warn, err and info logs for reference
=cut

sub upload_logs_mail {
# Upload mail warn, err and info logs for reference
if (script_run("! [[ -e $mail_err_log ]]")) {
Expand All @@ -774,6 +781,7 @@ sub upload_logs_mail {
Restart auditd and apparmor in root-console
=cut

sub pre_run_hook {
my ($self) = @_;

Expand All @@ -790,6 +798,7 @@ sub pre_run_hook {
Run post_fail_hook and upload audit logs
=cut

sub post_fail_hook {
my ($self) = shift;

Expand Down

0 comments on commit 17b8842

Please sign in to comment.