- name: InvokeMethod1
  description: Pass two input parameters via Params as list of tuple(name,value), no output parameters
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      Params:
        - - indicationSendCount
          - pywbem_object: Uint32
            x: 0
        - - indicationDropCount
          - pywbem_object: Uint32
            x: 42
        - - optionalP1
          - null
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      <PARAMVALUE NAME="indicationDropCount" PARAMTYPE="uint32">
      <VALUE>42</VALUE>
      </PARAMVALUE>
      <PARAMVALUE NAME="optionalP1"/>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod2
  description: Pass two input parameters via Params as list of CIMParameter objects, no output parameters
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      Params:
      - pywbem_object: CIMParameter
        name: indicationSendCount
        type: uint32
        value: 0
      - pywbem_object: CIMParameter
        name: indicationDropCount
        type: uint32
        value: 42
      - pywbem_object: CIMParameter
        name: optionalP1
        type: uint32
        value: null
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      <PARAMVALUE NAME="indicationDropCount" PARAMTYPE="uint32">
      <VALUE>42</VALUE>
      </PARAMVALUE>
      <PARAMVALUE NAME="optionalP1" PARAMTYPE="uint32"/>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod3
  description: Pass no input parameters, but two output parameters
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: GetTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
  pywbem_response:
    result:
    - 0
    - indicationSendCount:
        pywbem_object: Uint32
        x: 0
      indicationDropCount:
        pywbem_object: Uint32
        x: 42
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: GetTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="GetTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="GetTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      <PARAMVALUE NAME="indicationDropCount" PARAMTYPE="uint32">
      <VALUE>42</VALUE>
      </PARAMVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod4
  description: Pass one input parameter via **params as list of tuple(name,value), no output parameters
  # Note: We can pass only one parameter because the **kwargs mechanism does not preserve the order
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        pywbem_object: Uint32
        x: 0
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod5
  description: Pass one boolean input parameter via **params as value to test infered value, no output parameters
  # Note: We can pass only one parameter because the **kwargs mechanism does not preserve the order
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount: true
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="boolean">
      <VALUE>TRUE</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod6
  description: Pass one boolean list input parameter via **params as list of value(boolean), no output parameters
  # Note: We can pass only one parameter because the **kwargs mechanism does not preserve the order
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        - true
        - false
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="boolean">
      <VALUE.ARRAY>
      <VALUE>TRUE</VALUE>
      <VALUE>FALSE</VALUE>
      </VALUE.ARRAY>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod7
  description: InvokeMethod, return one parameter type boolean
  ignore_test: true
  # Ignoring this test because infer type with boolean does not work.
  # Note: We can pass only one parameter because the **kwargs mechanism does not preserve the order
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: InferredType
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_InferredTypes
        host: null
        namespace: test/TestProvider
  pywbem_response:
    result:
    - 0
    - {'InferBoolParam': 'True'}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: InferredType
      CIMObject: test/TestProvider:Test_InferredTypes
    data: >
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
        <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
          <SIMPLEREQ>
            <METHODCALL NAME="InferredType">
              <LOCALCLASSPATH>
                <LOCALNAMESPACEPATH>
                  <NAMESPACE NAME="test"></NAMESPACE>
                  <NAMESPACE NAME="TestProvider"></NAMESPACE>
                </LOCALNAMESPACEPATH>
                <CLASSNAME NAME="Test_InferredTypes"></CLASSNAME>
              </LOCALCLASSPATH>
            </METHODCALL>
          </SIMPLEREQ>
        </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="InferredType">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      <PARAMVALUE NAME="InferBoolParam">
        <VALUE>TRUE</VALUE>
      </PARAMVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod8
  description: InvokeMethod, return one parameter returned type list of string
  # Note: We can pass only one parameter because the **kwargs mechanism does not preserve the order
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: InferredType
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_InferredTypes
        host: null
        namespace: test/TestProvider
  pywbem_response:
    result:
    - 0
    - {'InferStringParam': ["StrParam1", "StrParam2"]}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: InferredType
      CIMObject: test/TestProvider:Test_InferredTypes
    data: >
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
        <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
          <SIMPLEREQ>
            <METHODCALL NAME="InferredType">
              <LOCALCLASSPATH>
                <LOCALNAMESPACEPATH>
                  <NAMESPACE NAME="test"></NAMESPACE>
                  <NAMESPACE NAME="TestProvider"></NAMESPACE>
                </LOCALNAMESPACEPATH>
                <CLASSNAME NAME="Test_InferredTypes"></CLASSNAME>
              </LOCALCLASSPATH>
            </METHODCALL>
          </SIMPLEREQ>
        </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="InferredType">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      <PARAMVALUE NAME="InferStringParam">
        <VALUE.ARRAY>
          <VALUE>StrParam1</VALUE>
          <VALUE>StrParam2</VALUE>
        </VALUE.ARRAY>
      </PARAMVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod9
  description: InvokeMethod, return one parameter returned type CIMClass
  ignore_test: true
  # Ignoring this test because I do not know how to define CIMClass in a
  # list in YAML
  # Note: We can pass only one parameter because the **kwargs mechanism does not preserve the order
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: ClassType
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_ClassTypes
        host: null
        namespace: test/TestProvider
  pywbem_response:
    result:
    - 0
    - {"ClassParam": CIMClass("CIM_Blah")}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: ClassType
      CIMObject: test/TestProvider:Test_ClassTypes
    data: >
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
        <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
          <SIMPLEREQ>
            <METHODCALL NAME="ClassType">
              <LOCALCLASSPATH>
                <LOCALNAMESPACEPATH>
                  <NAMESPACE NAME="test"></NAMESPACE>
                  <NAMESPACE NAME="TestProvider"></NAMESPACE>
                </LOCALNAMESPACEPATH>
                <CLASSNAME NAME="Test_ClassTypes"></CLASSNAME>
              </LOCALCLASSPATH>
            </METHODCALL>
          </SIMPLEREQ>
        </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="ClassType">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      <PARAMVALUE NAME="ClassParam">
        <CLASS NAME="CIM_BLAH"></CLASS>
      </PARAMVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod10
  description: Pass two input parameters but no namespace on request object
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: null
      Params:
        - - indicationSendCount
          - pywbem_object: Uint32
            x: 0
        - - indicationDropCount
          - pywbem_object: Uint32
            x: 42
        - - optionalP1
          - null
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: root/cimv2:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      <PARAMVALUE NAME="indicationDropCount" PARAMTYPE="uint32">
      <VALUE>42</VALUE>
      </PARAMVALUE>
      <PARAMVALUE NAME="optionalP1"/>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod_SFCB_UEP
  description: Verify that UpdateExpiredPassword causes the corresponding Pragma header to be added
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: UpdateExpiredPassword
      ObjectName:
        pywbem_object: CIMClassName
        classname: SFCB_Account
        host: null
        namespace: root/interop
      UserPassword: foo
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: UpdateExpiredPassword
      CIMObject: root/interop:SFCB_Account
      Pragma: UpdateExpiredPassword
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="UpdateExpiredPassword">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="interop"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="SFCB_Account"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="UserPassword" PARAMTYPE="string">
      <VALUE>foo</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="UpdateExpiredPassword">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethodError1
  description: Invalid CIM Entity header on response (CIMX)
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        pywbem_object: Uint32
        x: 0
  pywbem_response:
    exception:  CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIMX CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIMX>

- name: InvokeMethodError2
  description: Invalid MESSAGE Entity header on response (MESSAGEX)
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        pywbem_object: Uint32
        x: 0
  pywbem_response:
    exception:  CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGEX ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGEX>
      </CIM>

- name: InvokeMethodError3
  description: Invalid SIMPLERSP Entity header on response
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        pywbem_object: Uint32
        x: 0
  pywbem_response:
    exception:  CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSPX>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSPX>
      </MESSAGE>
      </CIM>

- name: InvokeMethodError4
  description: Invalid NAME Entity header on response invalid
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        pywbem_object: Uint32
        x: 0
  pywbem_response:
    exception:  CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSEX NAME="SendTestIndicationsCountXXXX">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSEX>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethodError5
  description: Invalid return value, no value component
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        pywbem_object: Uint32
        x: 0
  pywbem_response:
    exception:  CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCountXXXX">
      <RETURNVALUE PARAMTYPE="sint32">
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>


- name: InvokeMethodError6
  description: Invalid out param. PARAMVALUE with no value
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        pywbem_object: Uint32
        x: 0
  pywbem_response:
    exception:  CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCountXXXX">
      <PARAMVALUE NAME="UserPassword" PARAMTYPE="string">
      <VALUE>foo</VALUE>
      </PARAMVALUE>
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethodError7
  description: ERROR response to InvokeMethod
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      indicationSendCount:
        pywbem_object: Uint32
        x: 0
  pywbem_response:
        cim_status: 6
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="uint32">
      <VALUE>0</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <ERROR CODE="6" DESCRIPTION="CIM_ERR_NOT_FOUND: PyWBEM_Person.CreationClassName=&quot;PyWBEM_Person&quot;,Name=&quot;run_cimoperations_test&quot;"/>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod11
  # Test fails because the list defined for classnameList parameter creates object has type <class 'collections.OrderedDict'>
  # while _methodcall isinstance only handles list type
  ignore_test: true
  description: Pass list of CIMClassName parameter, no output parameters
  # Note: We can pass only one parameter because the **kwargs mechanism does not preserve the order
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      classnameList:
        - ObjectName:
              pywbem_object: CIMClassName
              classname: Test_classnameinparam1
              host: null
              namespace: test/TestProvider
        - ObjectName:
              pywbem_object: CIMClassName
              classname: Test_classnameinparam2
              host: null
              namespace: test/TestProvider
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="indicationSendCount" PARAMTYPE="boolean">
      <VALUE.ARRAY>
      <VALUE>TRUE</VALUE>
      <VALUE>FALSE</VALUE>
      </VALUE.ARRAY>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>

- name: InvokeMethod12
  description: Pass input parameter as CIMDateTime, no output parameters
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: InvokeMethod
      MethodName: SendTestIndicationsCount
      ObjectName:
        pywbem_object: CIMClassName
        classname: Test_IndicationProviderClass
        host: null
        namespace: test/TestProvider
      Params:
        - - datetimeparam
          - pywbem_object: CIMDateTime
            dtarg: "00001234567890.123456:000"
  pywbem_response:
    result:
    - 0
    - {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SendTestIndicationsCount
      CIMObject: test/TestProvider:Test_IndicationProviderClass
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <METHODCALL NAME="SendTestIndicationsCount">
      <LOCALCLASSPATH>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="test"/>
      <NAMESPACE NAME="TestProvider"/>
      </LOCALNAMESPACEPATH>
      <CLASSNAME NAME="Test_IndicationProviderClass"/>
      </LOCALCLASSPATH>
      <PARAMVALUE NAME="datetimeparam" PARAMTYPE="datetime">
            <VALUE>00001236091930.123456:000</VALUE>
      </PARAMVALUE>
      </METHODCALL>
      </SIMPLEREQ>
      </MESSAGE>
      </CIM>
  http_response:
    status: 200
    headers:
      CIMOperation: MethodResponse
    data: >
      <?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLERSP>
      <METHODRESPONSE NAME="SendTestIndicationsCount">
      <RETURNVALUE PARAMTYPE="sint32">
      <VALUE>0</VALUE>
      </RETURNVALUE>
      </METHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>


# TODO 01/18 AM: Add testcases for namespaces with leading/trailing slashes
