Cisco Cisco Elastic Services Controller 1.1 Guide Du Développeur
5.1.5 Create Subnet
5.1.5.1 Netconf Request
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<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">
<networks>
<network>
<name>mgmt-net</name>
<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">
<networks>
<network>
<name>mgmt-net</name>
<subnet>
<name>mgmt-net-subnet</name>
<ipversion>ipv4</ipversion>
<dhcp>false</dhcp>
<address>10.20.0.0</address>
<gateway>10.20.0.1</gateway>
<netmask>255.255.255.0</netmask>
</subnet>
</network>
<name>mgmt-net-subnet</name>
<ipversion>ipv4</ipversion>
<dhcp>false</dhcp>
<address>10.20.0.0</address>
<gateway>10.20.0.1</gateway>
<netmask>255.255.255.0</netmask>
</subnet>
</network>
</networks>
</esc_datamodel>
</config>
</edit-config
</rpc>
</esc_datamodel>
</config>
</edit-config
</rpc>
For creating the subnet, the network
mgmt-net
in this example, must already be created in a separate
workflow before applying this configuration. Since this combination of creation of network and subnet
in same workflow is not supported as mentioned in section
in same workflow is not supported as mentioned in section
3.2.4
.
5.1.5.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. See section
status of rpc-error if the request was rejected. See section
a Configuration Request for more details.
5.1.5.3 Configuration Activation
On Success:
Event notification
An escEvent of type CREATE_SUBNET with a status of SUCCESS will be sent to Netconf subscribers once
the configuration activation has completed. This indicates that the activation workflow is complete and
the configuration resource has been successfully created in the VIM.
the configuration activation has completed. This indicates that the activation workflow is complete and
the configuration resource has been successfully created in the VIM.
<?xml version="1.0" encoding="UTF-8"?>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2015-05-19T20:24:32.57+00:00</eventTime>
<escEvent xmlns="http://www.cisco.com/esc/esc">
<status>SUCCESS</status>
<status_message>Subnet creation completed successfully, subnet ID:
[SystemAdminTenantIdmgmt-netmgmt-net-subnet]</status_message>
<network>SystemAdminTenantIdmgmt-net</network>
<subnet>SystemAdminTenantIdmgmt-netmgmt-net-subnet</subnet>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2015-05-19T20:24:32.57+00:00</eventTime>
<escEvent xmlns="http://www.cisco.com/esc/esc">
<status>SUCCESS</status>
<status_message>Subnet creation completed successfully, subnet ID:
[SystemAdminTenantIdmgmt-netmgmt-net-subnet]</status_message>
<network>SystemAdminTenantIdmgmt-net</network>
<subnet>SystemAdminTenantIdmgmt-netmgmt-net-subnet</subnet>