FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Infrastructure

 
 
LinkBack Thread Tools
 
Old 11-17-2009, 04:54 AM
Matt Domsch
 
Default supybot-fedora: add mirroradmins command

>From dac6dbbaef266c668e32249c9d15f766b65c00d2 Mon Sep 17 00:00:00 2001
From: Matt Domsch <Matt_Domsch@dell.com>
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@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 
Old 11-17-2009, 05:00 AM
Matt Domsch
 
Default supybot-fedora: add mirroradmins command

And with a fix already. I should sleep.

>From 1d136e850fb9287dcca9812eb3960d2f8bf71211 Mon Sep 17 00:00:00 2001
From: Matt Domsch <Matt_Domsch@dell.com>
Date: Mon, 16 Nov 2009 23:59:20 -0600
Subject: [PATCH] fix mirroradmins command

---
plugin.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugin.py b/plugin.py
index d40683b..5845afd 100644
--- a/plugin.py
+++ b/plugin.py
@@ -383,7 +383,8 @@ class Fedora(callbacks.Plugin):
if len(result) == 0:
irc.reply('Hostname "%s" not found' % hostname)
return
- string = 'Mirror Admins of %s: ' + ' '.join(result)
+ string = 'Mirror Admins of %s: ' % hostname
+ string += ' '.join(result)
irc.reply(string.encode('utf-8'))
mirroradmins = wrap(mirroradmins)

--
1.6.5.2

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

Thread Tools




All times are GMT. The time now is 10:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org