You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#378, #452, #474, #481, #484, #485
Problem:
Given the latest additions and changes to the core classes some of the sub-modules coding needed change, also during the process few issues were discovered with create method allowing mutually exclusive attributes to be sent to the BIGIP. Also a decision was made to create a helper class to handle required attributes within different parts of code.
Analysis:
Removed the hardcoded payload in failover.py. Kept the legacy method in failover.py for backwards compatibility. Added 2 new helper methods inside PathElement:,
- _check_exclusive_parameters to handle those exclusive attributes during create/exec_cmd.
- _check_required_parameters - a static method to handle checking for required paremeters
Modified CommandExecutionMixin _exec_cmd method to utilize the 2 new helpers from PathElement, modified Resource _create method to do the same. Modified _check_load_parameters method inside PathElement to call _check_required_parameters. In addition to the above I have moved self._meta_data['exclusive_attributes'] declaration into ResourceBase. Added new dictionary entry for: self._meta_data['required_command_parameters'] into PathElement to accomodate splitting this from required_creation_parameters as per discussion with @za. The self._meta_data['required_command_parameters'] is empty by default, this is to allow utilizing classes where 'name' attribute is not present or required, also to allow utilizing commands by the means of utilCmdArgs= argument.
e.g.
exec_cmd('foocommand', utilCmdArgs='foo bar')
Files modified:
f5\bigip\resource.py
f5\bigip\mixins.py
f5\bigip\tm\cm\device_group.py
f5\bigip\tm\cm\sync_status.py
f5\bigip\tm\cm\traffic_group.py
f5\bigip\tm\cm\trust.py
f5\bigip\tm\cm\trust_domain.py
f5\bigip\tm\ltm\profile.py
f5\bigip\tm\sys\failover.py
f5-common-python\test\functional\cm\test_sync_status.py
f5-common-python\test\functional\tm\sys\test_failover.py
New files added:
f5\bigip\tm\sys\test\test_failover.py
f5\bigip\tm\ltm\test\test_profile_ocsp.py
0 commit comments