• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 94 pages
Exam (elaborations)

WGU D522 Task 1 Performance Assessment | Python Network Automation, Device Inventory, Connectivity & DNS Compromise Audit | Complete 2026 Guide

Document preview thumbnail
Preview 4 out of 94 pages

WGU D522 Task 1 Performance Assessment complete study guide for 2026. Covers Python network automation, device inventory validation, connectivity testing with timeouts, and DNS compromise audit against approved baselines. Includes CSV parsing, subprocess execution, Paramiko SSH, resolvectl parsing, error handling, logging, GitLab workflow, and evidence documentation. Ideal for Task 1 PA preparation. Not a substitute for official WGU materials.

Content preview

1|Page




WGU D522 Task 1 Performance
Assessment | Python Network
Automation, Device Inventory,
Connectivity & DNS Compromise
Audit | Complete 2026 Guide



WGU D522 Task 1 Performance Assessment complete
study guide for 2026. Covers Python network
automation, device inventory validation, connectivity
testing with timeouts, and DNS compromise audit
against approved baselines. Includes CSV parsing,
subprocess execution, Paramiko SSH, resolvectl parsing,
error handling, logging, GitLab workflow, and evidence
documentation. Ideal for Task 1 PA preparation. Not a
substitute for official WGU materials.




Q1. What is the primary purpose of a device inventory in network automation?

,2|Page


A. To physically label network devices
B. To maintain a structured record of network assets and their attributes
C. To replace network monitoring tools
D. To encrypt device configurations

Answer: B

Rationale: A device inventory serves as a centralized, structured record
containing device names, IP addresses, ports, credentials, and other attributes
needed for automation workflows. It does not replace monitoring tools, encrypt
configurations, or involve physical labeling. Accurate inventory data is
foundational because every subsequent automation task—connectivity checks,
configuration audits, DNS validation—depends on knowing which devices exist
and how to reach them.




Q2. Which Python module is best suited for reading a CSV device inventory file?

A. json
B. csv
C. xml.etree
D. pickle

Answer: B

Rationale: The csv module is purpose-built for reading and writing comma-
separated value files, which is the standard format for device inventory lists in
network automation. It provides DictReader and DictWriter classes that map
rows to dictionaries, simplifying field access. The json module handles JSON,
xml.etree handles XML, and pickle handles Python object serialization—none of
these are designed for CSV parsing.




Q3. In Python's csv.DictReader, what does each row become?

A. A tuple of values
B. A list of strings
C. A dictionary keyed by column headers
D. A namedtuple with fixed fields

Answer: C

,3|Page


Rationale: DictReader treats the first row of the CSV as field names and returns
each subsequent row as a dictionary where keys are the column headers and
values are the corresponding cell contents. This makes the code more readable
and resilient to column reordering compared to using csv.reader, which returns
plain lists. Namedtuples and tuples are not returned by DictReader.




Q4. Why should a port field from a CSV be converted to an integer before use?

A. CSV files cannot store numeric values
B. Socket and connection libraries expect an integer port number
C. Integer conversion encrypts the port value
D. It reduces file size

Answer: B

Rationale: When CSV data is read, all values arrive as strings. Python's socket
library and libraries like Paramiko require port numbers as integers, not strings.
Failing to convert will raise a TypeError when the port is passed to connection
functions. Conversion has nothing to do with encryption or file size; it is a type-
correctness requirement.




Q5. What exception should be caught when converting a CSV string to an integer
port?

A. IndexError
B. KeyError
C. ValueError
D. TypeError

Answer: C

Rationale: int() raises ValueError when the string cannot be parsed as a number,
such as "abc" or an empty string. KeyError occurs when a dictionary key is
missing, IndexError when a list index is out of range, and TypeError when an
incompatible type is passed to an operation. Catching ValueError allows the
script to report a clear, row-specific validation error.

, 4|Page


Q6. What is the risk of not validating inventory records before using them?

A. The script will run faster than expected
B. Invalid records can cause runtime exceptions that halt the audit
C. The CSV file will be deleted
D. DNS servers will change automatically

Answer: B

Rationale: If malformed records—such as non-numeric ports, empty hostnames,
or missing fields—are passed directly into connection functions, the script will
raise unhandled exceptions and terminate. Validating each record up front lets
the script skip or flag bad entries while continuing the audit for valid devices.
Validation does not affect speed positively, delete files, or alter DNS
configuration.




Q7. Which data structure is most appropriate for storing a collection of device
dictionaries?

A. A single string
B. A list of dictionaries
C. A set of integers
D. A tuple of booleans

Answer: B

Rationale: A list of dictionaries is the natural Python structure for a collection of
records where each record has named fields. Lists preserve order and allow
iteration, while dictionaries provide key-based access to each device's
attributes. Strings, sets of integers, and tuples of booleans cannot represent
multi-field records.




Q8. What does the newline="" argument accomplish when opening a CSV file?

A. It removes all newlines from the file
B. It prevents newline translation issues on different platforms
C. It converts the file to binary mode
D. It appends a newline to every row

Document information

Uploaded on
September 16, 2026
Number of pages
94
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$25.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GradeGlide
3.8
(5)
Sold
30
Followers
3
Items
726
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions