Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify function parameters #177

Merged
merged 1 commit into from
Oct 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions lib/ansible/modules/cloud/alicloud/_ali_instance_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see http://www.gnu.org/licenses/.

from __future__ import absolute_import, division, print_function

__metaclass__ = type

ANSIBLE_METADATA = {'metadata_version': '1.1',
Expand All @@ -26,13 +26,12 @@

DOCUMENTATION = '''
---
module: ali_instance_info
module: ali_instance_facts
version_added: "2.8"
short_description: Gather information on instances of Alibaba Cloud ECS.
short_description: Gather facts on instances of Alibaba Cloud ECS.
description:
- This module fetches data from the Open API in Alicloud.
The module must be called from within the ECS instance itself.
- This module was called C(ali_instance_facts) before Ansible 2.9. The usage did not change.

options:
availability_zone:
Expand All @@ -50,7 +49,6 @@
name_prefix:
description:
- Use a instance name prefix to filter ecs instances.
version_added: '2.9'
tags:
description:
- A hash/dictionaries of instance tags. C({"key":"value"})
Expand All @@ -62,7 +60,6 @@
Filter keys can be same as request parameter name or be lower case and use underscore ("_") or dash ("-") to
connect different words in one parameter. 'InstanceIds' should be a list and it will be appended to
I(instance_ids) automatically. 'Tag.n.Key' and 'Tag.n.Value' should be a dict and using I(tags) instead.
version_added: '2.9'
author:
- "He Guimin (@xiaozhu36)"
requirements:
Expand Down Expand Up @@ -400,7 +397,7 @@ def main():
filters = {}
if not ids:
ids = []
for key, value in filters.items():
for key, value in list(filters.items()):
if key in ["InstanceIds", "instance_ids", "instance-ids"] and isinstance(ids, list):
for id in value:
if id not in ids:
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/alicloud/ali_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ def create_instance(module, ecs, exact_count):
description = module.params['description']
internet_charge_type = module.params['internet_charge_type']
max_bandwidth_out = module.params['max_bandwidth_out']
max_bandwidth_in = module.params['max_bandwidth_out']
max_bandwidth_in = module.params['max_bandwidth_in']
host_name = module.params['host_name']
password = module.params['password']
system_disk_category = module.params['system_disk_category']
Expand Down
Loading