300-535 practice question 10 of 15

Which two commands generate a template using Cisco NSO to build a service package? (Choose two.)

Full set: 60 questions
Answer options
A: show running-config devices device ce-ios config ios:interface Loopback 0 | display template.xml
B: show running-config devices device ce-ios config ios:interface Loopback 0 | display xml | save template.xml Correct answer
C: request running-config devices device ce-ios config ios:interface Loopback 0 | display xml
D: show running-config devices device ce-ios config ios:interface Loopback 0
E: show running-config devices device ce-ios config ios:interface Loopback 0 | display xml Correct answer
Correct Answer:
B. show running-config devices device ce-ios config ios:interface Loopback 0 | display xml | save template.xml; E. show running-config devices device ce-ios config ios:interface Loopback 0 | display xml
Explanation

To create a service template in Cisco NSO, the device configuration must be represented in XML format. The NSO CLI command show running-config is used to view the configuration of a managed device as it exists in NSO's Configuration Database (CDB). The | display xml modifier formats this output into the required XML structure. This generated XML can either be displayed directly in the CLI (Option E) to be copied manually or saved directly to a file using the | save pipe (Option B). Both commands effectively generate the necessary template content from a live device configuration.

Why Incorrect

A. display template.xml is not a valid NSO CLI modifier. The correct modifier to generate the XML output is display xml.
C. The request command is used to execute actions or RPCs, not to display configuration from the CDB. The correct command is show.
D. This command displays the configuration in a native or tree format, not the XML format required for an NSO service template.

References

1. Cisco NSO 6.0 Developing and Operating Services Guide, Chapter: Creating a Service, Section: Creating a Template-Based Service: This guide details the workflow for creating a service from a template. It explicitly demonstrates using the show running-config devices device config ... | display xml command to obtain the XML configuration snippet that forms the basis of the service template. This supports option E.

2. Cisco NSO 6.0 CLI Guide, Chapter: The CLI, Section: The Pipe Character: This section explains the usage of the pipe | character to process command output. It lists save as a valid command to save the preceding output to a file, which validates the command structure used in option B.

3. Cisco NSO 6.0 CLI Guide, Chapter: The CLI, Section: Displaying Data in Different Formats: This section documents the display modifier and lists xml as a valid format option for commands like show running-config. This confirms the core syntax used in both correct options (B and E) and invalidates the syntax in option A.

Scroll to Top