Closed yilongx closed 12 years ago
The design is to allow delPolicy to be called many times without a setPolicy. In cases where there is no policy to delete it should do nothing. If the policy exists it should delete it.
Proposed change is to return 0x80 the IPMI return code if the Policy ID is invalid (the policy to be deleted is not found). If the policy is not found, then it returns an exception. There you can search for 0x80 to see if the policy existed. This will also be the same for getPolicy. You would first do a getPolicy, if the policy is found you could do a delPolicy. If getPolicy or delPolicy do not find the policy they will return 0x80 in the exception e->errorCode to see if the policy was found.
fixed and verified
I test this case using following steps:
1 initial Lib and Device 2 involve setPolicyStatus() 3 involve delPolicy 4 uninitial Device and Lib 5 build this test file 6 run many time