Cisco CCNP Automation 350-901 Practice Test Questions and Exam Dumps Part17 Q321-340

View Full Cisco CCNP Automation 350-901 Exam Dumps and Practice Test Dumps.


Q321. An Ansible playbook must load different variable files depending on whether a router belongs to the branch or datacenter role. Which approach is most appropriate?

  1. Put all values directly into every task
    2. Create a separate Git repository for each device
    3. Disable variables and use only CLI commands
    4. Conditionally include the appropriate variable file based on the device role

Correct Answer: 4. Conditionally include the appropriate variable file based on the device role

Explanation: Conditional variable inclusion keeps role-specific values separate from reusable automation logic. An Ansible playbook can determine the device role from inventory or another trusted data source and load the appropriate variables for branch or data-center devices. This reduces duplication and makes the playbook easier to maintain as environments evolve. Hard-coding values directly into tasks mixes configuration data with execution logic and makes reuse difficult. Separate repositories for every device create unnecessary operational overhead. Well-structured Ansible projects separate inventory, variables, reusable roles, templates, and task logic wherever practical.

Q322. A Terraform configuration should fail early when its syntax and internal references are invalid, without contacting production infrastructure to make changes. Which command is most appropriate?

  1. terraform destroy
    2. terraform validate
    3. terraform apply -auto-approve
    4. terraform import

Correct Answer: 2. terraform validate

Explanation: terraform validate checks whether Terraform configuration files are syntactically valid and internally consistent. It can identify problems such as malformed expressions, invalid references, or structural errors before engineers proceed to planning or deployment. Validation does not prove that the configuration will produce the correct business outcome, nor does it replace terraform plan, provider-specific testing, or post-deployment checks. It is nevertheless a useful early CI/CD gate because inexpensive static validation can reject obviously invalid Infrastructure as Code before more expensive simulation or production-oriented stages are reached.

Q323. A RESTCONF client needs to retrieve data from a specific subtree without requesting unrelated branches of the YANG data model. Which design is most efficient?

  1. Target the most specific resource URI supported by the model
    2. Request the entire datastore for every query
    3. Use HTTP DELETE before GET
    4. Convert the YANG model to unstructured text first

Correct Answer: 1. Target the most specific resource URI supported by the model

Explanation: RESTCONF resources correspond to modeled data nodes, so clients should target the narrowest resource path that satisfies the workflow. Requesting only the required interface, routing instance, or configuration subtree reduces response size, parsing work, and unnecessary load on the device. Query parameters may further refine data where supported. Repeatedly retrieving the complete datastore is inefficient and can make automation slower at scale. DELETE modifies configuration rather than reducing GET scope. Model-driven automation is most effective when clients take advantage of YANG structure instead of treating the entire device configuration as one undifferentiated text document.

Q324. A Python script must create filesystem paths that work cleanly across supported operating systems without manually concatenating slash characters. Which standard-library feature is most appropriate?

  1. random.random()
    2. statistics.mean()
    3. pathlib.Path
    4. decimal.Decimal

Correct Answer: 3. pathlib.Path

Explanation: pathlib.Path provides an object-oriented interface for constructing, joining, inspecting, and manipulating filesystem paths. It handles operating-system-specific path conventions more cleanly than manually concatenating strings with / or \. This is useful in network automation projects that create rendered configuration files, pipeline artifacts, test results, or local caches. It also improves readability because path operations are explicit. File paths should still be validated when they originate from untrusted input, particularly when an application writes files based on API or user-provided values.

Q325. An API returns HTTP 400 Bad Request when a network automation client submits a configuration payload. What should the client investigate first?

  1. Whether the server needs more CPU
    2. Whether the request syntax, required fields, or supplied values are invalid
    3. Whether the Git repository has too many branches
    4. Whether the certificate is due to expire next year

Correct Answer: 2. Whether the request syntax, required fields, or supplied values are invalid

Explanation: HTTP 400 commonly indicates that the server considers the client’s request malformed or invalid. The automation developer should inspect the payload structure, required fields, field types, parameter names, URI, headers, and API documentation. Schema validation before submission can catch many of these errors earlier. A 400 response is generally different from authentication failures such as 401, authorization failures such as 403, rate limiting such as 429, or temporary server-side conditions such as 503. Correctly classifying response codes helps automation avoid pointless retries when the request itself must be corrected.

Q326. A Git remote branch was deleted from the central server, but the local repository still lists the obsolete remote-tracking reference. Which action is most appropriate?

  1. Reinitialize the entire repository
    2. Delete every local branch
    3. Force-push the obsolete branch back to the server
    4. Prune stale remote-tracking references during a fetch or remote cleanup

Correct Answer: 4. Prune stale remote-tracking references during a fetch or remote cleanup

Explanation: Git can retain remote-tracking references even after corresponding branches are deleted from the remote repository. Pruning removes these stale references so the local view more accurately reflects the server. This can be performed during an appropriately configured fetch or with remote-pruning operations. Pruning does not normally delete unrelated local development branches. Reinitializing the repository is unnecessary, and force-pushing a deleted branch could recreate something intentionally removed. Keeping repository references clean is useful in Infrastructure as Code projects where automation and CI rules may inspect branches or tags programmatically.

Q327. A CI pipeline should ensure that generated network configuration files conform to an approved schema before CML testing begins. Where should this check occur?

  1. In an early validation stage before resource-intensive integration testing
    2. Only after production deployment
    3. After deleting the generated files
    4. Only when an operator notices a failure manually

Correct Answer: 1. In an early validation stage before resource-intensive integration testing

Explanation: Cheap, deterministic validation should occur as early as possible in a CI/CD pipeline. Schema validation can detect missing fields, invalid data types, or unsupported structures before the workflow consumes CML resources or interacts with production devices. This shortens feedback time and reduces unnecessary infrastructure usage. Passing schema validation does not prove that a change is operationally correct, so later simulation, prevalidation, deployment, and post-validation remain necessary. Effective pipelines layer progressively more realistic checks while ensuring that simple defects are rejected before expensive stages begin.

Q328. A CML test proves that an automation script correctly configures ten routers. Before applying the script to 5,000 production devices, what additional concern should be evaluated?

  1. Only the color of the topology icons
    2. Whether the Git repository uses Markdown
    3. Scale-related behavior such as concurrency, controller capacity, execution time, and rate limits
    4. Whether the CML lab has a descriptive title

Correct Answer: 3. Scale-related behavior such as concurrency, controller capacity, execution time, and rate limits

Explanation: Functional correctness at small scale does not automatically prove safe behavior at enterprise scale. A workflow that handles ten devices correctly might overwhelm a controller, exhaust worker capacity, exceed API limits, or take too long when targeting thousands of devices. Engineers should test batching, concurrency, retries, memory usage, failure aggregation, and recovery behavior at representative scale. Simulation and staged deployment can help identify these limits. Automation architecture must consider both correctness and scalability because successful execution against a small lab does not guarantee acceptable behavior in a large production environment.

Q329. A telemetry pipeline receives events faster than the downstream database can store them. What architectural mechanism can help absorb temporary bursts without immediately dropping data?

  1. A buffered queue or message-broker layer
    2. A Git tag
    3. A TLS CSR
    4. A Terraform output

Correct Answer: 1. A buffered queue or message-broker layer

Explanation: A queue or message broker can decouple telemetry ingestion from downstream storage and provide temporary buffering when consumers cannot keep pace with producers. This can smooth bursts and allow storage workers to process data at a sustainable rate. Queue capacity, persistence, backpressure, and failure behavior must still be designed carefully because no buffer is unlimited. If downstream systems remain unavailable long enough, retention or dropping policies may eventually be required. Telemetry architectures should therefore consider not only collection rates but also how every downstream component behaves when ingestion exceeds processing capacity.

Q330. An automation service sends structured logs to a centralized platform. Which field is most useful for identifying which software release generated a particular error?

  1. Screen resolution
    2. Application version or build identifier
    3. User’s favorite editor
    4. Router chassis color

Correct Answer: 4. Application version or build identifier

Explanation: Including an application version, commit identifier, or immutable build ID in structured logs allows operators to correlate failures with a specific software release. This is especially useful when several automation versions are deployed simultaneously or during staged rollouts. Along with timestamps, correlation IDs, target devices, and operation names, version metadata makes troubleshooting faster and supports regression analysis. Logs should still avoid exposing credentials or sensitive payloads. Operational observability improves when every event carries enough structured context to identify not just what failed but also which code version produced the behavior.

Q331. A pyATS test validates that each branch router has exactly one default route pointing toward an approved next hop. Where should the list of approved next hops ideally come from?

  1. Random values generated during the test
    2. The authoritative network design or source of truth
    3. A hard-coded value unrelated to the site
    4. The latest user chat message

Correct Answer: 2. The authoritative network design or source of truth

Explanation: Validation is most meaningful when expected values originate from an authoritative design or source of truth. Different branches may have different approved next hops, so hard-coding one global value can generate false results. The test can retrieve site-specific expected state and compare it with structured routing information gathered from each router. This approach separates reusable validation logic from network intent data. It also makes changes easier to govern because the authoritative system defines what should exist, while pyATS verifies whether the operational network actually conforms to that intended state.

Q332. A Python automation service wants to prevent one slow API call from blocking a worker indefinitely. Besides setting a timeout, what behavior should be defined after the timeout occurs?

  1. Ignore the timeout and pretend the request succeeded
    2. Restart all target routers
    3. Handle the exception explicitly and follow a bounded retry or failure policy
    4. Disable logging

Correct Answer: 3. Handle the exception explicitly and follow a bounded retry or failure policy

Explanation: A timeout only defines when waiting stops; the application must also decide what to do afterward. For transient operations, a bounded retry with backoff may be appropriate. For non-retryable or repeatedly failing operations, the workflow should fail clearly, log useful context, and avoid continuing with invalid assumptions. Infinite retries can keep jobs stuck and overload unavailable services. Robust automation therefore combines timeouts with exception handling, retry classification, retry limits, and meaningful error reporting. This produces predictable failure behavior rather than simply moving the indefinite wait into another part of the workflow.

Q333. A Docker Compose environment must isolate a backend automation service so only a frontend service can communicate with it. Which design best supports this?

  1. Attach the backend and frontend to a private application network and avoid publishing the backend port externally
    2. Publish every backend port on all host interfaces
    3. Use host networking for every container
    4. Disable container networking completely

Correct Answer: 1. Attach the backend and frontend to a private application network and avoid publishing the backend port externally

Explanation: Docker networks allow services to communicate internally without exposing every service to external clients. The frontend and backend can share a private Compose network, while only the frontend’s required port is published on the host. This follows a basic network-segmentation principle by reducing unnecessary service exposure. Publishing backend ports broadly expands attack surface, while host networking reduces isolation. Container security should also include authentication, least privilege, image controls, secrets management, and TLS where appropriate. Network isolation is one useful layer rather than a replacement for application authorization.

Q334. A service certificate is valid and chains to a trusted CA, but its private key was copied to an unauthorized system. What action is most appropriate?

  1. Continue using the certificate until expiration
    2. Treat the key as compromised, revoke or replace the certificate, and deploy new key material
    3. Publish the key so all systems use the same copy
    4. Remove TLS from the service

Correct Answer: 3. Treat the key as compromised, revoke or replace the certificate, and deploy new key material

Explanation: Once a private key is exposed to an unauthorized party, the associated identity can no longer be trusted safely. The organization should replace the key pair and certificate and use the appropriate revocation mechanism so clients can learn that the compromised certificate should no longer be accepted. Investigators should also determine how the key was exposed and strengthen storage or access controls. Waiting for normal expiration extends the impersonation risk. Private-key protection is fundamental to PKI because a valid certificate cannot provide trustworthy identity when its corresponding secret key is compromised.

Q335. An organization tests an AI network assistant on 200 scenarios and finds that it sometimes recommends changes even when no remediation is required. Which evaluation metric would directly measure this behavior?

  1. False-positive rate
    2. GPU fan speed
    3. Git repository size
    4. TLS handshake duration only

Correct Answer: 1. False-positive rate

Explanation: A false positive occurs when a system identifies a condition or recommends an action even though the triggering condition is not actually present. In network automation, excessive false-positive remediation recommendations can waste operator time or become dangerous if actions are automated. Evaluation should therefore measure not only overall accuracy but also error types such as false positives and false negatives. The acceptable balance depends on the use case and consequence of each error. AI evaluation should use representative labeled scenarios and should inform how much autonomy, review, and deterministic validation the system receives.

Q336. A retrieval-augmented AI assistant indexes current configuration standards and obsolete archived standards. Which metadata should be used to prevent archived documents from being treated as current policy?

  1. Only document word count
    2. Lifecycle or approval status together with version and freshness information
    3. Random vector identifiers
    4. File-name length only

Correct Answer: 2. Lifecycle or approval status together with version and freshness information

Explanation: Semantic similarity alone cannot determine whether a document is currently authoritative. Retrieval systems should preserve metadata describing version, effective date, approval status, owner, and lifecycle state so archived or superseded standards can be excluded or ranked appropriately. This prevents an AI assistant from grounding recommendations in technically relevant but outdated instructions. Provenance also allows operators to verify why a source was selected. For network automation, stale documentation can be particularly harmful because it may describe retired addressing, routing policies, or automation interfaces that no longer apply to the production environment.

Q337. An MCP tool modifies network configuration. The same tool request might be retried after a temporary connection failure. Which property makes retries safer?

  1. Idempotent operation design
    2. Anonymous administrator access
    3. Unlimited recursion
    4. Disabled logging

Correct Answer: 1. Idempotent operation design

Explanation: An idempotent tool is designed so repeated execution of the same logical request converges on the same intended state rather than creating duplicate or compounding changes. This is especially useful when an AI agent or orchestration layer retries a tool call because the previous response was lost or timed out. The tool can check current state or use a unique operation identifier before applying changes. Idempotency does not remove the need for authorization, scope validation, or audit logs, but it reduces the operational risk associated with uncertain delivery and retry behavior.

Q338. An AI agent is allowed to query thousands of devices. Which control helps prevent one prompt from consuming excessive controller resources?

  1. Give the agent unlimited parallel access
    2. Remove query limits
    3. Enforce quotas, concurrency limits, and bounded query scope at the tool layer
    4. Increase model creativity

Correct Answer: 3. Enforce quotas, concurrency limits, and bounded query scope at the tool layer

Explanation: Resource controls should be enforced outside the model because an LLM may generate overly broad or inefficient requests. The tool or API layer can limit how many devices are queried, how many requests may run concurrently, and how frequently the agent can invoke expensive operations. These controls protect controllers, network devices, and telemetry systems from accidental or malicious overload. The agent can still explain that a query exceeded policy and ask the user to narrow the scope. Deterministic capacity controls are an important part of safely connecting conversational AI to production infrastructure.

Q339. A model recommends changing a BGP policy and provides a detailed explanation, but the generated configuration fails a deterministic policy-as-code rule. What should happen?

  1. The model explanation should override the rule automatically
    2. The rule should be deleted because AI generated the change
    3. The configuration should be deployed and reviewed afterward
    4. The change should be blocked until it satisfies or formally passes the deterministic policy process

Correct Answer: 4. The change should be blocked until it satisfies or formally passes the deterministic policy process

Explanation: Deterministic policy enforcement provides a stronger control boundary than natural-language reasoning from an LLM. If generated configuration violates an approved policy rule, the workflow should block deployment and require correction or an authorized exception process. The model can help explain the violation or produce a revised configuration, but it should not bypass established infrastructure controls. This pattern makes AI an assistant inside the automation lifecycle rather than the ultimate authority. High-impact network changes should remain governed by explicit policy, authorization, validation, and post-change verification.

Q340. An organization wants to compare two versions of an AI network assistant fairly. Which experimental design is strongest?

  1. Give each version unrelated test questions
    2. Use the same representative held-out evaluation set and predefined scoring criteria for both versions
    3. Ask only the developers which one feels better
    4. Select the version that produces the longest answers

Correct Answer: 2. Use the same representative held-out evaluation set and predefined scoring criteria for both versions

Explanation: A fair comparison requires both AI systems to be evaluated against the same representative scenarios under comparable conditions. Predefined scoring criteria can measure technical accuracy, unsafe recommendations, tool-selection correctness, latency, and other relevant qualities. A held-out set reduces the risk that the evaluation merely repeats examples used while tuning the system. Subjective impressions and different test sets make comparisons unreliable. Since AUTOCOR includes evaluation of AI recommendations, automation teams should use disciplined measurement rather than assuming a newer model or longer answer is necessarily better.