[PATCH perl 1/2] Add missing define_nwfilter and define_secret APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 Changes         |  2 +-
 lib/Sys/Virt.pm | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/Changes b/Changes
index f560864..d2d9a94 100644
--- a/Changes
+++ b/Changes
@@ -2,7 +2,7 @@ Revision history for perl module Sys::Virt
 
 4.2.0 2018-00-00
 
- - XXX
+ - Add missing define_nwfilter and define_secret APIs in Sys::Virt
 
 4.1.0 2018-03-05
 
diff --git a/lib/Sys/Virt.pm b/lib/Sys/Virt.pm
index 035cdb6..f93d122 100644
--- a/lib/Sys/Virt.pm
+++ b/lib/Sys/Virt.pm
@@ -315,6 +315,38 @@ sub define_network {
     return Sys::Virt::Network->_new(connection => $self, xml => $xml, nocreate => 1);
 }
 
+=item my $dom = $vmm->define_nwfilter($xml);
+
+Defines a new network filter based on the XML description
+passed into the C<$xml> parameter. The returned object is an instance
+of the L<Sys::Virt::NWFilter> class. This method is not available with
+unprivileged connections to the VMM.
+
+=cut
+
+sub define_nwfilter {
+    my $self = shift;
+    my $xml = shift;
+
+    return Sys::Virt::NWFilter->_new(connection => $self, xml => $xml, nocreate => 1);
+}
+
+=item my $dom = $vmm->define_secret($xml);
+
+Defines a new secret based on the XML description
+passed into the C<$xml> parameter. The returned object is an instance
+of the L<Sys::Virt::Secret> class. This method is not available with
+unprivileged connections to the VMM.
+
+=cut
+
+sub define_secret {
+    my $self = shift;
+    my $xml = shift;
+
+    return Sys::Virt::Secret->_new(connection => $self, xml => $xml, nocreate => 1);
+}
+
 =item my $dom = $vmm->create_storage_pool($xml);
 
 Create a new storage pool based on the XML description passed into the C<$xml>
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux