Cisco Cisco Elastic Services Controller 1.1 Developer's Guide

Page of 82
2.1.2  Example:  Fetching deployed services by network name 
The example below illustrates how to fetch all deployed services that contain an interface bound to the 
given network ‘esc-net’, using an XPath filter.  Note that in the response, only elements representing key 
data are shown in the ancestor elements. 
2.1.2.1  Netconf Request  
 
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
  <get-config> 
    <source> 
      <running/> 
    </source> 
    <filter type="xpath" 
select="esc_datamodel/tenants/tenant/services/service_definition/vm_group/ 
interfaces/interface[network='esc-net']" /> 
  </get-config> 
</rpc> 
 
 
 
2.1.2.2  Netconf Response  
 
 
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> 
  <data> 
    <esc_datamodel xmlns="http://www.cisco.com/esc/esc"> 
      <tenants> 
        <tenant> 
          <name>vnf-tenant</name> 
          <services> 
            <service_definition> 
              <deployment_name>csr-dep</deployment_name> 
              <name>csr-reg</name> 
              <version>1.2</version> 
              <vm_group> 
                <name>csr-dep</name> 
                <interfaces> 
                  <interface> 
                    <nicid>0</nicid> 
                    <network>esc-net</network> 
                  </interface> 
                </interfaces> 
              </vm_group> 
            </service_definition> 
          </services> 
        </tenant> 
      </tenants> 
    </esc_datamodel> 
  </data> 
</rpc-reply>