DX NetOps

 View Only

Expand all | Collapse all

Export Test Host by ModelingGateway method from a Spectroserver

  • 1.  Export Test Host by ModelingGateway method from a Spectroserver

    Posted Jul 02, 2025 06:55 PM

    I want to know if possible to export all test host of one Spectroserver 

    Regards

    Isaac Velasco.



  • 2.  RE: Export Test Host by ModelingGateway method from a Spectroserver

    Posted Jul 03, 2025 07:49 AM
    Edited by Catalin Farcasanu Jul 03, 2025 07:51 AM

    These are of Model Type RTM_TestHost (0x4560001). I don't think there's a way to specify in modeling gateway to export a certain model type, but you can do if for sure under RestAPI. 

    a POST with the following XML on {{ocprotocol}}://{{ochost}}:{{ocport}}/spectrum/restful/models

    ---
    <rs:model-request throttlesize="1000"
      xmlns:rs="http://www.ca.com/spectrum/restful/schema/request"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd ">
        <rs:target-models>
          <rs:models-search>
            <rs:search-criteria xmlns="http://www.ca.com/spectrum/restful/schema/filter">
            <filtered-models>
              <and>
                <has-substring>
                  <model-name />
                </has-substring>
                <equals>
                  <model-type>RTM_TestHost</model-type>
                </equals>
              </and>
            </filtered-models>
            </rs:search-criteria>
          </rs:models-search>
        </rs:target-models>
        <rs:requested-attribute id="0x1006e" /> <!-- Model_Name     0x1006e -->
    <!--    <rs:requested-attribute id="0x10001" />  Modeltype_Handle 0x1000 -->
        <rs:requested-attribute id="0x10000" /> <!-- Modeltype_Name 0x10000 -->
    </rs:model-request>
    ---



    ------------------------------
    Cătălin Fărcășanu
    Senior Consultant
    SolvIT Networks
    ------------------------------