]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
vici: Update get_pools() in Python and Ruby bindings
authorTobias Brunner <tobias@strongswan.org>
Thu, 8 Dec 2016 17:14:40 +0000 (18:14 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 16 Feb 2017 18:21:12 +0000 (19:21 +0100)
src/libcharon/plugins/vici/python/vici/session.py
src/libcharon/plugins/vici/ruby/lib/vici.rb

index 5bd4b7c40bf2f7340591a1a3918c85fd47176773..1383fa778365a215b615b9d6fab37188bf1ea20f 100644 (file)
@@ -208,13 +208,15 @@ class Session(object):
         """
         self.handler.request("unload-pool", pool_name)
 
-    def get_pools(self):
+    def get_pools(self, options):
         """Retrieve loaded pools.
 
+        :param options: filter by name and/or retrieve leases (optional)
+        :type options: dict
         :return: loaded pools
         :rtype: dict
         """
-        return self.handler.request("get-pools")
+        return self.handler.request("get-pools", options)
 
     def listen(self, event_types):
         """Register and listen for the given events.
index 1a95fc3dd3630fb4fde571b370df5241f4d4331a..bcf1a17be7255311235b83838a17909c7f429643 100644 (file)
@@ -492,8 +492,8 @@ module Vici
 
     ##
     # Get the currently loaded pools.
-    def get_pools()
-      @transp.request("get-pools").root
+    def get_pools(options)
+      @transp.request("get-pools", Message.new(options)).root
     end
 
     ##