def setup(self):

        # Empty

        self.xml.append(cim_xml.PARAMETER_REFERENCE('arg'))

        # QUALIFIER + attributes

        self.xml.append(
            cim_xml.PARAMETER_REFERENCE('arg',
                                        reference_class='CIM_Foo',
                                        qualifiers=[
                                            cim_xml.QUALIFIER(
                                                'IMPISH', 'string',
                                                cim_xml.VALUE('true'))
                                        ]))
Esempio n. 2
0
    def setUp(self):
        super(Method, self).setUp()

        # Empty

        self.xml.append(cim_xml.METHOD('FooMethod'))

        # PARAMETER

        self.xml.append(
            cim_xml.METHOD('FooMethod', [cim_xml.PARAMETER('arg', 'string')]))

        # PARAMETER.REFERENCE

        self.xml.append(
            cim_xml.METHOD('FooMethod',
                           [cim_xml.PARAMETER_REFERENCE('arg', 'CIM_Foo')]))

        # PARAMETER.ARRAY

        self.xml.append(
            cim_xml.METHOD('FooMethod',
                           [cim_xml.PARAMETER_ARRAY('arg', 'string')]))

        # PARAMETER.REFARRAY

        self.xml.append(
            cim_xml.METHOD('FooMethod',
                           [cim_xml.PARAMETER_REFARRAY('arg', 'CIM_Foo')]))

        # PARAMETER + attributes

        self.xml.append(
            cim_xml.METHOD('FooMethod', [cim_xml.PARAMETER('arg', 'string')],
                           return_type='uint32',
                           class_origin='CIM_Foo',
                           propagated='true'))

        # QUALIFIER + PARAMETER

        self.xml.append(
            cim_xml.METHOD('FooMethod', [cim_xml.PARAMETER('arg', 'string')],
                           qualifiers=[
                               cim_xml.QUALIFIER('IMPISH', 'string',
                                                 cim_xml.VALUE('true'))
                           ]))