The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes how to configure XML requests and includes the following sections:
Before you begin exchanging messages with the Cisco Nexus 1000VXML API, verify the following conditions:
Use this procedure to start a NETCONF session between your XML client and the Cisco Nexus 1000V XML server.
Note The Cisco Nexus 1000V xmlagent service is referred to as the XML server.
Before beginning this procedure, you must know or do the following:
For more information, see the Configuring the Number of Allowed Sessions.
Use this procedure to create an XML request in a message to the XML server.
Before beginning this procedure, you must know or do the following:
Step 1 Enter a request start tag.
Step 2 Enter the NETCONF operations start tags for the operations you are requesting.
Step 3 Enter the Cisco Nexus 1000V operation start tags for the operations you are requesting.
Step 4 Enter the Cisco Nexus 1000V operation end tags for the operations you are requesting.
Step 5 Enter the NETCONF operations end tags for the operations you are requesting.
Step 6 Enter a request end tag followed by the ]]>]]> end of message character sequence.
Use this procedure to manually send an XML document or message to the server.
Before beginning this procedure, you must know or do the following:
Step 1 Copy the XML message from the editor application.
Step 2 Paste the XML message into the active SSH session.
The XML message is sent to the XML server where it is parsed and carried out, and then a response indicating the result is returned to your client.
This section provides the following examples of XML messages.
You can include multiple NETCONF operations in a single XML message as long as all of the requests are for the same NETCONF operation.
The XML server ensures that all requests parse without errors before applying them. Any error causes the request to fail with a notification sent to you.
This example shows two NETCONF get operations representing 2 CLI commands formatted in a single XML message.
The following are the CLI commands that are required in the XML request message.
The following is the XML request message representing the required CLI commands.
The following is the RPC reply sent from the XML server after parsing and carrying out the request from your client.
Note The XML server may send replies in a different sequence than the requests were sent.
This example shows two NETCONF get operations representing one valid CLI command and one erroneous CLI command formatted in a single XML message.
The following are the CLI commands that are required in the XML request message.
The following is the XML request message representing the required CLI commands.
The following is the RPC reply sent from the XML server after parsing and carrying out the request from your client.
The following example shows the XML request message for creating a port profile.
The following are the CLI commands that are required in the XML request message.
The following example shows the XML message for the required commands.
The following example shows the NETCONF delete-config operation, which performs the equivalent of the write erase command on the startup configuration.
The following example shows the XML message for the required command.
The following is the XML server reply to the NETCONF message.
The following example shows the NETCONF close-session operation which closes your session with the XML server, also terminating the SSH session.
The following is the XML message for the NETCONF close-session operation.
The following is the XML server reply to the message.
The following example shows the NETCONF kill-session operation which terminates a server session other than your own.
The following is the XML message for the NETCONF kill-session operation.
The following is the XML server reply to the message.
This example shows a request for editing a configuration using the NETCONF edit-config operation.
The following are the CLI commands required in the message.
The following is the XML message with the NETCONF edit-config operation and the required CLI commands.
The following is the XML server reply to the message.
Table 3-1 lists the default SSH settings.
|
|
---|---|
For additional information related to implementing the XML management interface, see the following sections:
|
|
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
|
|
---|---|
Using the NETCONF Configuration Protocol over Secure Shell (SSH) |