def testPlug(self):
     xml = (
         '<planet name="planet-name">\n'
         '  \n'
         '  <atmosphere>\n'
         '    <component name="server"\n'
         '               type="http-server"\n'
         '               label="label"\n'
         '               worker="worker"\n'
         '               project="flumotion"\n'
         '               version="1.0.0">\n'
         '      <property name="type">slave</property>\n'
         '      <plugs>\n'
         '        <plug type="requestlogger-file">\n'
         '          <property name="logfile">foobar</property>\n'
         '        </plug>\n'
         '      </plugs>\n'
         '    </component>\n'
         '    \n'
         '  </atmosphere>\n'
         '  \n'
         '</planet>\n')
     vishnu = Vishnu('planet-name')
     vishnu.loadComponentConfigurationXML(StringIO(xml), 'foo')
     testsuite.diffStrings(XMLWriter.encoding + xml,
                           vishnu.getConfiguration())
Example #2
0
 def testPlug(self):
     xml = (
         '<planet name="planet-name">\n'
         '  \n'
         '  <atmosphere>\n'
         '    <component name="server"\n'
         '               type="http-server"\n'
         '               label="label"\n'
         '               worker="worker"\n'
         '               project="flumotion"\n'
         '               version="1.0.0">\n'
         '      <property name="type">slave</property>\n'
         '      <plugs>\n'
         '        <plug type="requestlogger-file">\n'
         '          <property name="logfile">foobar</property>\n'
         '        </plug>\n'
         '      </plugs>\n'
         '    </component>\n'
         '    \n'
         '  </atmosphere>\n'
         '  \n'
         '</planet>\n')
     vishnu = Vishnu('planet-name')
     vishnu.loadComponentConfigurationXML(StringIO(xml), 'foo')
     testsuite.diffStrings(XMLWriter.encoding + xml,
                           vishnu.getConfiguration())
Example #3
0
 def testMultiple(self):
     xml = (
         '<planet name="planet-name">\n'
         '  \n'
         '  <atmosphere>\n'
         '    <component name="bouncer"\n'
         '               type="ip-bouncer"\n'
         '               label="label"\n'
         '               worker="worker"\n'
         '               project="flumotion"\n'
         '               version="1.0.0">\n'
         '      <property name="allow">A</property>\n'
         '      <property name="allow">B</property>\n'
         '    </component>\n'
         '    \n'
         '  </atmosphere>\n'
         '  \n'
         '</planet>\n')
     vishnu = Vishnu('planet-name')
     vishnu.loadComponentConfigurationXML(StringIO(xml), 'foo')
     testsuite.diffStrings(xml, vishnu.getConfiguration())
Example #4
0
 def testMultiple(self):
     xml = ('<planet name="planet-name">\n'
            '  \n'
            '  <atmosphere>\n'
            '    <component name="bouncer"\n'
            '               type="ip-bouncer"\n'
            '               label="label"\n'
            '               worker="worker"\n'
            '               project="flumotion"\n'
            '               version="1.0.0">\n'
            '      <property name="allow">A</property>\n'
            '      <property name="allow">B</property>\n'
            '    </component>\n'
            '    \n'
            '  </atmosphere>\n'
            '  \n'
            '</planet>\n')
     vishnu = Vishnu('planet-name')
     vishnu.loadComponentConfigurationXML(StringIO(xml), 'foo')
     testsuite.diffStrings(XMLWriter.encoding + xml,
                           vishnu.getConfiguration())