Option A correctly creates a handle instance using the UcsHandle class from the UCS SDK in Python. The correct instantiation requires providing the IP address, username, password, port number, and secure connection parameters as per the documented API.
The correct code snippet is:
from ucsmsdk.ucshandle import UcsHandle
handle = UcsHandle("10.1.2.254", "admin", "password", port="443", secure=True)
This snippet matches the API documentation requirements:
ip: The IP or hostname of the UCS Server.
username: The username as configured on the UCS Server.
password: The password as configured on the UCS Server.
port: The port number to be used during the connection.
secure: True for a secure connection.
References:
UCS Python SDK Documentation (provides details on how to use UcsHandle)
Cisco DevNet Associate Exam Topics: Infrastructure and Automation (understanding how to use APIs and SDKs for automation)
========================