[PR #9056/67d1b6c4 backport][stable-9] one_image/one_image_info: Fix class typo (#9072)

one_image/one_image_info: Fix class typo (#9056)

* Fix one_image class method args

* Add CHANGELOG fragment

* PR fix

* PR fixes

(cherry picked from commit 67d1b6c413)

Co-authored-by: alexander <79072457+abakanovskii@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-10-29 20:27:36 +01:00 committed by GitHub
parent 9c535cb17d
commit b6cd89c677
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 7 deletions

View file

@ -0,0 +1,3 @@
bugfixes:
- one_image - fix module failing due to a class method typo (https://github.com/ansible-collections/community.general/pull/9056).
- one_image_info - fix module failing due to a class method typo (https://github.com/ansible-collections/community.general/pull/9056).

View file

@ -462,7 +462,7 @@ class ImageModule(OpenNebulaModule):
if changed and not self.module.check_mode:
self.one.image.enable(image.ID, enable)
result = OpenNebulaModule.get_image_info(image)
result = self.get_image_info(image)
result['changed'] = changed
return result
@ -486,7 +486,7 @@ class ImageModule(OpenNebulaModule):
if changed and not self.module.check_mode:
self.one.image.persistent(image.ID, enable)
result = OpenNebulaModule.get_image_info(image)
result = self.get_image_info(image)
result['changed'] = changed
return result
@ -497,7 +497,7 @@ class ImageModule(OpenNebulaModule):
tmp_image = self.get_image_by_name(new_name)
if tmp_image:
result = OpenNebulaModule.get_image_info(tmp_image)
result = self.get_image_info(image)
result['changed'] = False
return result
@ -509,7 +509,7 @@ class ImageModule(OpenNebulaModule):
self.wait_for_ready(new_id)
image = self.one.image.info(new_id)
result = OpenNebulaModule.get_image_info(image)
result = self.get_image_info(image)
result['changed'] = True
return result
@ -519,7 +519,7 @@ class ImageModule(OpenNebulaModule):
self.module.fail_json(msg="'new_name' option has to be specified when the state is 'renamed'")
if new_name == image.NAME:
result = OpenNebulaModule.get_image_info(image)
result = self.get_image_info(image)
result['changed'] = False
return result
@ -530,7 +530,7 @@ class ImageModule(OpenNebulaModule):
if not self.module.check_mode:
self.one.image.rename(image.ID, new_name)
result = OpenNebulaModule.get_image_info(image)
result = self.get_image_info(image)
result['changed'] = True
return result

View file

@ -307,7 +307,7 @@ class ImageInfoModule(OpenNebulaModule):
images = self.get_all_images().IMAGE
self.result = {
'images': [OpenNebulaModule.get_image_info(image) for image in images]
'images': [self.get_image_info(image) for image in images]
}
self.exit()