Cisco Cisco Elastic Services Controller 1.1 Developer's Guide

Page of 82
3  Operational Data 
3.1  Reading Operational Data 
Operational data can be retrieved from ESC using the Netconf get rpc method.  A Netconf subtree filter 
or XPath filter should be supplied to limit the results that will be retrieved (see Netconf specification for 
more details).  
3.1.1  Fetching all operational data 
In this example, we will fetch all operational data from ESC, which includes a deployed Cisco Cloud 
Service Router (CSR).  This request uses a fully inclusive XPath filter that requests all ESC operational 
data.  Note that specifying “esc_datamodel
/
opdata” in the filter will ensure that no configuration data 
will be returned. 
3.1.1.1  Netconf Request  
 
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
  <get> 
    <filter select="esc_datamodel/opdata" type="xpath"/> 
  </get> 
</rpc> 
 
 
 
3.1.1.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"> 
      <opdata> 
        <status>OPER_UP</status> 
        <stats> 
          <hostname>esc-vm</hostname> 
          <os_name>Linux</os_name> 
          <os_release>2.6.32-504.16.2.el6.x86_64</os_release> 
          <arch>amd64</arch> 
          <uptime>98960</uptime> 
          <cpu> 
            <cpu_num>4</cpu_num> 
          </cpu> 
        </stats> 
        <tenants> 
          <tenant> 
            <name>admin</name> 
            <tenant_id>6b81858d5de047e8b650589bdcbcf32e</tenant_id> 
          </tenant> 
          <tenant> 
            <name>vnf-tenant</name> 
            <tenant_id>dccd22a13cc64e388a4b8d39e6a8fa7f</tenant_id> 
            <networks> 
              <network> 
                <name>csr-net</name> 
                <netid>a39af676-5004-4f2d-8b7b-d4c804645dc3</netid> 
                <shared>false</shared> 
                <status>active</status> 
                <subnets> 
                  <subnet> 
                    <name>csr-subnet</name> 
                    <subnetid>de4625ad-5465-4812-ab9c-
de4a0ed21063</subnetid> 
                    <cidr>10.91.90.0/24</cidr> 
                    <gateway>10.91.90.1</gateway> 
                    <dhcp>true</dhcp>