summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-10-29 15:34:41 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-10-31 08:13:56 +1100
commita732f2a621665923322422c5a3d788c9d1aa8df9 (patch)
tree5541f22588fd136ce1a19095e997a50147916525 /source4/scripting
parent76b7348299870279acec5b7c9f02f4e4b2461703 (diff)
downloadsamba-a732f2a621665923322422c5a3d788c9d1aa8df9.tar.gz
samba-a732f2a621665923322422c5a3d788c9d1aa8df9.tar.bz2
samba-a732f2a621665923322422c5a3d788c9d1aa8df9.zip
pymessaging: Add irpc_servers_byname() and irpc_all_servers()
This will allow python scripts to inspect the process list. Andrew Bartlett
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/tests/messaging.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/tests/messaging.py b/source4/scripting/python/samba/tests/messaging.py
index 3348ff8deb..f0cd368195 100644
--- a/source4/scripting/python/samba/tests/messaging.py
+++ b/source4/scripting/python/samba/tests/messaging.py
@@ -35,6 +35,15 @@ class MessagingTests(TestCase):
msg_type = x.register(callback)
x.deregister(callback, msg_type)
+ def test_all_servers(self):
+ x = self.get_context()
+ self.assertTrue(isinstance(x.irpc_all_servers(), list))
+
+ def test_by_name(self):
+ x = self.get_context()
+ for name in x.irpc_all_servers():
+ self.assertTrue(isinstance(x.irpc_servers_byname(name.name), list))
+
def test_assign_server_id(self):
x = self.get_context()
self.assertTrue(isinstance(x.server_id, server_id))