Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Oct 5, 2023
1 parent c25e9a5 commit 876c4ad
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
19 changes: 17 additions & 2 deletions plugins/modules/ec2_import_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
description:
- The name of the EC2 image import task.
type: str
aliases: ["name"]
architecture:
description:
- The architecture of the virtual machine.
Expand Down Expand Up @@ -95,10 +96,24 @@
- The ARNs of the license configurations.
type: list
elements: dict
boot_mode:
description:
- The boot mode of the virtual machine.
type: str
choices: ["legacy-bios", "uefi"]
cancel_reason:
description:
- The reason for canceling the task.
type: str
usage_operation:
description:
- The usage operation value.
type: str
tags:
description:
- The tags to apply to the import image task during creation.
type: dict
aliases: ["resource_tags"]
author:
- Alina Buzachis (@alinabuzachis)
extends_documentation_fragment:
Expand Down Expand Up @@ -239,6 +254,7 @@
role_name:
description:
- The name of the role to use when not using the default role, 'vmimport'.
type: str
tags:
description:
- The tags to apply to the import image task during creation.
Expand Down Expand Up @@ -376,7 +392,7 @@ def present(client, module):

def main():
argument_spec = dict(
architecture=dict(type="str"),
architecture=dict(type="str", choices=["i386", "x86_64"]),
client_data=dict(type="dict"),
description=dict(type="str"),
disk_containers=dict(type="list", elements="dict"),
Expand All @@ -386,7 +402,6 @@ def main():
kms_key_id=dict(type="str"),
license_type=dict(type="str", no_log=False),
tags=dict(required=False, type="dict", aliases=["resource_tags"]),
purge_tags=dict(default=True, type="bool"),
platform=dict(type="str", choices=["Windows", "Linux"]),
role_name=dict(type="str"),
license_specifications=dict(type="list", elements="dict"),
Expand Down
7 changes: 1 addition & 6 deletions plugins/modules/ec2_import_image_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
- See U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImportImageTasks.html) for possible filters.
type: list
elements: dict
default: []
extends_documentation_fragment:
- amazon.aws.common.modules
- amazon.aws.region.modules
Expand Down Expand Up @@ -157,6 +156,7 @@
role_name:
description:
- The name of the role to use when not using the default role, 'vmimport'.
type: str
tags:
description:
- The tags to apply to the import image task during creation.
Expand All @@ -165,11 +165,6 @@

import copy

try:
import botocore
except ImportError:
pass # Handled by AnsibleAWSModule

from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import helper_describe_import_image_tasks
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/plugins/modules/test_ec2_import_image.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# This file is part of Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

import unittest
import pytest
from unittest.mock import MagicMock
from unittest.mock import patch
from unittest.mock import call
from unittest.mock import ANY

from ansible_collections.amazon.aws.plugins.modules import ec2_import_image
Expand Down

0 comments on commit 876c4ad

Please sign in to comment.