简体   繁体   English

libcloud和vSphere集成中的错误

[英]Error in libcloud and vsphere integration

I am using libcloud 1.2.1 with pysphere 0.1.7. 我正在将pycloud 0.1.7与libcloud 1.2.1一起使用。 I am getting the below error when trying to connect to the ESXi host. 尝试连接到ESXi主机时出现以下错误。

Traceback (most recent call last):
File "", line 1, in 
File "/Library/Python/2.7/site-packages/libcloud/compute/drivers/vsphere.py", line 152, in init
port=port, url=url)
File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 1177, in init
self.connection = self.connectionCls(args, *conn_kwargs)
TypeError: init() got an unexpected keyword argument 'retry_delay'

I am using the below commands to connect to the host. 我正在使用以下命令连接到主机。

from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
vsphere = get_driver(Provider.VSPHERE)
driver = vsphere(host='',username='username',password='password')

I can do this using pysphere only but not with libcloud. 我只能使用pysphere进行此操作,而不能使用libcloud进行此操作。 Tried looking on the internet and changing the content of the libraries but in vain. 尝试浏览互联网并更改图书馆内容,但徒劳无功。 Can anyone help ? 有人可以帮忙吗?

This is a bug in v1.5.0<, there is a committed fix. 这是v1.5.0 <中的错误,有一个已提交的修复程序。 You can apply the patch manually using git am : https://patch-diff.githubusercontent.com/raw/apache/libcloud/pull/967.patch 您可以使用git am手动应用补丁: https : //patch-diff.githubusercontent.com/raw/apache/libcloud/pull/967.patch

Wait for v1.6.0, or install directly from GitHub trunk 等待v1.6.0,或直接从GitHub干线安装

pip install git+https://github.com/apache/libcloud.git@trunk#egg=apache-libcloud

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM