200-901 · Question #92
Refer to the exhibit. Given the API documentation for the UCS SDK Python class, Ucsl-landle, which code snippet creates a handle instance? A. B. C. D.
The correct answer is B. #!/usr/bin/env python3 from ucsmssdk.ucshandle import UcsHandle handle = UcsHandle(ip="10.1.2.254", username="admin", password="password", port=443, secure=True). According to the UcsHandle API documentation, the constructor accepts specific parameter types: ip (str), username (str), password (str), port (int), and secure (bool). Option B correctly uses keyword arguments with port=443 (integer) and secure=True (boolean). Option A is…
Question
Refer to the exhibit. Given the API documentation for the UCS SDK Python class, Ucsl-landle, which code snippet creates a handle instance? A. B. C. D.
Exhibits
Options
- A#!/usr/bin/env python3 from ucsmssdk.ucshandle import UcsHandle handle = UcsHandle("10.1.2.254", "admin", "password", port="443", secure=True)
- B#!/usr/bin/env python3 from ucsmssdk.ucshandle import UcsHandle handle = UcsHandle(ip="10.1.2.254", username="admin", password="password", port=443, secure=True)
- C#!/usr/bin/env python3 from ucsmssdk.ucshandle import UcsHandle handle = UcsHandle("10.1.2.254", "admin", "password", port="443", secure=1)
- D#!/usr/bin/env python3 import ucsmssdk.ucshandle handle = UcsHandle("10.1.2.254", "admin", "password", port=443, secure=1)
How the community answered
(44 responses)- A7% (3)
- B89% (39)
- C2% (1)
- D2% (1)
Explanation
According to the UcsHandle API documentation, the constructor accepts specific parameter types: ip (str), username (str), password (str), port (int), and secure (bool). Option B correctly uses keyword arguments with port=443 (integer) and secure=True (boolean). Option A is wrong because port='443' passes a string instead of an integer. Option C is wrong because secure=1 is an integer instead of a boolean (True). Option D is wrong because it uses import without 'from...import' syntax and also passes secure=1 instead of True.
Topics
Community Discussion
No community discussion yet for this question.




