Esempio n. 1
0
    def setUp(self):
        super(ParamValue, self).setUp()

        # Empty

        self.xml.append(cim_xml.PARAMVALUE('Pet'))

        # VALUE

        self.xml.append(
            cim_xml.PARAMVALUE('Pet', cim_xml.VALUE('Dog'), 'string'))

        # VALUE.REFERENCE

        self.xml.append(
            cim_xml.PARAMVALUE(
                'Pet',
                cim_xml.VALUE_REFERENCE(
                    cim_xml.CLASSPATH(NAMESPACEPATH(), CLASSNAME()))))

        # VALUE.ARRAY

        self.xml.append(cim_xml.PARAMVALUE('Pet', cim_xml.VALUE_ARRAY([])))

        # VALUE.REFARRAY

        self.xml.append(cim_xml.PARAMVALUE('Pet', cim_xml.VALUE_REFARRAY([])))
Esempio n. 2
0
    def setUp(self):
        super(MethodResponse, self).setUp()

        # ERROR

        self.xml.append(
            cim_xml.METHODRESPONSE('FooMethod', cim_xml.ERROR('123')))

        # Empty

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

        # RETURNVALUE

        self.xml.append(
            cim_xml.METHODRESPONSE(
                'FooMethod',
                cim_xml.PARAMVALUE('Dog', cim_xml.VALUE('Spottyfoot'))))

        # PARAMVALUE

        self.xml.append(
            cim_xml.METHODRESPONSE(
                'FooMethod',
                cim_xml.PARAMVALUE('Dog', cim_xml.VALUE('Spottyfoot'))))

        # RETURNVALUE + PARAMVALUE

        self.xml.append(
            cim_xml.METHODRESPONSE(
                'FooMethod',
                (cim_xml.RETURNVALUE(cim_xml.VALUE('Dog')),
                 cim_xml.PARAMVALUE('Dog', cim_xml.VALUE('Spottyfoot')))))
Esempio n. 3
0
    def setUp(self):
        super(MethodCall, self).setUp()

        # LOCALINSTANCEPATH

        self.xml.append(
            cim_xml.METHODCALL(
                'FooMethod',
                cim_xml.LOCALINSTANCEPATH(LOCALNAMESPACEPATH(),
                                          INSTANCENAME())))

        # LOCALCLASSPATH

        self.xml.append(
            cim_xml.METHODCALL(
                'FooMethod',
                cim_xml.LOCALCLASSPATH(LOCALNAMESPACEPATH(), CLASSNAME())))

        # PARAMVALUEs

        self.xml.append(
            cim_xml.METHODCALL(
                'FooMethod',
                cim_xml.LOCALINSTANCEPATH(LOCALNAMESPACEPATH(),
                                          INSTANCENAME()),
                [cim_xml.PARAMVALUE('Dog', cim_xml.VALUE('Spottyfoot'))]))