#
# Copyright (C) 2006, rPath, Inc.
# All rights reserved.
#

from raa.modules.raasrvplugin import rAASrvPlugin
import os


class InboundMirror(rAASrvPlugin):
    MIRROR_INBOUND_CMD = 'sudo -u apache bash -c "/usr/share/rbuilder/scripts/mirror-inbound http://mintauth:mintpass@localhost/xmlrpc-private/ 2>> /srv/rbuilder/logs/mirror-inbound.log"'

    def doTask(self, schedId, execId):
        os.system(self.MIRROR_INBOUND_CMD)

@@ -55,16 +55,52 @@
 ved.%0A#%0A%0A
+import os%0A%0Afrom mint import config%0A%0A
 from raa
@@ -141,27 +141,16 @@
 vPlugin%0A
-import os%0A%0A
 %0Aclass I
@@ -177,16 +177,195 @@
 lugin):%0A
+%0A    def doTask(self, schedId, execId):%0A        mc = config.MintConfig()%0A        mc.read(config.RBUILDER_CONFIG)%0A        mintauth = mc.authUser%0A        mintpass = mc.authPass%0A    
     MIRR
@@ -460,24 +460,12 @@
 p://
-mintauth:mintpas
+%25s:%25
 s@lo
@@ -535,48 +535,31 @@
 og%22'
-%0A%0A    def doTask(self, schedId, execId):
+ %25 (mintauth, mintpass)
 %0A   
@@ -577,13 +577,8 @@
 tem(
-self.
 MIRR
@@ -593,8 +593,9 @@
 ND_CMD)%0A
+%0A

use cfg.authUser instead of mintauth