Cisco Cisco Elastic Services Controller 1.1 Developer's Guide

Page of 82
5.1.11  Register Service with the Service Catalog 
5.1.11.1 Netconf Request  
  <edit-config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
    <target> 
      <running/> 
    </target> 
    <config> 
      <esc_datamodel xmlns="http://www.cisco.com/esc/esc" 
xmlns:ns0="http://www.cisco.com/esc/esc" 
xmlns:ns3="http://www.cisco.com/esc/esc_notifications" 
xmlns:ns1="urn:ietf:params:xml:ns:netconf:base:1.0" 
xmlns:ns2="urn:ietf:params:xml:ns:netconf:notification:1.0"> 
        <services> 
          <service_definition> 
            <name>csr-reg</name> 
            <version>1.2</version> 
            <vm_group> 
              <name>csr-vm</name> 
              <disk>                
<src>/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> 
      </esc_datamodel> 
    </config> 
  </edit-config> 
 
 
 
 
5.1.11.2 Netconf Response 
An rpc-reply response is returned with a status of ok if the request was accepted for activation, or a 
status of rpc-error if the request was rejected: 
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> 
  <rpc-error> 
    <error-type>application</error-type> 
    <error-tag>operation-failed</error-tag> 
    <error-severity>error</error-severity> 
    <error-message xml:lang="en">Internal id: csr_reg1.2 is already in use with 
another resource type</error-message> 
  </rpc-error> 
</rpc-reply>
 
See section 
  for more details.