- name: ExecQuery1
  description: ExecQuery request returns data . Successful
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      QueryLanguage: WQL
      Query: Select * from CIM_ComputerSystem
      namespace: null
  pywbem_response:
    result:
    - pywbem_object: CIMInstance
      classname: PG_ComputerSystem
      properties:
        name:
          pywbem_object: CIMProperty
          name: Name
          value: sheldon
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        powermanagementcapabilities:
          pywbem_object: CIMProperty
          name: PowerManagementCapabilities
          value:
          - 1
          type: uint16
          reference_class: null
          embedded_object: null
          is_array: true
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        powerstate:
          pywbem_object: CIMProperty
          name: PowerState
          value: 1
          type: uint16
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        operationalstatus:
          pywbem_object: CIMProperty
          name: OperationalStatus
          value:
          - 2
          type: uint16
          reference_class: null
          embedded_object: null
          is_array: true
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        powermanagementsupported:
          pywbem_object: CIMProperty
          name: PowerManagementSupported
          value: false
          type: boolean
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        elementname:
          pywbem_object: CIMProperty
          name: ElementName
          value: Computer System
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        description:
          pywbem_object: CIMProperty
          name: Description
          value: 'Linux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version
            4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32
            UTC 2016'
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        nameformat:
          pywbem_object: CIMProperty
          name: NameFormat
          value: Other
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        status:
          pywbem_object: CIMProperty
          name: Status
          value: OK
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        caption:
          pywbem_object: CIMProperty
          name: Caption
          value: Computer System
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        creationclassname:
          pywbem_object: CIMProperty
          name: CreationClassName
          value: PG_ComputerSystem
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
      path:
        pywbem_object: CIMInstanceName
        classname: PG_ComputerSystem
        namespace: root/cimv2
        host: sheldon
        keybindings:
          name: sheldon
          creationclassname: PG_ComputerSystem
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/cimv2
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>WQL</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>Select * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <IRETURNVALUE>
      <VALUE.OBJECTWITHPATH>
      <INSTANCEPATH>
      <NAMESPACEPATH>
      <HOST>sheldon</HOST>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      </NAMESPACEPATH>
      <INSTANCENAME CLASSNAME="PG_ComputerSystem">
      <KEYBINDING NAME="CreationClassName">
      <KEYVALUE VALUETYPE="string" TYPE="string">PG_ComputerSystem</KEYVALUE>
      </KEYBINDING>
      <KEYBINDING NAME="Name">
      <KEYVALUE VALUETYPE="string" TYPE="string">sheldon</KEYVALUE>
      </KEYBINDING>
      </INSTANCENAME>
      </INSTANCEPATH>
      <INSTANCE CLASSNAME="PG_ComputerSystem" >
      <PROPERTY NAME="Caption"  TYPE="string">
      <VALUE>Computer System</VALUE>
      </PROPERTY>
      <PROPERTY NAME="Description"  TYPE="string">
      <VALUE>Linux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version 4.8.4
      (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016</VALUE>
      </PROPERTY>
      <PROPERTY NAME="Status"  TYPE="string">
      <VALUE>OK</VALUE>
      </PROPERTY>
      <PROPERTY.ARRAY NAME="OperationalStatus"  TYPE="uint16">
      <VALUE.ARRAY>
      <VALUE>2</VALUE>
      </VALUE.ARRAY>
      </PROPERTY.ARRAY>
      <PROPERTY NAME="ElementName"  TYPE="string">
      <VALUE>Computer System</VALUE>
      </PROPERTY>
      <PROPERTY NAME="CreationClassName"  TYPE="string">
      <VALUE>PG_ComputerSystem</VALUE>
      </PROPERTY>
      <PROPERTY NAME="Name"  TYPE="string">
      <VALUE>sheldon</VALUE>
      </PROPERTY>
      <PROPERTY NAME="NameFormat"  TYPE="string">
      <VALUE>Other</VALUE>
      </PROPERTY>
      <PROPERTY.ARRAY NAME="PowerManagementCapabilities"  TYPE="uint16">
      <VALUE.ARRAY>
      <VALUE>1</VALUE>
      </VALUE.ARRAY>
      </PROPERTY.ARRAY>
      <PROPERTY NAME="PowerManagementSupported"  TYPE="boolean">
      <VALUE>FALSE</VALUE>
      </PROPERTY>
      <PROPERTY NAME="PowerState"  TYPE="uint16">
      <VALUE>1</VALUE>
      </PROPERTY>
      </INSTANCE>
      </VALUE.OBJECTWITHPATH>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: ExecQuery2
  description: ExecQuery request returns no instances. Successful
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      QueryLanguage: WQL
      Query: Select * from CIM_ComputerSystem
      namespace: null
  pywbem_response:
    result: []
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/cimv2
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>WQL</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>Select * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <IRETURNVALUE>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: ExecQuery3
  description: ExecQuery request returns data just VALUE.OBJECT . Successful
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      QueryLanguage: WQL
      Query: Select * from CIM_ComputerSystem
      namespace: null
  pywbem_response:
    result:
    - pywbem_object: CIMInstance
      classname: PG_ComputerSystem
      properties:
        name:
          pywbem_object: CIMProperty
          name: Name
          value: sheldon
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        powermanagementcapabilities:
          pywbem_object: CIMProperty
          name: PowerManagementCapabilities
          value:
          - 1
          type: uint16
          reference_class: null
          embedded_object: null
          is_array: true
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        powerstate:
          pywbem_object: CIMProperty
          name: PowerState
          value: 1
          type: uint16
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        operationalstatus:
          pywbem_object: CIMProperty
          name: OperationalStatus
          value:
          - 2
          type: uint16
          reference_class: null
          embedded_object: null
          is_array: true
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        powermanagementsupported:
          pywbem_object: CIMProperty
          name: PowerManagementSupported
          value: false
          type: boolean
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        elementname:
          pywbem_object: CIMProperty
          name: ElementName
          value: Computer System
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        description:
          pywbem_object: CIMProperty
          name: Description
          value: 'Linux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version
            4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32
            UTC 2016'
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        nameformat:
          pywbem_object: CIMProperty
          name: NameFormat
          value: Other
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        status:
          pywbem_object: CIMProperty
          name: Status
          value: OK
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        caption:
          pywbem_object: CIMProperty
          name: Caption
          value: Computer System
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
        creationclassname:
          pywbem_object: CIMProperty
          name: CreationClassName
          value: PG_ComputerSystem
          type: string
          reference_class: null
          embedded_object: null
          is_array: false
          array_size: null
          class_origin: null
          propagated: false
          qualifiers: {}
      path:
        pywbem_object: CIMInstanceName
        classname: PG_ComputerSystem
        namespace: root/cimv2
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/cimv2
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>WQL</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>Select * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <IRETURNVALUE>
      <VALUE.OBJECT>
      <INSTANCE CLASSNAME="PG_ComputerSystem" >
      <PROPERTY NAME="Caption"  TYPE="string">
      <VALUE>Computer System</VALUE>
      </PROPERTY>
      <PROPERTY NAME="Description"  TYPE="string">
      <VALUE>Linux version 3.13.0-106-generic (buildd@lcy01-30) (gcc version 4.8.4
      (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016</VALUE>
      </PROPERTY>
      <PROPERTY NAME="Status"  TYPE="string">
      <VALUE>OK</VALUE>
      </PROPERTY>
      <PROPERTY.ARRAY NAME="OperationalStatus"  TYPE="uint16">
      <VALUE.ARRAY>
      <VALUE>2</VALUE>
      </VALUE.ARRAY>
      </PROPERTY.ARRAY>
      <PROPERTY NAME="ElementName"  TYPE="string">
      <VALUE>Computer System</VALUE>
      </PROPERTY>
      <PROPERTY NAME="CreationClassName"  TYPE="string">
      <VALUE>PG_ComputerSystem</VALUE>
      </PROPERTY>
      <PROPERTY NAME="Name"  TYPE="string">
      <VALUE>sheldon</VALUE>
      </PROPERTY>
      <PROPERTY NAME="NameFormat"  TYPE="string">
      <VALUE>Other</VALUE>
      </PROPERTY>
      <PROPERTY.ARRAY NAME="PowerManagementCapabilities"  TYPE="uint16">
      <VALUE.ARRAY>
      <VALUE>1</VALUE>
      </VALUE.ARRAY>
      </PROPERTY.ARRAY>
      <PROPERTY NAME="PowerManagementSupported"  TYPE="boolean">
      <VALUE>FALSE</VALUE>
      </PROPERTY>
      <PROPERTY NAME="PowerState"  TYPE="uint16">
      <VALUE>1</VALUE>
      </PROPERTY>
      </INSTANCE>
      </VALUE.OBJECT>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: ExecQueryF1
  description: ExecQuery request fails, invalid query
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      QueryLanguage: WQL
      Query: SelectSLOP * from CIM_ComputerSystem
      namespace: root/cimv2
  pywbem_response:
    cim_status: 15
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/cimv2
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>WQL</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>SelectSLOP * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <ERROR CODE="15" DESCRIPTION="CIM_ERR_INVALID_QUERY: SelectSLOP * from CIM_ComputerSystem"/>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: ExecQueryF2
  description: ExecQuery request fails, Invalid query language
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      QueryLanguage: wql
      Query: Select * from CIM_ComputerSystem
      namespace: root/cimv2
  pywbem_response:
    cim_status: 14
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/cimv2
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>wql</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>Select * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <ERROR CODE="14" DESCRIPTION="CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED: wql"/>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: ExecQueryF3
  description: ExecQueryRequest fails, Invalid namespace
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      QueryLanguage: WQL
      Query: Select * from CIM_ComputerSystem
      namespace: root/blah
  pywbem_response:
    cim_status: 3
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/blah
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="blah"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>WQL</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>Select * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <ERROR CODE="3" DESCRIPTION="CIM_ERR_INVALID_NAMESPACE: root/blah"/>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'


- name: ExecQueryF4
  description: ExecQueryRequest fails, XML entity bad (CIM -> CIMX) causes CIMXMLParserror
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      QueryLanguage: WQL
      Query: Select * from CIM_ComputerSystem
      namespace: root/blah
  pywbem_response:
    exception: CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/blah
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="blah"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>WQL</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>Select * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <ERROR CODE="3" DESCRIPTION="CIM_ERR_INVALID_NAMESPACE: root/blah"/>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIMX>'

- name: ExecQueryNS1
  description: ExecQuery, with leading/trailing slashes in default namespace
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: //root/mycim//
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      namespace: null
      QueryLanguage: WQL
      Query: Select * from CIM_ComputerSystem
  pywbem_response:
    result:
    - pywbem_object: CIMInstance
      classname: PG_ComputerSystem
      path:
        pywbem_object: CIMInstanceName
        classname: PG_ComputerSystem
        namespace: root/mycim
        host: acme.com:80
        keybindings:
          CreationClassName: PG_ComputerSystem
          Name: sheldon
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/mycim
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>WQL</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>Select * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <IRETURNVALUE>
      <VALUE.OBJECTWITHPATH>
      <INSTANCEPATH>
      <NAMESPACEPATH>
      <HOST>acme.com:80</HOST>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      </NAMESPACEPATH>
      <INSTANCENAME CLASSNAME="PG_ComputerSystem">
      <KEYBINDING NAME="CreationClassName">
      <KEYVALUE VALUETYPE="string" TYPE="string">PG_ComputerSystem</KEYVALUE>
      </KEYBINDING>
      <KEYBINDING NAME="Name">
      <KEYVALUE VALUETYPE="string" TYPE="string">sheldon</KEYVALUE>
      </KEYBINDING>
      </INSTANCENAME>
      </INSTANCEPATH>
      <INSTANCE CLASSNAME="PG_ComputerSystem" >
      </INSTANCE>
      </VALUE.OBJECTWITHPATH>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: ExecQueryNS2
  description: ExecQuery, with leading/trailing slashes in operation namespace
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: null
    timeout: 10
    debug: true
    operation:
      pywbem_method: ExecQuery
      namespace: //root/mycim//
      QueryLanguage: WQL
      Query: Select * from CIM_ComputerSystem
  pywbem_response:
    result:
    - pywbem_object: CIMInstance
      classname: PG_ComputerSystem
      path:
        pywbem_object: CIMInstanceName
        classname: PG_ComputerSystem
        namespace: root/mycim
        host: acme.com:80
        keybindings:
          CreationClassName: PG_ComputerSystem
          Name: sheldon
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMObject: root/mycim
      CIMMethod: ExecQuery
      CIMOperation: MethodCall
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="ExecQuery">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QueryLanguage">
      <VALUE>WQL</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Query">
      <VALUE>Select * from CIM_ComputerSystem</VALUE>
      </IPARAMVALUE>
      </IMETHODCALL>
      </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>
      <IMETHODRESPONSE NAME="ExecQuery">
      <IRETURNVALUE>
      <VALUE.OBJECTWITHPATH>
      <INSTANCEPATH>
      <NAMESPACEPATH>
      <HOST>acme.com:80</HOST>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      </NAMESPACEPATH>
      <INSTANCENAME CLASSNAME="PG_ComputerSystem">
      <KEYBINDING NAME="CreationClassName">
      <KEYVALUE VALUETYPE="string" TYPE="string">PG_ComputerSystem</KEYVALUE>
      </KEYBINDING>
      <KEYBINDING NAME="Name">
      <KEYVALUE VALUETYPE="string" TYPE="string">sheldon</KEYVALUE>
      </KEYBINDING>
      </INSTANCENAME>
      </INSTANCEPATH>
      <INSTANCE CLASSNAME="PG_ComputerSystem" >
      </INSTANCE>
      </VALUE.OBJECTWITHPATH>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'
