Skip to content

Commit

Permalink
stable-4.x: Fix sanity tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolenz committed Sep 29, 2024
1 parent 6648b07 commit 8c08257
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelogs/fragments/2186-fix-sanity-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bugfixes:
- vmware_dvswitch - Fix Pylint issue (https://github.com/ansible-collections/community.vmware/pull/2186).
- vmware_host - Fix Pylint issue (https://github.com/ansible-collections/community.vmware/pull/2186).
- vmware_host_dns - Fix Pylint issue (https://github.com/ansible-collections/community.vmware/pull/2186).
- vmware_host_powerstate - Fix Pylint issue (https://github.com/ansible-collections/community.vmware/pull/2186).
1 change: 1 addition & 0 deletions plugins/modules/vmware_dvswitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ def update_dvswitch(self):
config_spec.defaultPortConfig.macManagementPolicy = policy

# Check switch version
spec_product = None
if self.switch_version:
results['version'] = self.switch_version
if self.dvs.config.productInfo.version != self.switch_version:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/vmware_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ def state_update_host(self):
if reconnect or self.state == 'add_or_reconnect' or self.state == 'reconnect':
self.reconnect_host(self.host_update)
try:
task = None
try:
if parent_type == 'folder':
# Move ESXi host from folder to folder
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/vmware_host_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def ensure(self):
initial_name = host.name
changed = False
changed_list = []
dns_servers_verbose_message = None
host_result = {'changed': '', 'msg': '', 'host_name': host.name}

host_netstack_config = host.config.network.netStackInstance
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/vmware_host_powerstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def ensure(self):
host_change_list = []
for host in self.hosts:
changed = False
task = None
if not host.runtime.inMaintenanceMode and not force:
self.module.fail_json(msg="Current host system '%s' is not in maintenance mode,"
" please specify 'force' as True to proceed." % host.name)
Expand Down
1 change: 0 additions & 1 deletion tests/sanity/ignore-2.18.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
meta/runtime.yml runtime-metadata!skip
plugins/modules/vmware_deploy_ovf.py replace-urlopen!skip
plugins/modules/vmware_deploy_ovf.py use-argspec-type-path!skip
scripts/inventory/vmware_inventory.py pep8!skip
Expand Down
4 changes: 4 additions & 0 deletions tests/sanity/ignore-2.19.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins/modules/vmware_deploy_ovf.py replace-urlopen!skip
plugins/modules/vmware_deploy_ovf.py use-argspec-type-path!skip
scripts/inventory/vmware_inventory.py pep8!skip
tests/unit/mock/loader.py pep8!skip

0 comments on commit 8c08257

Please sign in to comment.