summaryrefslogtreecommitdiffstats
path: root/lib/network/connection.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/network/connection.pm')
-rw-r--r--lib/network/connection.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index b942881..6415282 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -80,6 +80,13 @@ sub get_description {
$description;
}
+sub get_label {
+ my ($self) = @_;
+ my $intf = $self->get_interface;
+ my $descr = $self->get_description;
+ $intf ? sprintf("%s (%s)", $descr, $intf) : $descr;
+}
+
sub get_driver {
my ($self) = @_;
$self->{device}{driver};