8000 Update azure_rm_route related document by Fred-sun · Pull Request #57928 · ansible/ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update azure_rm_route related document #57928

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 “S 8000 ign 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

Merged
merged 5 commits into from
Jun 18, 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
15 changes: 8 additions & 7 deletions lib/ansible/modules/cloud/azure/azure_rm_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,21 @@
---
module: azure_rm_route
version_added: "2.7"
short_description: Manage Azure route resource.
short_description: Manage Azure route resource
description:
- Create, update or delete a route.
options:
resource_group:
description:
- name of resource group.
- Name of resource group.
required: true
name:
description:
- name of the route.
- Name of the route.
required: true
state:
description:
- Assert the state of the route. Use C(present) to create or update and
C(absent) to delete.
- Assert the state of the route. Use C(present) to create or update and C(absent) to delete.
default: present
choices:
- absent
Expand Down Expand Up @@ -65,7 +64,7 @@
- azure_tags

author:
- "Yuwei Zhou (@yuwzho)"
- Yuwei Zhou (@yuwzho)

'''

Expand All @@ -87,9 +86,11 @@
'''
RETURN = '''
id:
description: Current state of the route.
description:
- Current state of the route.
returned: success
type: str
sample: "/subscriptions/xxxx...xxxx/resourceGroups/v-xisuRG/providers/Microsoft.Network/routeTables/tableb57/routes/routeb57"
'''

try:
Expand Down
21 changes: 12 additions & 9 deletions lib/ansible/modules/cloud/azure/azure_rm_routetable.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,21 @@
---
module: azure_rm_routetable
version_added: "2.7"
short_description: Manage Azure route table resource.
short_description: Manage Azure route table resource
description:
- Create, update or delete a route table.
options:
resource_group:
description:
- name of resource group.
- Name of resource group.
required: true
name:
description:
- name of the route table.
- Name of the route table.
required: true
state:
description:
- Assert the state of the route table. Use C(present) to create or update and
C(absent) to delete.
- Assert the state of the route table. Use C(present) to create or update and C(absent) to delete.
default: present
choices:
- absent
Expand All @@ -45,14 +44,14 @@
location:
description:
- Region of the resource.
- Derived from C(resource_group) if not specified
- Derived from I(resource_group) if not specified.

extends_documentation_fragment:
- azure
- azure_tags

author:
- "Yuwei Zhou (@yuwzho)"
- Yuwei Zhou (@yuwzho)

'''

Expand All @@ -73,13 +72,17 @@
'''
RETURN = '''
changed:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're updating this documentation, I would remove the entire entry for changed from the RETURN section - changed is not returned by the module, but by Ansible core, so it doesn't really belong in the module documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review. I will pay attention to this problem in future maintenance. Thanks a lot!

description: Whether the resource is changed.
description:
- Whether the resource is changed.
returned: always
type: bool
sample: true
id:
description: resource id.
description:
- Resource ID.
returned: success
type: str
sample: "/subscriptions/xxx...xxx/resourceGroups/v-xisuRG/providers/Microsoft.Network/routeTables/tableb57dc95642/routes/routeb57dc95986"
'''

try:
Expand Down
42 changes: 27 additions & 15 deletions lib/ansible/modules/cloud/azure/azure_rm_routetable_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

version_added: "2.7"

short_description: Get route table facts.
short_description: Get route table facts

description:
- Get facts for a specific route table or all route table in a resource group or subscription.
Expand All @@ -39,7 +39,7 @@
- azure

author:
- "Yuwei Zhou (@yuwzho)"
- Yuwei Zhou (@yuwzho)

'''

Expand All @@ -61,37 +61,49 @@
'''
RETURN = '''
id:
description: Resource id.
description:
- Resource ID.
returned: success
type: str
sample: "/subscriptions/xxxx...xxxx/resourceGroups/v-xisuRG/providers/Microsoft.Network/routeTables/tableb57dc95236"
name:
description: Name of the resource.
description:
- Name of the resource.
returned: success
type: str
sample: tableb57dc95236
resource_group:
description: Resource group of the route table.
description:
- Resource group of the route table.
returned: success
type: str
sample: v-xisuRG
disable_bgp_route_propagation:
description: Whether the routes learned by BGP on that route table disabled.
description:
- Whether the routes learned by BGP on that route table disabled.
returned: success
type: bool
sample: false
tags:
description: Tags of the route table.
description:
- Tags of the route table.
returned: success
type: list
type: dict
sample: { 'key1':'value1', 'key2':'value2'}
routes:
description: Current routes of the route table.
description:
- Current routes of the route table.
returned: success
type: list
sample: [
{
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroup/myResourceGroup/providers/Microsoft.Network/routeTables/foobar/routes/route",
"name": "route",
"resource_group": "Testing",
"routeTables": "foobar",
"address_prefix": "192.0.0.1",
"next_hop_type": "virtual_networkGateway"
"id": "/subscriptions/xxx...xxx/resourceGroups/v-xisuRG/providers/Microsoft.Network/routeTables/tableb57dc95236/routes/routeb57dc95540",
"name": "routeb57dc95540",
"resource_group": "v-xisuRG",
"route_table_name": "tableb57dc95236",
"address_prefix": "10.1.0.0/24",
"next_hop_type": "virtual_network_gateway",
"next_hop_ip_address": null
}
]
'''
Expand Down
0