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

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