openvstorage / framework

The Framework is a set of components and tools which brings the user an interface (GUI / API) to setup, extend and manage an Open vStorage platform.
Other
27 stars 23 forks source link

[DAL] Use python descriptors for properties #2324

Open JeffreyDevloo opened 5 years ago

JeffreyDevloo commented 5 years ago

All properties are currently set onto the object when it is instantiated. This makes it very hard for the editor to know which properties are set onto the object.

Instead of the dynamic property setting, we could use 'descriptors'

An example on how to implement can be found on my branch. Object defintion is more readable and the IDE can track the attributes because they are bound to the class. The associated test suite should be expanded when further implementing it