- name: Associators_Classes1
  description: Associator with classname PyWBEM. Returns one class
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: Associators
      IncludeQualifiers: null
      ObjectName: PyWBEM_Person
      ResultClass: null
      PropertyList: null
      ResultRole: null
      IncludeClassOrigin: null
      Role: null
      AssocClass: PyWBEM_MemberOfPersonCollection
  pywbem_response:
    result:
    - - pywbem_object: CIMClassName
        classname: CIM_Collection
        host: sheldon
        namespace: root/cimv2
      - pywbem_object: CIMClass
        classname: CIM_Collection
        superclass: CIM_ManagedElement
        path:
          pywbem_object: CIMClassName
          classname: CIM_Collection
          host: sheldon
          namespace: root/cimv2
        properties:
          instanceid:
            pywbem_object: CIMProperty
            name: InstanceID
            value: null
            type: string
            reference_class: null
            embedded_object: null
            is_array: false
            array_size: null
            class_origin: null
            propagated: true
            qualifiers: {}
          caption:
            pywbem_object: CIMProperty
            name: Caption
            value: null
            type: string
            reference_class: null
            embedded_object: null
            is_array: false
            array_size: null
            class_origin: null
            propagated: true
            qualifiers: {}
          elementname:
            pywbem_object: CIMProperty
            name: ElementName
            value: null
            type: string
            reference_class: null
            embedded_object: null
            is_array: false
            array_size: null
            class_origin: null
            propagated: true
            qualifiers: {}
          description:
            pywbem_object: CIMProperty
            name: Description
            value: null
            type: string
            reference_class: null
            embedded_object: null
            is_array: false
            array_size: null
            class_origin: null
            propagated: true
            qualifiers: {}
        methods: {}
        qualifiers: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: Associators
      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="Associators">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ObjectName">
      <CLASSNAME NAME="PyWBEM_Person"/>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="AssocClass">
      <CLASSNAME NAME="PyWBEM_MemberOfPersonCollection"/>
      </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="Associators">
      <IRETURNVALUE>
      <VALUE.OBJECTWITHPATH>
      <CLASSPATH>
      <NAMESPACEPATH>
      <HOST>sheldon</HOST>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      </NAMESPACEPATH>
      <CLASSNAME NAME="CIM_Collection"/>
      </CLASSPATH>
      <CLASS NAME="CIM_Collection"  SUPERCLASS="CIM_ManagedElement" >
      <PROPERTY NAME="InstanceID"  PROPAGATED="true" TYPE="string">
      </PROPERTY>
      <PROPERTY NAME="Caption"  PROPAGATED="true" TYPE="string">
      </PROPERTY>
      <PROPERTY NAME="Description"  PROPAGATED="true" TYPE="string">
      </PROPERTY>
      <PROPERTY NAME="ElementName"  PROPAGATED="true" TYPE="string">
      </PROPERTY>
      </CLASS>
      </VALUE.OBJECTWITHPATH>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: Associators_ClassesError1
  description: Associators fails, CIMXMLParseError (XML bad entity CIMX)
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: Associators
      IncludeQualifiers: null
      ObjectName: PyWBEM_Person
      ResultClass: null
      PropertyList: null
      ResultRole: null
      IncludeClassOrigin: null
      Role: null
      AssocClass: PyWBEM_MemberOfPersonCollection
  pywbem_response:
    exception: CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: Associators
      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="Associators">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ObjectName">
      <CLASSNAME NAME="PyWBEM_Person"/>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="AssocClass">
      <CLASSNAME NAME="PyWBEM_MemberOfPersonCollection"/>
      </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="Associators">
      <IRETURNVALUE>
      <VALUE.OBJECTWITHPATH>
      <CLASSPATH>
      <NAMESPACEPATH>
      <HOST>sheldon</HOST>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      </NAMESPACEPATH>
      <CLASSNAME CLASSNAME="CIM_Collection"/>
      </CLASSPATH>
      <INSTANCE CLASSNAME="CIM_Collection">
      <PROPERTY NAME="InstanceID"  PROPAGATED="true" TYPE="string">
      </PROPERTY>
      <PROPERTY NAME="Caption"  PROPAGATED="true" TYPE="string">
      </PROPERTY>
      <PROPERTY NAME="Description"  PROPAGATED="true" TYPE="string">
      </PROPERTY>
      <PROPERTY NAME="ElementName"  PROPAGATED="true" TYPE="string">
      </PROPERTY>
      </INSTANCE>
      </VALUE.OBJECTWITHPATH>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIMX>'

- name: Associators_ClassesError2
  description: Associators fails, CIMXMLParseError, Returns instances on class request
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: root/cimv2
    timeout: 10
    debug: true
    operation:
      pywbem_method: Associators
      IncludeQualifiers: null
      ObjectName: PyWBEM_Person
      ResultClass: null
      PropertyList: null
      ResultRole: null
      IncludeClassOrigin: null
      Role: null
      AssocClass: PyWBEM_MemberOfPersonCollection
  pywbem_response:
    exception: CIMXMLParseError
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: Associators
      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="Associators">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ObjectName">
      <CLASSNAME NAME="PyWBEM_Person"/>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="AssocClass">
      <CLASSNAME NAME="PyWBEM_MemberOfPersonCollection"/>
      </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="Associators">
      <IRETURNVALUE>
      <VALUE.OBJECTWITHPATH>
      <CLASSPATH>
      <NAMESPACEPATH>
      <HOST>sheldon</HOST>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="cimv2"/>
      </LOCALNAMESPACEPATH>
      </NAMESPACEPATH>
      <CLASSNAME NAME="CIM_Collection"/>
      </CLASSPATH>
      <INSTANCE CLASSNAME="CIM_Collection" >
      </INSTANCE>
      </VALUE.OBJECTWITHPATH>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: Associators_ClassesNS1
  description: Associators on class, providing class name and default namespace with leading/trailing slashes
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: //root/mycim//
    timeout: 10
    debug: true
    operation:
      pywbem_method: Associators
      ObjectName: PyWBEM_Person
      AssocClass: PyWBEM_MemberOfPersonCollection
      ResultClass: null
      Role: Member
      ResultRole: null
  pywbem_response:
    result:
    - - pywbem_object: CIMClassName
        classname: CIM_Collection
        host: acme.com:80
        namespace: root/mycim
      - pywbem_object: CIMClass
        classname: CIM_Collection
        superclass: CIM_ManagedElement
        path:
          pywbem_object: CIMClassName
          classname: CIM_Collection
          host: acme.com:80
          namespace: root/mycim
        properties: {}
        methods: {}
        qualifiers: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: Associators
      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="Associators">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ObjectName">
      <CLASSNAME NAME="PyWBEM_Person"/>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Role">
      <VALUE>Member</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="AssocClass">
      <CLASSNAME NAME="PyWBEM_MemberOfPersonCollection"/>
      </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="Associators">
      <IRETURNVALUE>
      <VALUE.OBJECTWITHPATH>
      <CLASSPATH>
      <NAMESPACEPATH>
      <HOST>acme.com:80</HOST>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      </NAMESPACEPATH>
      <CLASSNAME NAME="CIM_Collection"/>
      </CLASSPATH>
      <CLASS NAME="CIM_Collection"  SUPERCLASS="CIM_ManagedElement" >
      </CLASS>
      </VALUE.OBJECTWITHPATH>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'

- name: Associators_ClassesNS2
  description: Associators on class, providing CIMClassName object with leading/trailing slashes in its namespace
  pywbem_request:
    url: http://acme.com:80
    creds:
    - username
    - password
    namespace: null
    timeout: 10
    debug: true
    operation:
      pywbem_method: Associators
      ObjectName:
        pywbem_object: CIMClassName
        classname: PyWBEM_Person
        namespace: //root/mycim//
      AssocClass: PyWBEM_MemberOfPersonCollection
      ResultClass: null
      Role: Member
      ResultRole: null
  pywbem_response:
    result:
    - - pywbem_object: CIMClassName
        classname: CIM_Collection
        host: acme.com:80
        namespace: root/mycim
      - pywbem_object: CIMClass
        classname: CIM_Collection
        superclass: CIM_ManagedElement
        path:
          pywbem_object: CIMClassName
          classname: CIM_Collection
          host: acme.com:80
          namespace: root/mycim
        properties: {}
        methods: {}
        qualifiers: {}
  http_request:
    verb: POST
    url: http://acme.com:80/cimom
    headers:
      CIMOperation: MethodCall
      CIMMethod: Associators
      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="Associators">
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      <IPARAMVALUE NAME="ObjectName">
      <CLASSNAME NAME="PyWBEM_Person"/>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="Role">
      <VALUE>Member</VALUE>
      </IPARAMVALUE>
      <IPARAMVALUE NAME="AssocClass">
      <CLASSNAME NAME="PyWBEM_MemberOfPersonCollection"/>
      </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="Associators">
      <IRETURNVALUE>
      <VALUE.OBJECTWITHPATH>
      <CLASSPATH>
      <NAMESPACEPATH>
      <HOST>acme.com:80</HOST>
      <LOCALNAMESPACEPATH>
      <NAMESPACE NAME="root"/>
      <NAMESPACE NAME="mycim"/>
      </LOCALNAMESPACEPATH>
      </NAMESPACEPATH>
      <CLASSNAME NAME="CIM_Collection"/>
      </CLASSPATH>
      <CLASS NAME="CIM_Collection"  SUPERCLASS="CIM_ManagedElement" >
      </CLASS>
      </VALUE.OBJECTWITHPATH>
      </IRETURNVALUE>
      </IMETHODRESPONSE>
      </SIMPLERSP>
      </MESSAGE>
      </CIM>'
