Docsity

WGU D522 Task 2 Performance Assessment: Python Network Remediation, DNS Configuration, Sys, Exams of Public Health

Toggle sidebar
bg1
WGU D522 Task 2 Performance Assessment: Python
Network Remediation, DNS Configuration, System
Recovery & Validation 100-Question Full Exam with
Answers and Rationales
Section 1: Task 2 Overview and Core Objectives (Questions
1–10)
Question 1
What is the primary objective of Task 2 in the WGU D522 Performance Assessment?
A) To write a simple Python script that prints "Hello, World!"
B) To build an advanced automation solution integrating network monitoring, DNS
backup and remediation, helpdesk API, notifications, logging, and GitLab
C) To configure a single network router using Python
D) To create a static website using Flask
Correct Answer: B
Rationale: Task 2 requires students to build an advanced, integrated Python automation
solution combining multiple IT automation domains including network monitoring, DNS
backup and remediation, helpdesk API integration, notification systems, comprehensive
logging, and GitLab integration. Options A, C, and D represent simpler tasks that do not
meet the comprehensive requirements .
Question 2
Which of the following is NOT a component of the WGU D522 Performance
Assessment?
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download WGU D522 Task 2 Performance Assessment: Python Network Remediation, DNS Configuration, Sys and more Exams Public Health in PDF only on Docsity!

WGU D522 Task 2 Performance Assessment: Python

Network Remediation, DNS Configuration, System

Recovery & Validation 100 - Question Full Exam with

Answers and Rationales

Section 1: Task 2 Overview and Core Objectives (Questions

Question 1 What is the primary objective of Task 2 in the WGU D522 Performance Assessment? A) To write a simple Python script that prints "Hello, World!" B) To build an advanced automation solution integrating network monitoring, DNS backup and remediation, helpdesk API, notifications, logging, and GitLab C) To configure a single network router using Python D) To create a static website using Flask Correct Answer: B Rationale: Task 2 requires students to build an advanced, integrated Python automation solution combining multiple IT automation domains including network monitoring, DNS backup and remediation, helpdesk API integration, notification systems, comprehensive logging, and GitLab integration. Options A, C, and D represent simpler tasks that do not meet the comprehensive requirements. Question 2 Which of the following is NOT a component of the WGU D522 Performance Assessment?

A) Network device discovery B) DNS configuration audit C) Hardware installation D) Python scripting Correct Answer: C Rationale: The D522 Performance Assessment focuses on software-based network automation tasks including device discovery, DNS audit, and Python scripting, not physical hardware installation. Question 3 What does the term "remediation" refer to in the context of network automation? A) The process of identifying network devices B) The process of correcting or fixing misconfigurations or issues C) The process of generating network reports D) The process of installing new network equipment Correct Answer: B Rationale: Remediation involves correcting or fixing identified issues, such as misconfigured DNS settings, to restore proper network function. Question 4 Task 2 is described as a continuation of Task 1. What is the recommended approach for code reuse between the two tasks? A) Write completely new code from scratch for Task 2 B) Reuse the device and DNS logic from Task 1, adapting it for monitoring and remediation C) Copy Task 1 code exactly without modification D) Delete Task 1 code and start over Correct Answer: B Rationale: Recent passing students consistently describe Task 2 as a continuation of Task 1, reusing device and DNS logic, running it repeatedly as monitoring logic, and exercising failure states in the supplied lab.

Correct Answer: B Rationale: Task 2 requires running required checks repeatedly at the cadence specified by the live rubric while retaining structured state from each cycle. Question 8 What should be preserved when creating helpdesk records for unavailable devices? A) Only the device name B) The returned ticket identifiers C) Only the timestamp D) Nothing needs to be preserved Correct Answer: B Rationale: Task 2 requires creating the required helpdesk record(s) for unavailable devices and preserving returned ticket identifiers for audit and tracking purposes. Question 9 What is a key principle when capturing Task 2 evidence? A) Capture the entire desktop B) Capture only what the rubric requires with enough context to identify the application, branch/file, action, and result C) Use only terminal output D) Avoid captions Correct Answer: B Rationale: A screenshot should prove one specific claim. Capture only what the rubric requires but include enough context for an evaluator to identify the application, branch or file, action, and result.

Question 10 What does Task 2 evidence T2-E04 (Independent post-change read) need to demonstrate? A) Only that the change command executed B) A fresh read/query is performed after the change, observed altered value is visible, and evidence does not rely only on a write-command success message C) Only the write command D) Only the timestamp Correct Answer: B Rationale: T2-E04 requires a fresh read/query after the change, visible observed altered value, and evidence that does not rely only on a write-command success message. Target identity and timestamp/run context must be clear.

Section 2: Python Fundamentals for Network Automation

(Questions 11–25)

Question 11 Which Python data structure is most appropriate for storing network interface metrics that should not be modified after creation? A) List B) Dictionary C) Tuple D) Set Correct Answer: C Rationale: A tuple is an ordered, immutable sequence, making it ideal for representing a fixed set of metrics that should not be modified, ensuring data integrity for a snapshot record. Question 12 What is the correct way to handle exceptions in Python?

Question 15 What is the purpose of the Netmiko library in the context of D522? A) To establish Telnet connections B) To simplify SSH connections to network devices and execute commands C) To parse XML files D) To handle JSON data Correct Answer: B Rationale: Netmiko is a multi-vendor library that simplifies SSH connections to network devices, making it easier to send commands and retrieve output. Question 16 Which Python module is most commonly used for performing DNS queries and zone transfers? A) socket B) dnspython C) requests D) subprocess Correct Answer: B Rationale: The dnspython module is the most comprehensive and widely used library for DNS operations in Python automation. It supports all common record types (A, AAAA, MX, NS, TXT, CNAME, SOA) and provides advanced features like zone transfers. Question 17 What is the correct way to perform an A-record lookup for a domain using dnspython in modern versions? A) dns.resolver.query('example.com', 'A') B) dns.resolver.resolve('example.com', 'A') C) socket.gethostbyname('example.com') D) dns.query.A('example.com')

Correct Answer: B Rationale: In modern versions of dnspython, dns.resolver.resolve() is the recommended method. The older dns.resolver.query() method is deprecated. Question 18 Which of the following is a valid way to perform a DNS zone transfer using dnspython? A) dns.zone.from_xfr(dns.query.xfr(nameserver, domain)) B) dns.resolver.zone_transfer(domain, nameserver) C) dns.query.zone(domain, nameserver) D) dns.transfer.zone(domain, nameserver) Correct Answer: A Rationale: The correct way to perform a DNS zone transfer in dnspython is to use dns.query.xfr() to initiate the transfer and dns.zone.from_xfr() to parse the results. Question 19 What is the purpose of the strip() method in Python? A) To remove leading and trailing whitespace from a string B) To split a string into a list C) To replace characters in a string D) To convert a string to lowercase Correct Answer: A Rationale: The strip() method removes leading and trailing whitespace from a string. This is a common operation when processing user input or reading data from files. Question 20 Which file mode is used to append data to an existing file in Python? A) "r" B) "w"

A) To parse XML files B) To handle JSON data for API interactions and configuration C) To create network sockets D) To manage DNS queries Correct Answer: B Rationale: The json module is used for handling JSON data in D522 scripts, particularly for API interactions and configuration parsing. Question 24 Which Python module is used for making HTTP requests to the Helpdesk API? A) socket B) requests C) dns D) paramiko Correct Answer: B Rationale: The requests library is used for making HTTP requests to the Helpdesk API for ticket creation and management. Question 25 What is the correct way to iterate over a list in Python? A) for i in range(len(list)): B) for item in list: C) Both A and B are valid D) for i in list: Correct Answer: C Rationale: Both for i in range(len(list)) and for item in list are valid ways to iterate over a list. The most Pythonic way is for item in list:, but iterating by index is also common when the index is needed.

Section 3: Network Monitoring and Device Detection

(Questions 26–40)

Question 26 What is the first step in the Task 2 monitoring framework? A) Remediating DNS immediately B) Reading required configuration information from the supplied CSV C) Creating helpdesk tickets D) Sending email notifications Correct Answer: B Rationale: Task 2 requires reading the required configuration information from the supplied CSV and making it available to later monitoring functions before any monitoring or remediation begins. Question 27 What method should be used to identify required devices that are unavailable? A) The lab-approved reachability method B) Random selection C) Only checking DNS records D) Assuming all devices are available Correct Answer: A Rationale: Task 2 requires identifying required devices that are unavailable using the lab-approved reachability method. Question 28 What should be done when an unavailable device is detected? A) Ignore it and continue B) Create the required helpdesk record(s) and preserve returned ticket identifiers C) Immediately reboot the device D) Send an email only

A) open() with manual parsing B) csv.reader() or csv.DictReader() C) json.load() D) readlines() Correct Answer: B Rationale: The csv module provides csv.reader() and csv.DictReader() for reading CSV files, which is commonly used for configuration data in D. Question 32 What is the purpose of using try-except blocks in network monitoring scripts? A) To slow down the script B) To handle network failures, timeouts, and invalid responses gracefully C) To generate additional log entries D) To verify the device's DNS configuration Correct Answer: B Rationale: Error handling is critical in production scripts to prevent crashes and provide meaningful feedback. Network operations frequently encounter timeouts and connection failures that must be handled gracefully. Question 33 What logging level is used for confirming normal script operation and successful actions? A) DEBUG B) INFO C) WARNING D) ERROR Correct Answer: B Rationale: INFO log level is used for confirming normal script operation and successful actions, such as "DNS configuration remediated successfully on device X".

Question 34 What information should be included in a log entry for a DNS remediation task? A) Timestamp, device identifier, action taken, and result B) Only the timestamp C) Only the device identifier D) Only the result Correct Answer: A Rationale: Comprehensive log entries should include timestamp, device identifier, action taken, and result to enable effective troubleshooting and audit. Question 35 What is the purpose of creating a backup directory (/backup/network_configs) in the remediation script? A) To store temporary log files B) To save current network configuration files before making changes C) To install new software packages D) To store the Python script itself Correct Answer: B Rationale: Before applying remediation changes, the script checks if the backup directory exists and creates it if necessary, then copies all current configuration files to the backup location for rollback capability. Question 36 What function should be used to add data to a network configuration file in Python? A) read() B) write() C) append() D) add()

Question 39 What is the purpose of logging in the remediation script? A) To create a record of actions performed and their outcomes for audit and troubleshooting purposes B) To slow down the script execution C) To display messages to the user only D) To delete old log files Correct Answer: A Rationale: Logging provides a detailed record of script actions, errors, and successes, which is essential for auditing and troubleshooting remediation activities. Question 40 According to the decision table in the DNS audit script, when is a DNS configuration considered "VALID"? A) When no DNS servers are detected B) When the expected DNS appears in the parsed addresses C) When the device fails to respond to Telnet D) When the DNS servers are all IPv6 addresses Correct Answer: B Rationale: The DNS configuration is classified as "VALID" when the expected DNS IP address appears in the parsed addresses from the device.

Section 4: DNS Configuration and Remediation (Questions

Question 41 What does the classify_dns() function evaluate? A) Only the device hostname B) The parsed DNS addresses against the EXPECTED_DNS value and recognized failure markers

C) Only the timestamp D) Only the device IP address Correct Answer: B Rationale: The classify_dns() function evaluates the parsed DNS addresses against the EXPECTED_DNS value and recognized failure markers to determine if the DNS configuration is valid. Question 42 What is the correct approach for backing up DNS configuration before remediation? A) Skip backup to save time B) Save current network configuration files before making changes C) Only backup after changes are applied D) Backup is not required Correct Answer: B Rationale: Before applying remediation changes, the script should save current network configuration files to the backup location for rollback capability. Question 43 What DNS record type is used to map a domain name to an IPv4 address? A) AAAA B) A C) MX D) CNAME Correct Answer: B Rationale: An A record maps a domain name to an IPv4 address. AAAA records map to IPv6 addresses, MX records specify mail servers, and CNAME records create aliases.

Question 47 What is the correct method to verify DNS remediation was successful? A) Only checking the command output B) Performing a fresh read/query after the change to confirm the altered value C) Assuming success if no errors occurred D) Checking the log file only Correct Answer: B Rationale: T2-E04 requires a fresh read/query performed after the change, with the observed altered value visible. Evidence should not rely only on a write-command success message. Question 48 What should be documented before performing remediation? A) Only the target device B) Current task directions permit the selected change, target and approved altered value are confirmed, rollback/restoration method is documented, and scope is limited to the lab target C) Only the altered value D) Nothing needs to be documented Correct Answer: B Rationale: T2-E02 requires: current task directions permit the selected change; target and approved altered value are confirmed; rollback or restoration method is documented before change; and scope is limited to the lab target. Question 49 What Python library method is used to parse DNS zone transfer results? A) dns.query.parse() B) dns.zone.from_xfr()

C) dns.resolver.parse() D) dns.zone.read() Correct Answer: B Rationale: The dns.zone.from_xfr() method is used to parse the results of a DNS zone transfer initiated with dns.query.xfr(). Question 50 What is the primary purpose of DNS monitoring in Task 2? A) To slow down network performance B) To detect misconfigurations and ensure proper DNS resolution C) To replace DNS servers D) To create new domains Correct Answer: B Rationale: DNS monitoring in Task 2 is used to detect misconfigurations and ensure proper DNS resolution for network devices. Question 51 What is the recommended approach when DNS issues are detected on multiple devices? A) Remediate all simultaneously B) Remediate only affected devices and verify each one C) Ignore all but one device D) Reboot all devices Correct Answer: B Rationale: Task 2 requires remediating only affected devices and verifying the repaired state for each. Question 52 Which Python library is used for basic DNS lookups using the socket module?