Add optional UUID based base models
Opened this issue · 3 comments
All the OpenWISP 2 models have uuid based IDs except django-x509.
We need to have uuid based fields for django-x509 too, but since this app is also used by projects that are not related to openwisp, we could keep this feature optional.
Tasks:
- create an abstract
BaseUUID
model which inherits BaseX509 which has a uuid field exactly as https://github.com/openwisp/openwisp-utils/blob/master/openwisp_utils/base.py#L13 - create two additional abstract models:
AbstractUUIDCa
andAbstractUUIDCert
, which inheritBaseUUID
- create tests to ensure
AbstractUUIDCa
andAbstractUUIDCert
work as expected, (concrete models will have to be added as well) - document how to use these models in the section Extending django-x509
@nemesisdesign I'd like to do this next if it isn't reserved for GCI
@R9295 this is not reserved to GCI, however, we are moving on different fronts at the same time.
This feature will need some more work to be used in OpenWISP.. I really want every OW module to use only UUID, but migrating existing databases will be painful.
Anyway, before jumping on this, what about making the new passphrase feature available in openwisp-controller? openwisp/openwisp-controller#36
it's not available yet there (just ran into an issue because in an instance I mistakenly upgraded django-x509 to the current master).
@nemesisdesign makes sense, will do 👍