Cisco Cisco Elastic Services Controller 1.0 Developer's Guide

Page of 73
 
2  Configuration Data 
In the ESC Data Model, any object which 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. 
2.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).  
2.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. 
2.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> 
 
 
 
2.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"> 
      <services> 
        <service_definition> 
          <name>csr-reg</name> 
          <version>1.2</version> 
          <vm_group> 
            <name>csr-vm</name> 
            <disk> 
              <src>file://cisco/images/csr_ultra_latest.qcow2</src> 
              <disk_format>qcow2</disk_format> 
              <container_format>bare</container_format> 
              <serial_console>true</serial_console> 
              <disk_bus>virtio</disk_bus> 
            </disk> 
            <vm_flavor> 
              <vcpus>2</vcpus> 
              <memory_mb>2048</memory_mb> 
              <root_disk_mb>0</root_disk_mb> 
              <ephemeral_disk_mb>0</ephemeral_disk_mb> 
              <swap_disk_mb>0</swap_disk_mb> 
            </vm_flavor> 
          </vm_group> 
        </service_definition> 
      </services> 
      <tenants>