Am 12.06.2012 00:05, schrieb Anthony Liguori: > To me, realized represents Vcc. When realized=true, the guest has power and > is > active. When realized=false, the guest has lost power. The realize() event > is > the rising edge of Vcc, unrealized() is the falling edge. > > realize() should be used to take any actions that require all parameters to > be > set that need to happen before the guest has power. This later clause is > extremely important. unrealize() should be used to unset anything setup in > realize().
The one thing I'm really unsure about is whether you're combining two different things into one concept: This Vcc concept and Andreas' OOP concept (which is btw the same as I understood realize before we discussed yesterday on IRC - I guess you must have explained it as such at some point). Is it really always the power-on event that causes the final check of properties, setup of device state and makes some properties read-only? Or is that just a coincidence and happens to be true only with some devices? > The destructor being invoked does not imply that unrealize() has happened. Which makes some sense in your Vcc model, but doesn't at all in the OOP concept model. Kevin