Python 之 连接VCENTER
代码
#Author Kangimport sslimport pyspherefrom pysphere import VIServerssl._create_default_https_context = ssl._create_unverified_contexthost_ip = '10.3.152.88'username = 'zhoumingkang@xxxx.com'passwd = 'password'server = VIServer()server.connect(host_ip,username,passwd)print server.get_api_type()print server.get_api_version()server.disconnect()
#结果VirtualCenter6.5
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。