[PATCH] supybot-fedora: add mirroradmins command

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

 



>From dac6dbbaef266c668e32249c9d15f766b65c00d2 Mon Sep 17 00:00:00 2001
From: Matt Domsch <Matt_Domsch@xxxxxxxx>
Date: Mon, 16 Nov 2009 23:53:04 -0600
Subject: [PATCH] add mirroradmins command

---
 plugin.py |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/plugin.py b/plugin.py
index b36a050..d40683b 100644
--- a/plugin.py
+++ b/plugin.py
@@ -373,6 +373,19 @@ class Fedora(callbacks.Plugin):
         irc.reply(string.encode('utf-8'))
     wikilink = wrap(wikilink, ['text'])
 
+    def mirroradmins(self, irc, msg, args, hostname):
+        """<hostname>
+
+        Return MirrorManager list of FAS usernames which administer <hostname>.
+        <hostname> must be the FQDN of the host."""
+        url = "https://admin.fedoraproject.org/mirrormanager/mirroradmins?tg_format=json&host="; + hostname
+        result = self._load_json(url)['values']
+        if len(result) == 0:
+            irc.reply('Hostname "%s" not found' % hostname)
+            return
+        string = 'Mirror Admins of %s: ' + ' '.join(result)
+        irc.reply(string.encode('utf-8'))
+    mirroradmins = wrap(mirroradmins)
 
 Class = Fedora
 
-- 
1.6.5.2


Once I can push a new MM that implements this interface.

-- 
Matt Domsch
Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux