#NEWLINE# def _validate_target_state( self , target ) : #NEWLINE# #INDENT# "Validate the target state.\n\n        A target state must be a valid state that is 'stable'.\n\n        :param target: The target state\n        :raises: exception.InvalidState if it is an invalid target state\n        " #NEWLINE# if ( target is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( target not in self . _states ) : #NEWLINE# #INDENT# raise excp . InvalidState ( ( _ ( "Target state '%s' does not exist" ) % target ) ) #NEWLINE# #UNINDENT# if ( not self . is_stable ( target ) ) : #NEWLINE# #INDENT# raise excp . InvalidState ( ( _ ( "Target state '%s' is not a 'stable' state" ) % target ) )