>From an API consumer, it makes sense for me to implement this since it has not adverse effects to enable/disable something already in that state.
Thanks, Darren. On 16/09/2009 11:42, Alan Maguire wrote: > Renee Danson Sommerfeld wrote: >> On Tue, Sep 15, 2009 at 02:24:19PM +0100, Alan Maguire wrote: >> >>> hi folks >>> >>> In investigating defects 10123 (stopping manual locations >>> produces unexpected events) and 10978 (nwamadm report >>> "incorrect" state) I've been left wondering if we should >>> really fail state changes which are redundant. At present, >>> if an already-enabled object is enabled, we >>> get an "entity is in use" error, while if we try to disable >>> an already-disabled object, we get an "invalid state" >>> error. This is inconsistent with SMF which allows enable >>> requests to succeed even if the object is already enabled. >>> >>> I'm proposing that we change this so that such >>> redundant requests do not trigger an error, and >>> that we get rid of the NWAM_ENTITY_INVALID_STATE >>> error code (since it's only used in this scenario). Does >>> this sound reasonable? Thanks! >>> >> >> I'm assuming that enabling an enabled object, or disabling >> a disabled object, would result in a no-op? > yep - we just return success. >> If so, than I >> do think that's the optimal behavior. >> >> However, we also need to weigh the practical question: what >> code change is involved in making this change? >> >> > it's a couple of lines in libnwam (instead > of returning INVALID_STATE or ENTITY_IN_USE > we return SUCCESS), and changing this > will contribute towards fixing a few bugs, so I > think it's worthwhile. > > Alan > _______________________________________________ > nwam-dev mailing list > nwam-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/nwam-dev
