Cisco Cisco Elastic Services Controller 2.2 Developer's Guide

Page of 84
2  ESC Datamodel 
ESC defines datamodel in Yang language. The ESC Datamodel can be found in the below location in the 
ESC VM 
/opt/cisco/esc/esc-confd/YANGmodels-tailf 
The datamodel contains three major sections 
•  Configuration  
•  Operational Data 
•  Notifications 
The configuration section defines the configuration that a northbound user sends to ESC.  ESC will 
accept the configuration after initial validation.  Once a request is accepted, ESC will begin processing 
the request.  Once the request is successfully processed, ESC will send a success notification and update 
the Operational data to reflect the current status and details. 
3  Configuration Data 
In the ESC Data Model, any object that can be created and deleted through Netconf is represented using 
the Netconf Configuration datastore.  ESC contains only a single Configuration datastore, the running 
configuration datastore.  Therefore, configuration changes, once accepted, are applied immediately to 
the running configuration datastore, and immediately reflect the new running configuration. 
3.1  Reading Configuration Data 
Configuration data can be retrieved from ESC using the Netconf get-config 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 config data 
The example below illustrates how to fetch all existing configuration data from ESC, which in this 
example includes a deployed Cisco Cloud Service Router (CSR).  This request uses a fully inclusive XPath 
filter that requests all ESC configuration data. 
3.1.1.1  Netconf Request  
 
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
  <get-config> 
    <source> 
      <running/> 
    </source> 
    <filter select=" esc_datamodel " type="xpath"/> 
  </get-config> 
</rpc>