Exemplo n.º 1
0
 def setUp(self):
     self.agent = lib_ra.Agent(
         mock.MagicMock(spec_set=CommandRunner)
     )
     self.metadata = etree.XML("""
         <resource-agent>
             <parameters>
                 <parameter name="test_param" required="0">
                     <longdesc>Long description</longdesc>
                     <shortdesc>short description</shortdesc>
                     <content type="string" default="default_value" />
                 </parameter>
                 <parameter name="required_param" required="1">
                     <content type="boolean" />
                 </parameter>
                 <parameter name="another_required_param" required="1">
                     <content type="string" />
                 </parameter>
             </parameters>
         </resource-agent>
     """)
Exemplo n.º 2
0
 def setUp(self):
     self.agent = lib_ra.Agent(
         mock.MagicMock(spec_set=CommandRunner)
     )
     self.metadata = etree.XML("""
         <resource-agent>
             <shortdesc>short description</shortdesc>
             <longdesc>long description</longdesc>
             <parameters>
                 <parameter name="test_param" required="1">
                     <longdesc>
                         Long description
                     </longdesc>
                     <shortdesc>short description</shortdesc>
                     <content type="test_type" default="default_value" />
                 </parameter>
                 <parameter name="another parameter"/>
             </parameters>
             <actions>
                 <action name="on" automatic="0"/>
                 <action name="off" />
             </actions>
         </resource-agent>
     """)
Exemplo n.º 3
0
 def setUp(self):
     self.agent = lib_ra.Agent(
         mock.MagicMock(spec_set=CommandRunner)
     )