Skip to content

Commit 8168412

Browse files
wojtek0806zancas
authored andcommitted
Issues:
Fixes #453 Problem: UCS management support was missing from the SDK. Analysis: Given the fact that 11.6.0 Final is buggy, the UCS endpoint is supported only for version 12 and up. Files modified/added: f5/bigip/tm/sys/test/test_ucs.py test/functional/tm/sys/test_ucs.py f5/bigip/tm/sys/ucs.py f5/bigip/tm/sys/init.py Tests: Flake8 Unit Test Functional Test
1 parent 7c85b10 commit 8168412

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

f5/bigip/mixins.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,24 @@ def _is_version_supported_method(container, method_version):
144144
tmos_v, method_version)
145145
raise UnsupportedTmosVersion(error)
146146

147+
def _is_version_supported_method(container, method_version):
148+
"""Helper method
149+
150+
To use in instances where class methods on some resources
151+
require a specific TMOS version to run.
152+
153+
Raises::
154+
UnsupportedTmosVersion
155+
"""
156+
tmos_v = container._meta_data['bigip'].tmos_version
157+
if LooseVersion(tmos_v) < LooseVersion(method_version):
158+
error = "There was an attempt to use a method which " \
159+
"has not been implemented or supported " \
160+
"in the device's TMOS version: %s. " \
161+
"Minimum TMOS version supported is %s" % (
162+
tmos_v, method_version)
163+
raise UnsupportedTmosVersion(error)
164+
147165

148166
class ExclusiveAttributesMixin(object):
149167
"""Overrides ``__setattr__`` to remove exclusive attrs from the object."""

0 commit comments

Comments
 (0)