- name: SetQualifier1
  description: SetQualifier request succeeds. Sets qualifierDecaration
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: SetQualifier
      namespace: null
      QualifierDeclaration:
        pywbem_object: CIMQualifierDeclaration
        name: FooQualDecl
        type: string
        value: Some string
        is_array: false
        array_size: null
        scopes:
          CLASS: true
        tosubclass: false
        toinstance: null
        overridable: false
        translatable: null
  pywbem_response: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SetQualifier
      CIMObject: root/cimv2
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="SetQualifier">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QualifierDeclaration">
      <QUALIFIER.DECLARATION ISARRAY="false" NAME="FooQualDecl" OVERRIDABLE="false"
      TOSUBCLASS="false" TYPE="string">
      <SCOPE CLASS="true"/>
      <VALUE>Some string</VALUE>
      </QUALIFIER.DECLARATION>
      </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="SetQualifier">
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: SetQualifierF1
  description: SetQualifier request fails. Returns NOT_SUPPORTED
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: SetQualifier
      namespace: null
      QualifierDeclaration:
        pywbem_object: CIMQualifierDeclaration
        name: Abstract
        type: boolean
        value: null
        is_array: false
        array_size: null
        scopes:
          reference: false
          any: false
          class: true
          indication: false
          property: false
          parameter: false
          method: false
          association: false
        tosubclass: true
        toinstance: true
        overridable: false
        translatable: false
  pywbem_response:
    cim_status: 7
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SetQualifier
      CIMObject: root/cimv2
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="SetQualifier">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QualifierDeclaration">
      <QUALIFIER.DECLARATION ISARRAY="false" NAME="Abstract" OVERRIDABLE="false" TOINSTANCE="true"
      TOSUBCLASS="true" TRANSLATABLE="false" TYPE="boolean">
      <SCOPE ANY="false" ASSOCIATION="false" CLASS="true" INDICATION="false" METHOD="false"
      PARAMETER="false" PROPERTY="false" REFERENCE="false"/>
      </QUALIFIER.DECLARATION>
      </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="SetQualifier">
      <ERROR CODE="7" DESCRIPTION="CIM_ERR_NOT_SUPPORTED: Abstract"/>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: SetQualifierF2
  description: SetQualifier request fails, CIMXMLParseErrot (XML CIMX)
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: SetQualifier
      namespace: null
      QualifierDeclaration:
        pywbem_object: CIMQualifierDeclaration
        name: FooQualDecl
        type: string
        value: Some string
        is_array: false
        array_size: null
        scopes:
          CLASS: true
        tosubclass: false
        toinstance: null
        overridable: false
        translatable: null
  pywbem_response:
    exception: CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SetQualifier
      CIMObject: root/cimv2
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="SetQualifier">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QualifierDeclaration">
      <QUALIFIER.DECLARATION ISARRAY="false" NAME="FooQualDecl" OVERRIDABLE="false"
      TOSUBCLASS="false" TYPE="string">
      <SCOPE CLASS="true"/>
      <VALUE>Some string</VALUE>
      </QUALIFIER.DECLARATION>
      </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="SetQualifier">
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIMX>'

- name: SetQualifierNS1
  description: SetQualifier, 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: SetQualifier
      namespace: null
      QualifierDeclaration:
        pywbem_object: CIMQualifierDeclaration
        name: FooQualDecl
        type: string
        value: Some string
        scopes:
          CLASS: true
        tosubclass: false
        overridable: false
  pywbem_response: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SetQualifier
      CIMObject: root/mycim
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="SetQualifier">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QualifierDeclaration">
      <QUALIFIER.DECLARATION ISARRAY="false" NAME="FooQualDecl" OVERRIDABLE="false"
      TOSUBCLASS="false" TYPE="string">
      <SCOPE CLASS="true"/>
      <VALUE>Some string</VALUE>
      </QUALIFIER.DECLARATION>
      </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="SetQualifier">
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: SetQualifierNS2
  description: SetQualifier, 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: SetQualifier
      namespace: //root/mycim//
      QualifierDeclaration:
        pywbem_object: CIMQualifierDeclaration
        name: FooQualDecl
        type: string
        value: Some string
        scopes:
          CLASS: true
        tosubclass: false
        overridable: false
  pywbem_response: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: SetQualifier
      CIMObject: root/mycim
    data: '<?xml version="1.0" encoding="utf-8" ?>
      <CIM CIMVERSION="2.0" DTDVERSION="2.0">
      <MESSAGE ID="1001" PROTOCOLVERSION="1.0">
      <SIMPLEREQ>
      <IMETHODCALL NAME="SetQualifier">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="QualifierDeclaration">
      <QUALIFIER.DECLARATION ISARRAY="false" NAME="FooQualDecl" OVERRIDABLE="false"
      TOSUBCLASS="false" TYPE="string">
      <SCOPE CLASS="true"/>
      <VALUE>Some string</VALUE>
      </QUALIFIER.DECLARATION>
      </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="SetQualifier">
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'
