Multiversion Support#473
Closed
wojtek0806 wants to merge 1 commit intoF5Networks:developmentfrom
Closed
Conversation
Fixes F5Networks#379, F5Networks#452, F5Networks#461, F5Networks#462 Problem: SDK needs to be able to run on multiple versions of TMOS. Some API endpoints were not implemented in the base 11.6.0, but exist in 12.x. This SDK needs the ability to verify the TMOS version when instantiating the API classes. Analysis: This update forces the tmos version update upon ManagementRoot instantiation. Moreover it adds a new private method into LazyAttributeMixin class: _check_supported_versions which is responsible for veryfing if an instantiated class for the API is supported in the target's device tmos. Files affected: f5\bigip\__init__.py f5\bigip\mixins.py f5\bigip\resource.py f5\bigip\tm\cm\trust.py f5\bigip\tm\ltm\profile.py
Contributor
|
@wojtek0806 and @zancas Probably want to fix the title on this one. I think it used to have a nice mult-version support title or something. |
Contributor
|
Checks failing. |
| base_uri = self._meta_data['uri'] + 'tm/sys/' | ||
| response = connect.get(base_uri) | ||
| ver = response.json() | ||
| version = str(parse_qs(urlparse(ver['selfLink']).query)['ver'][0]) |
Contributor
There was a problem hiding this comment.
Do we need the str( call here? I doubt it.
Contributor
Author
There was a problem hiding this comment.
you will get unicode rather than string then
Contributor
Author
There was a problem hiding this comment.
hold on let me check ;]
Contributor
|
This is landed by PR #478 . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #379, #452, #461, #462
Problem: SDK needs to be able to run on multiple versions of TMOS. Some API endpoints were not implemented in the base 11.6.0, but exist in 12.x. This SDK needs the ability to verify the TMOS version when instantiating the API classes.
Analysis: This update forces the tmos version update upon ManagementRoot instantiation. Moreover it adds a new private method into LazyAttributeMixin class: _check_supported_versions which is responsible for veryfing if an instantiated class for the API is supported in the target's device tmos.
Files affected:
f5\bigip__init__.py
f5\bigip\mixins.py
f5\bigip\resource.py
f5\bigip\tm\cm\trust.py
f5\bigip\tm\ltm\profile.py
CAVEAT: This change will affect all of the unit tests that utilize fake instance of BIGIP or ManagementRoot clases. So those tests need rewriting to accommodate the change.