哪些步骤将重现该问题?
1.尝试使用 instance.get_attribute('kernel') 获取正在运行的 EBS 支持的实例的内核属性
>>> import boto.ec2
>>> regions = boto.ec2.regions()
>>> regions
[RegionInfo:eu-west-1, RegionInfo:us-east-1, RegionInfo:us-west-1, RegionInfo:ap-southeast-1]
>>> usw = regions[2]
>>> conn = usw.connect()
>>> reservations = conn.get_all_instances()
>>> reservations
[Reservation:r-XXXXXXXX]
>>> r1 = reservations[0]
>>> for i in r1.instances: print i
...
Instance:i-XXXXXXXX
>>> instance = r1.instances[0]
>>> instance.get_attribute('kernel')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/boto/ec2/instance.py", line 293, in get_attribute
return self.connection.describe_attribute(self.id, attribute)
AttributeError: 'EC2Connection' object has no attribute 'describe_attribute'
>>>
什么是预期的输出?你看到了什么呢?
期望得到属性,但得到这个错误:AttributeError: 'EC2Connection' object has no attribute 'describe_attribute'
您使用的是什么版本的产品?在什么操作系统上?
boto.Version == Mac OS X 10.5 上的 2.0b3(使用 pip 安装 boto)
请在下面提供任何附加信息。
github repo 上的代码似乎也表明没有 describe_attribute
https://github.com/boto/boto/blob/master/boto/ec2/connection.py