Blame SOURCES/0000-Add-NWFilterBinding.pm-module-missed-in-dist.patch

818253
From d5ae3d1db19b52676489c2312efd21ab5e86aee4 Mon Sep 17 00:00:00 2001
818253
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
818253
Date: Tue, 14 Aug 2018 11:46:08 +0100
818253
Subject: [PATCH] Add NWFilterBinding.pm module missed in dist
818253
818253
---
818253
 lib/Sys/Virt/NWFilterBinding.pm | 107 ++++++++++++++++++++++++++++++++
818253
 1 file changed, 107 insertions(+)
818253
 create mode 100644 lib/Sys/Virt/NWFilterBinding.pm
818253
818253
diff --git a/lib/Sys/Virt/NWFilterBinding.pm b/lib/Sys/Virt/NWFilterBinding.pm
818253
new file mode 100644
818253
index 0000000..2c56b3f
818253
--- /dev/null
818253
+++ b/lib/Sys/Virt/NWFilterBinding.pm
818253
@@ -0,0 +1,107 @@
818253
+# -*- perl -*-
818253
+#
818253
+# Copyright (C) 2018 Red Hat
818253
+#
818253
+# This program is free software; You can redistribute it and/or modify
818253
+# it under either:
818253
+#
818253
+# a) the GNU General Public License as published by the Free
818253
+#   Software Foundation; either version 2, or (at your option) any
818253
+#   later version,
818253
+#
818253
+# or
818253
+#
818253
+# b) the "Artistic License"
818253
+#
818253
+# The file "LICENSE" distributed along with this file provides full
818253
+# details of the terms and conditions of the two licenses.
818253
+
818253
+=pod
818253
+
818253
+=head1 NAME
818253
+
818253
+Sys::Virt::NWFilterBinding - Represent & manage a network filter binding
818253
+
818253
+=head1 DESCRIPTION
818253
+
818253
+The C<Sys::Virt::NWFilterBinding> module represents a binding between a
818253
+network filter and a network port device.
818253
+
818253
+=head1 METHODS
818253
+
818253
+=over 4
818253
+
818253
+=cut
818253
+
818253
+package Sys::Virt::NWFilterBinding;
818253
+
818253
+use strict;
818253
+use warnings;
818253
+
818253
+
818253
+sub _new {
818253
+    my $proto = shift;
818253
+    my $class = ref($proto) || $proto;
818253
+    my %params = @_;
818253
+
818253
+    my $con = exists $params{connection} ? $params{connection} : die "connection parameter is required";
818253
+    my $self;
818253
+    if (exists $params{portdev}) {
818253
+	$self = Sys::Virt::NWFilterBinding::_lookup_by_port_dev($con,  $params{portdev});
818253
+    } elsif (exists $params{xml}) {
818253
+	$self = Sys::Virt::NWFilterBinding::_create_xml($con,  $params{xml});
818253
+    } else {
818253
+	die "portdev or xml parameters are required";
818253
+    }
818253
+
818253
+    bless $self, $class;
818253
+
818253
+    return $self;
818253
+}
818253
+
818253
+
818253
+=item my $name = $binding->get_port_dev()
818253
+
818253
+Returns a string with the name of the network port device that is bound to
818253
+
818253
+=item my $name = $binding->get_filter_name()
818253
+
818253
+Returns a string with the name of the network filter that is bound to
818253
+
818253
+=item my $xml = $binding->get_xml_description()
818253
+
818253
+Returns an XML document containing a complete description of
818253
+the network's configuration
818253
+
818253
+=item $binding->delete()
818253
+
818253
+Unbind the network port device from the filter
818253
+
818253
+=cut
818253
+
818253
+
818253
+1;
818253
+
818253
+=back
818253
+
818253
+=head1 AUTHORS
818253
+
818253
+Daniel P. Berrange <berrange@redhat.com>
818253
+
818253
+=head1 COPYRIGHT
818253
+
818253
+Copyright (C) 2018 Red Hat
818253
+
818253
+=head1 LICENSE
818253
+
818253
+This program is free software; you can redistribute it and/or modify
818253
+it under the terms of either the GNU General Public License as published
818253
+by the Free Software Foundation (either version 2 of the License, or at
818253
+your option any later version), or, the Artistic License, as specified
818253
+in the Perl README file.
818253
+
818253
+=head1 SEE ALSO
818253
+
818253
+L<Sys::Virt>, L<Sys::Virt::Error>, C<http://libvirt.org>
818253
+
818253
+=cut
818253
-- 
818253
2.17.1
818253