Timedora
Free Online Flashcard Deck

4 Network Automation with Python Free Online FlashCards

Study 4 Network Automation with Python with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

How should a network automation script separate its main concerns?

Back

Keep device inventories and desired values in structured data, reusable operations in functions, and device communication in a network library or API client.

02
Front

What is the safe sequence for a configuration automation workflow?

Back

Validate inputs, connect securely, read current state, calculate and review a change, apply it deliberately, verify live state, then record the outcome and clean up.

03
Front

What is the NAPALM candidate configuration workflow?

Back

Load a candidate, review it with `compare_config()`, then commit it or discard it. Support and exact behavior vary by platform and driver.

04
Front

How should automation handle slow or temporarily unreachable devices?

Back

Set timeouts so an unresponsive device cannot make the script wait indefinitely. Bound retries and retry only errors likely to be temporary.

05
Front

Why should automation scripts catch specific exceptions?

Back

Catch expected failures with specific exception handling where practical, so known problems are managed without hiding unrelated errors.

06
Front

How can Python validate IPv4 or IPv6 management addresses?

Back

The standard-library `ipaddress` module parses IPv4 and IPv6 addresses and raises an error for invalid input, making it useful for validating management addresses.

07
Front

How does comparing current and desired state make automation safer to rerun?

Back

Compare current state with desired state and skip changes when a device already complies. This helps make reruns idempotent.

08
Front

Why review a diff or plan before applying a network change?

Back

Produce a diff or plan and use a dry run or explicit approval before consequential changes. This makes the proposed change reviewable before it is applied.

09
Front

Why check whether a configuration operation merges or replaces?

Back

A replacement operation can affect more configuration than intended. Understand whether the device or library merges or replaces configuration before applying a change.

10
Front

How should an automation script protect device credentials?

Back

Read credentials from a protected environment or approved secrets manager instead of embedding passwords in source code or committing them to version control.

11
Front

What does post-change state validation establish?

Back

Check operational state after applying the change. A successful configuration command or commit alone does not prove the device is operating as intended.

12
Front

How should a script clean up device sessions and unapplied candidates?

Back

Use a `finally` block or supported context manager to close sessions even when an error occurs; discard any loaded candidate that remains unapplied.