nerdexam
Cisco

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…

Understanding and Using APIs

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

200-901 question #92 exhibit 1
200-901 question #92 exhibit 2
200-901 question #92 exhibit 3
200-901 question #92 exhibit 4
200-901 question #92 exhibit 5

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)
  • A
    7% (3)
  • B
    89% (39)
  • C
    2% (1)
  • D
    2% (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

#Python Class Instantiation#API Interaction#SDK Usage#Cisco UCS

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice