Specified instance was not found
Persistable container for a list of VM objects.
Holds a list of all VM IDs of inserted VMs, and a cache of the actual VM objects. If information about a VM is requested, which is not currently in the cache, a request is made to the cloud provider API (through the conn object passed to the constructor) to get that information.
VMPoollooks like a mixture of the set and dict interfaces:
VMs are added to the container using the add_vm method:
| >>> vmpool.add_vm(vm1)
(There is no dictionary-like
D[x]=ysetter syntax, though, as that would require spelling out the VM ID.)
VMs can be removed via the remove_vm method or the del syntax; in both cases it’s the VM ID that must be passed:
| >>> vmpool.remove_vm(vm1) | >>> del vmpool[vm1]
Iterating over a
VMPoolinstance returns the VM IDs.
Other sequence methods work as expected: the VM info can be accessed with the usual
lookup syntax from its ID, the
VMPoolobject is the total number of VM IDs registered, etc..
Add a VM object to the list of VMs.
Return list of all known VMs.
Return the VM object with id vm_id.
If it is found in the local cache, that object is returned. Otherwise a new VM object is searched for in the EC2 endpoint.
Populate list of VM IDs from the data saved on disk.
Remove VM with id vm_id from the list of known VMs. No connection to the EC2 endpoint is performed.
Ensure all VM IDs will be found by the next load() call.
Synchronize list of VM IDs with contents of disk storage.
If optional argument remove is true, then remove VMs whose ID is no longer present in the on-disk storage.