Localise constants
To ease readability, move all the constants to their respective classes as class attributes. It also makes sure when we remove a module, we remove the constants too or else we risk dead code in the constants.py file.
So for example, iscsi.py will have the following related constants in the file :
ISCSI_UPDATE_SUCCESS = 'successfully' ISCSI_UPDATE_FAILURE = 'already' ISCSI_CREATE_COMMAND = 'create' ISCSI_DELETE_COMMAND = 'delete'
will be moved to
... class ISCSI(object): metaclass = ABCMeta (ISCSI_UPDATE_SUCCESS, ISCSI_UPDATE_FAILURE) = ('successfully', 'already') ...
that particular set of constants should be removed as we are not using it. But the constants will be moved to respective drivers.
Yeah, also, I see defaults in the constants file. Ideally, I'd like them to be optional config options if applicable and hopefully we can do away with the entire constants.py file.