Skip to content

Multiversion Support#473

Closed
wojtek0806 wants to merge 1 commit intoF5Networks:developmentfrom
wojtek0806:version_check_clean_commits
Closed

Multiversion Support#473
wojtek0806 wants to merge 1 commit intoF5Networks:developmentfrom
wojtek0806:version_check_clean_commits

Conversation

@wojtek0806
Copy link
Copy Markdown
Contributor

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.

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
@swormke
Copy link
Copy Markdown
Contributor

swormke commented Jun 2, 2016

@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.

@wojtek0806 wojtek0806 changed the title Issues: Multiversion Support Jun 2, 2016
@zancas
Copy link
Copy Markdown
Contributor

zancas commented Jun 2, 2016

Checks failing.

Comment thread f5/bigip/__init__.py
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])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the str( call here? I doubt it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will get unicode rather than string then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hold on let me check ;]

@zancas
Copy link
Copy Markdown
Contributor

zancas commented Jun 2, 2016

This is landed by PR #478 .

@zancas zancas closed this Jun 2, 2016
@wojtek0806 wojtek0806 deleted the version_check_clean_commits branch June 6, 2016 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants