JN0-222 Sample Questions

JN0-222 Sample Questions & Answers

Free JNCIA-DevOps practice questions with worked answers and explanations. See how the ExamJungle simulator prepares you — then jump into the full test.

Launch the full JN0-222 simulator →

Showing 6 of 12 free samples.

  1. Question 1Intermediate

    DevOps Concepts · CI/CD Pipelines

    A DevOps engineer is designing a CI/CD pipeline for network configuration management. The pipeline must support a 'Shift Left' approach to testing. Which activity belongs in the earliest stage of this pipeline?

    flowchart LR A[Developer Commit] --> B[Stage 1] B --> C[Stage 2] C --> D[Stage 3] D --> E[Production Deploy]
    Show answer & explanation

    Correct answer: B

    Shift Left means moving testing as early in the development lifecycle as possible. Syntax checking, linting (e.g., YAML validation), and static code analysis are the very first steps (Stage 1) that can be done immediately after a commit, before any deployment to a lab or production environment.

  2. Question 2Intermediate

    Python · PyEZ Tables and Views

    You are writing a Python script using the Juniper PyEZ library to gather hardware information. You need to access the operational state of the device, specifically the chassis inventory. Which PyEZ component provides a structured, Pythonic way to retrieve this specific operational data without parsing raw XML manually?

    Show answer & explanation

    Correct answer: D

    PyEZ Tables and Views allow you to map XML output from operational commands (like get-chassis-inventory) into structured Python objects (dictionaries/lists). This abstracts away the complexity of parsing XML directly.

  3. Question 3Beginner

    Data Serialization · JSON Syntax

    Which of the following JSON objects correctly represents a list of two interfaces, where the list is the value for the key 'interfaces'?

    Show answer & explanation

    Correct answer: B

    In JSON, square brackets [] denote a list (array), and curly braces {} denote an object (dictionary). The key "interfaces" must be a string in double quotes, followed by a colon, and then the list of values.

  4. Question 4IntermediateSelect 2

    Junos Automation Stack · REST API Authentication

    Select TWO valid methods to authenticate a REST API request against a Juniper device running Junos OS.

    Show answer & explanation

    Correct answers: A, B

    Junos REST API supports HTTP Basic Authentication where credentials are sent in the Authorization header. It also supports cookie-based authentication after a successful login to /rpc/.

    Once authenticated, the server can issue a session cookie which can be passed in subsequent requests to maintain the session state.

  5. Question 5Intermediate

    Junos XML API · NETCONF Operations

    In the context of the Junos XML API, which NETCONF operation is used to retrieve the configuration data from the candidate or running datastore?

    Show answer & explanation

    Correct answer: A

    is the specific NETCONF operation to retrieve configuration data. retrieves both configuration and state (operational) data. is for changing configuration.

  6. Question 6Beginner

    Python · Exception Handling

    A developer is writing a Python script to automate the configuration of a Juniper device. They need to ensure that the script can handle potential network interruptions gracefully. Which Python block structure is best suited for catching and managing connection exceptions?

    flowchart TD Try[Try Block: Attempt Connection] --> Success{Success?} Success -- Yes --> Proceed[Proceed with Script] Success -- No --> Catch[Catch Block: Handle Error] Catch --> Finally[Finally Block: Cleanup] Proceed --> Finally
    Show answer & explanation

    Correct answer: D

    The try, except, and finally blocks in Python are specifically designed for exception handling. Code that might raise an error is placed in try, error handling logic in except, and cleanup code (like closing connections) in finally.

Ready for the real thing?

The full JN0-222 simulator has every exam-style question, timed mode, and instant scoring.