0
我正在写一个蟒蛇脚本快照来检查我的所有正在运行的实例为EBS快照...地图AWS实例/卷与博托
rsv = self.botoEC2.get_all_instances()
for r in rsv:
ins = r.instances[0]
blockDevice = self.getInstanceAttribute(ins,"blockDeviceMapping")
print blockDevice
def getInstanceAttribute(self,instance,attribute):
return instance.get_attribute(attribute)
输出:
{u'blockDeviceMapping': {u'/dev/sda1': <boto.ec2.blockdevicemapping.BlockDeviceType object at 0x10d5faed0>}}
我是boto的新手。我在正确的道路上吗?
我需要先获得blockDeviceMapping
,然后调用音量函数吗?
如何获得实际卷ID,以便我可以检查现有快照?