JN0-423 Automation and DevOps, Specialist (JNCIS-DevOps) Practice Questions
Prepare for JN0-423 with more than an answer.
- Exam fee
- $300 USD
- Level
- Specialist
- Valid for
- 3 years
Domains covered on the exam 5
- Platform Automation Overview20%
- gRPC20%
- Ansible20%
- Junos Automation Scripts20%
- YANG20%
- 1
An automation script needs to retrieve the entire running configuration from a Junos device and parse it as structured XML data. Which Junos PyEZ RPC method is the most direct and appropriate way to accomplish this?
Show answer details
Correct answer: B
The
dev.rpc.get_config()method in PyEZ directly executes theNETCONF RPC. This RPC returns the complete running configuration as structured XML (specifically, an lxml object), which is ideal for programmatic parsing and analysis. Usingdev.cli()would return unstructured text, which is much harder to work with in an automation script. - 2
When using gNMIc to interact with a Junos device, what is the purpose of the
-encodingflag?Show answer details
Correct answer: B
The
-encodingflag in gNMIc specifies how the data values in gNMI messages are encoded. Common options includeJSON(for human-readable JSON),JSON_IETF(for IETF-compliant JSON),BYTES(for raw bytes), andPROTO(for serialized Protocol Buffers). This flag is crucial for ensuring the client and server agree on the data format. - 3
What is the primary function of the
apply-macrofeature in Junos commit scripts?Show answer details
Correct answer: C
apply-macroallows an administrator to define a macro in the configuration that takes parameters. A commit script can then be used to expand this macro into a full set of transient configuration stanzas during the commit process. This is a powerful way to create configuration templates and simplify repetitive configurations, as the script dynamically generates the final configuration that gets applied. - 4
A YANG module needs to be extended to include vendor-specific parameters without modifying the original base module. Which YANG keyword allows for adding new nodes into a data model defined in a different module?
Show answer details
Correct answer: C
The
augmentstatement is specifically designed to add new schema nodes to a target node defined elsewhere (often in an imported module). This allows developers to extend existing standard or base models with proprietary or custom additions without altering the source model, promoting modularity and interoperability. - 5
You are debugging a Terraform plan for a Junos device. The plan fails with an authentication error, but you are certain the credentials are correct. You suspect that Terraform is not using the specified private key file for SSH authentication. Which environment variable can you set to enable detailed logging for the Terraform Juniper provider to see the underlying SSH connection details?
Show answer details
Correct answer: C
Setting the environment variable
TF_LOG=TRACEenables the most verbose level of logging for both Terraform Core and all providers. This detailed output will include the specific actions taken by the Juniper provider, such as the exact SSH commands being executed and the parameters being passed, which is invaluable for troubleshooting connection and authentication issues. - 6
An automation engineer is developing a Junos event script to automatically disable an interface upon receiving a specific BGP notification log message. The script is written in Python and uses the
jcs.invoke()function to execute theset interfaces disablecommand. During testing, the event policy triggers the script correctly, but the interface is not disabled. What is the most likely cause of this issue?Show answer details
Correct answer: C
Event scripts execute in an environment that does not have an open configuration session by default. To make a configuration change, the script must explicitly open a database connection (e.g., using
Junos_Context['user-context']['jcs:open']), load the configuration change, and then commit it. Simply invoking asetcommand does not alter the persistent configuration. - 7
A DevOps team is using the TIG stack (Telegraf, InfluxDB, Grafana) to monitor Junos devices via gNMI. They have configured a sensor path
/interfaces/interface[name='ge-0/0/0']/state/counters/to stream all counters for a specific interface. However, they only want to receive updates for thein-octetsandout-octetscounters to reduce the load on the telemetry collector. Which gNMI mechanism should be used to achieve this selective data streaming?Show answer details
Correct answer: B
The correct way to subscribe to specific data points is to list each full sensor path in the gNMI
SubscribeRPC. Instead of using a wildcard path like/interfaces/interface[name='ge-0/0/0']/state/counters/, the client should request/interfaces/interface[name='ge-0/0/0']/state/counters/in-octetsand/interfaces/interface[name='ge-0/0/0']/state/counters/out-octetsexplicitly. This ensures the device only streams the requested data, which is the most efficient method. - 8
When defining a custom YANG module, which statement correctly describes the purpose and relationship between the
groupinganduseskeywords?Show answer details
Correct answer: C
In YANG,
groupingis used to define a collection of nodes (containers, lists, leaves) that can be reused in multiple places. It acts like a template or a macro. Theusesstatement then references agroupingto place that defined block of nodes into the current position in the schema tree. This promotes modularity and avoids repetition in the data model. - 9
A network engineer is using Terraform to manage a fleet of Junos devices. They need to ensure that a specific BGP peer configuration is applied to a group of routers defined in the Terraform configuration. Which components are essential for this task? (Select TWO).
Show answer details
Correct answer: A, C
The
providerblock is essential as it tells Terraform how to interact with the target API. For Junos devices, thejuniper/junosprovider must be declared and configured with connection details like the host and credentials.A
resourceblock defines a piece of infrastructure. To apply configuration, a resource likejunos_config_setorjunos_config_objectis used to specify the desired Junos configuration insetcommand format or another structured format. - 10
A developer is writing a Junos commit script in SLAX to prevent configurations where a logical interface (unit) is assigned to a VLAN that is not defined under the
[edit vlans]hierarchy. Which type of change does the script need to analyze to perform this validation?Show answer details
Correct answer: C
Commit scripts operate on the candidate configuration after it has been merged with the running configuration but before it is validated by the system. The script should parse this post-inheritance candidate configuration to check for the logical inconsistency between the interface's VLAN membership and the defined VLANs.
