3

I have a few questions about SmartConnect and pyvmomi please.

1) Where can I find good explanation to the use of smartconnect?

2) What does this function do: "RetrieveContent" after connecting to a VM:

def enable_ssh(vc_ip, vc_user="administrator@vsphere.local", vc_password="Kashya123!"):
    try:
        si = SmartConnect(host=vc_ip, port=443, user=vc_user, pwd=vc_password)
        content = si.RetrieveContent()
        cluster_list = content.rootFolder.childEntity

3) What does this line do?

 cluster_list = content.rootFolder.childEntity

Thanks a lot :)

Trooper Z
  • 1,617
  • 14
  • 31
Ofer
  • 25
  • 1
  • 1
  • 7

0 Answers0