F5Networks / f5-ansible-next

Collection for managing BIG-IP NEXT devices
1 stars 0 forks source link

Add `tests/config.yml` file to avoid unsupported Python sanity errors #3

Closed alisonlhart closed 5 months ago

alisonlhart commented 8 months ago

The collection passes ansible-test sanity for Python versions 2.7 and 3.5, which are still presently running as part of the ansible-test sanity suite on Automation Hub. Since these are unsupported versions for this collection, there's no need to fix the errors, only skip them.

Add a tests/config.yml file to the collection, specifying supported Python versions as ">=3.9", and these tests will pass. The template for this file is here.

Errors are:

Running ansible-test sanity on f5networks-next-1.0.1 ... 
Running sanity test "action-plugin-docs" 
Running sanity test "changelog" 
Running sanity test "compile" on Python 2.7 
ERROR: Found 16 compile issue(s) on python 2.7 which need to be resolved: 
ERROR: plugins/module_utils/logging.py:25:80: SyntaxError: session_separator = f'\n{"=" * 20} New Logging Session {"=" * 20}\n' 
ERROR: plugins/modules/cm_device_info.py:383:34: SyntaxError: f"Files found on CM: " 
ERROR: plugins/modules/cm_files.py:253:80: SyntaxError: uri = f"/v1/spaces/default/files?filter=file_name+eq+'{self.want.name}'" 
ERROR: plugins/modules/cm_next_as3_deploy.py:272:110: SyntaxError: self.log_message(f"No new or changed attribute. Aborting update for certificate {self.want.name}.") 
ERROR: plugins/modules/cm_next_backup_restore.py:296:83: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.device_ip}'" 
ERROR: plugins/modules/cm_next_deploy_f5os.py:324:106: SyntaxError: raise F5ModuleError(f"A submitted IP address: {addr} is not a valid IP interface address.") 
ERROR: plugins/modules/cm_next_deploy_vmware.py:343:106: SyntaxError: raise F5ModuleError(f"A submitted IP address: {addr} is not a valid IP interface address.") 
ERROR: plugins/modules/cm_next_discover.py:300:79: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.device_ip}'" 
ERROR: plugins/modules/cm_next_files.py:276:64: SyntaxError: uri = f"/device/v1/proxy/{self.device_uuid}?path=/files" 
ERROR: plugins/modules/cm_next_global_resiliency_group.py:403:64: SyntaxError: uri = f"/v1/spaces/default/gslb/gr-groups/{self.grc_id}" 
ERROR: plugins/modules/cm_next_ha.py:492:75: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.ha_ip}'" 
ERROR: plugins/modules/cm_next_ha_failover.py:246:79: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.ha_ip}'" 
ERROR: plugins/modules/cm_next_provider.py:207:54: SyntaxError: return f"{self._values['address']}:{port}" 
ERROR: plugins/modules/cm_next_upgrade.py:244:83: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.device_ip}'" 
ERROR: plugins/modules/cm_ssl_certificate_create.py:409:107: SyntaxError: self.log_message(f"Certificate {self.want.name} exists on the device. Starting update process.") 
ERROR: plugins/modules/cm_ssl_certificate_import.py:409:90: SyntaxError: self.log_message(f"Certificate {self.want.name} exists on the device.") 
See documentation for help: https://docs.ansible.com/ansible-core/2.15/dev_guide/testing/sanity/compile.html 
Running sanity test "compile" on Python 3.5 
ERROR: Found 16 compile issue(s) on python 3.5 which need to be resolved: 
ERROR: plugins/module_utils/logging.py:25:80: SyntaxError: session_separator = f'\n{"=" * 20} New Logging Session {"=" * 20}\n' 
ERROR: plugins/modules/cm_device_info.py:383:34: SyntaxError: f"Files found on CM: " 
ERROR: plugins/modules/cm_files.py:253:80: SyntaxError: uri = f"/v1/spaces/default/files?filter=file_name+eq+'{self.want.name}'" 
ERROR: plugins/modules/cm_next_as3_deploy.py:272:110: SyntaxError: self.log_message(f"No new or changed attribute. Aborting update for certificate {self.want.name}.") 
ERROR: plugins/modules/cm_next_backup_restore.py:296:83: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.device_ip}'" 
ERROR: plugins/modules/cm_next_deploy_f5os.py:324:106: SyntaxError: raise F5ModuleError(f"A submitted IP address: {addr} is not a valid IP interface address.") 
ERROR: plugins/modules/cm_next_deploy_vmware.py:343:106: SyntaxError: raise F5ModuleError(f"A submitted IP address: {addr} is not a valid IP interface address.") 
ERROR: plugins/modules/cm_next_discover.py:300:79: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.device_ip}'" 
ERROR: plugins/modules/cm_next_files.py:276:64: SyntaxError: uri = f"/device/v1/proxy/{self.device_uuid}?path=/files" 
ERROR: plugins/modules/cm_next_global_resiliency_group.py:403:64: SyntaxError: uri = f"/v1/spaces/default/gslb/gr-groups/{self.grc_id}" 
ERROR: plugins/modules/cm_next_ha.py:492:75: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.ha_ip}'" 
ERROR: plugins/modules/cm_next_ha_failover.py:246:79: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.ha_ip}'" 
ERROR: plugins/modules/cm_next_provider.py:207:54: SyntaxError: return f"{self._values['address']}:{port}" 
ERROR: plugins/modules/cm_next_upgrade.py:244:83: SyntaxError: uri = f"/device/v1/inventory?filter=address+eq+'{self.want.device_ip}'" 
ERROR: plugins/modules/cm_ssl_certificate_create.py:409:107: SyntaxError: self.log_message(f"Certificate {self.want.name} exists on the device. Starting update process.") 
ERROR: plugins/modules/cm_ssl_certificate_import.py:409:90: SyntaxError: self.log_message(f"Certificate {self.want.name} exists on the device.") 
See documentation for help: https://docs.ansible.com/ansible-core/2.15/dev_guide/testing/sanity/compile.html 
urohit011 commented 8 months ago

Hi, this will be fixed in the next release.