On 12/31/10 - 04:14:15PM, Adrian Cole wrote: > Hi, team. > > In the docs (and rackspace driver), I've noticed the states: > * :begin > * :pending > * :running > * :shutting_down > * :stopped > * :end > > However, in the mock driver, the states are: > * :start > * :pending > * :running > * :stopped > * :finish > > Which states are correct?
It is actually a very confusing issue, one that I've been hoping to get resolved and haven't yet. There are actually two notion of state in the deltacloud drivers; the backend states that an instance can go through, and the frontend states that we expose to the user. At present, we only expose PENDING, RUNNING, and TERMINATED as frontend states (though we also want to expose STOPPED pretty soon). The backend state machine is a reflection of what can go on in the actual cloud. For instance, an EC2 instance might go pending->running->shutting_down->terminated (states returned from EC2 itself), but we only expose PENDING, RUNNING, and TERMINATED to the front-end. In the end, there is not really a problem exposing new states to the frontend user, but it has to be done in a way that is consistent across all of the drivers. Otherwise you create a situation where a client cannot generically use the deltacloud APIs. -- Chris Lalancette
