- name: DeleteClass1
  description: Delete class successful
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: DeleteClass
      ClassName: PyWbem_Run_CIM_Operations1
      namespace: null
  pywbem_response: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: DeleteClass
      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="DeleteClass">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ClassName">
      <CLASSNAME NAME="PyWbem_Run_CIM_Operations1"/>
      </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="DeleteClass">
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: DeleteClassF1
  description: Delete class request fails with CIM_ERR_NOT_FOUND
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: DeleteClass
      ClassName: PyWbem_Run_CIM_Operations1
      namespace: null
  pywbem_response:
    cim_status: 6
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: DeleteClass
      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="DeleteClass">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ClassName">
      <CLASSNAME NAME="PyWbem_Run_CIM_Operations1"/>
      </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="DeleteClass">
      <ERROR CODE="6" DESCRIPTION="CIM_ERR_NOT_FOUND: PyWbem_Run_CIM_Operations1"/>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: DeleteClassF2
  description: Delete class fails, CIMXMLParseError (Invalid XML entity CIMX)
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: DeleteClass
      ClassName: PyWbem_Run_CIM_Operations1
      namespace: null
  pywbem_response:
    exception: CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: DeleteClass
      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="DeleteClass">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ClassName">
      <CLASSNAME NAME="PyWbem_Run_CIM_Operations1"/>
      </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="DeleteClass">
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIMX>'

- name: DeleteClassNS1
  description: DeleteClass, 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: DeleteClass
      namespace: null
      ClassName: PyWbem_Run_CIM_Operations1
  pywbem_response: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: DeleteClass
      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="DeleteClass">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ClassName">
      <CLASSNAME NAME="PyWbem_Run_CIM_Operations1"/>
      </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="DeleteClass">
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: DeleteClassNS2
  description: DeleteClass, 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: DeleteClass
      namespace: //root/mycim//
      ClassName: PyWbem_Run_CIM_Operations1
  pywbem_response: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: DeleteClass
      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="DeleteClass">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ClassName">
      <CLASSNAME NAME="PyWbem_Run_CIM_Operations1"/>
      </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="DeleteClass">
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'
