-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import time side effects with validation_instance #26
Comments
…ject - val in __setitem__(self, key, val) is now validated with MetadataBlockType Rule and StorageBlockTypeRule - The current functionality shall be in place till rackerlabs#26 is solved - Some Typos and repeated docstrings corrected - Tests refactored, to make introduce sorted lists of uuids, instead of hardcoding them
…ject - val in __setitem__(self, key, val) is now validated with MetadataBlockType Rule and StorageBlockTypeRule - The current functionality shall be in place till rackerlabs#26 is solved - Some Typos and repeated docstrings corrected - Tests refactored, to make introduce sorted lists of uuids, instead of hardcoding them
…ject - val in __setitem__(self, key, val) is now validated with MetadataBlockType Rule and StorageBlockTypeRule - The current functionality shall be in place till rackerlabs#26 is solved - Better Error messages when trying to update storage_id, block_id given that the operation is not allowed - Some Typos and repeated docstrings corrected - Tests refactored, to make introduce sorted lists of uuids, instead of hardcoding them
I'm not sure this one is solve-able unless we want to break down common/validation.py and common/validation_instance.py spread them throughout the API modules. The main issue is that by defining them all in one place you have to have access to the definitions to everything before it can be used. Thus to include in api/block.py it has to be able to know about api.Vault defined in api/vault.py but api/vault.py has to know about api/block.py - it's all a big dependency mess in that manner. If we truly want to do this, then the two files go away and api/block.py has to provide the validation rules for blocks; api/vault.py has to provide them for Vaults, etc. Only way to get rid of the dependencies. Now it might be possible to keep common/validation.py and just import the validation rules from the various API modules so they're easy to get to in one place... |
validation_instance cannot be imported within the api namespace, to check for validations.
The text was updated successfully, but these errors were encountered: