Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YaPI::Samba: Drop unused GetServiceStatus() method. #69

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions src/modules/YaPI/Samba.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ $serverRole = DetermineRole()
returns a string representing the currently configure role or
undef on failure.

$enabled = GetServiceStatus()

returns true if the services smbd and nmbd are enabled, false if either of
them is disabled or undef on failure.

$enabled = EditService($enable)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it use previous $enable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe mark in doc that the YAPI is deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it use previous $enable

And also in other methods.

Probably we should, but what to do with old testsuite? Drop them completely or adapt them

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, then in this example use e.g. true here.

I am not sure about old testsuite. Can we keep it without big investments? if so, then I would keep it, otherwise I think it is fine to drop it.


enabled/disables the smbd and nmbd services. returns the status of the
Expand Down Expand Up @@ -150,23 +145,6 @@ use strict;
# API start
#######################################################

=item *
C<$hostList = GetServiceStatus ();>

Returns the current status of smb and nmb services. True means
the services are both started in at least on runlevel.
On error, undef is returned and the Error() function can be used
to get the error hash.

=cut

BEGIN { $TYPEINFO{GetServiceStatus} = ["function", "string" ]; }
sub GetServiceStatus {
my $self = shift;
SambaService->Read();
return SambaService->GetServiceAutoStart();
}

=item *
C<$serverRole = DetermineRole();>

Expand Down
70 changes: 0 additions & 70 deletions testsuite/YaPI/tests/YaPI-GetServiceStatus.rb

This file was deleted.