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

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