我有几个关于 SmartConnect 和 pyvmomi 的问题。
1)我在哪里可以找到很好的解释使用smartconnect
?
2) 这个函数有什么作用: "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)这条线是做什么的?
cluster_list = content.rootFolder.childEntity
非常感谢 :)