Skip to content

Commit

Permalink
Merge pull request #1 from PaloAltoNetworks/develop
Browse files Browse the repository at this point in the history
Release 1.0.1
  • Loading branch information
shinmog authored Feb 6, 2020
2 parents 35d5f87 + fb508fb commit a6b1681
Show file tree
Hide file tree
Showing 78 changed files with 332 additions and 318 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/galaxy-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
release:
types:
- published
- created

jobs:
build:
Expand All @@ -27,4 +26,4 @@ jobs:
env:
GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }}
run: |
ansible-galaxy collection publish --api-key ${GALAXY_API_KEY} Palo*
ansible-galaxy collection publish --api-key ${GALAXY_API_KEY} palo*
9 changes: 8 additions & 1 deletion .github/workflows/syntax-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ jobs:
run: |
pip install ansible
ansible-galaxy collection build
ansible-galaxy collection install PaloAltoNetworks*
ansible-galaxy collection install paloaltonetworks*
- name: Perform Syntax Check
run: |
find ./plugins -name \*.py -exec pycodestyle --max-line-length=120 --ignore=E402,E121,E123,E126,E133,E226,E241,E242,E704,W503,W504,W505 {} +
- name: Verify documentation can be built
run: |
for i in $(ls -1 plugins/modules | grep -v init)
do
echo "Checking $i..."
ansible-doc -M plugins/modules $i > /dev/null
done
- name: Run unittests
run: |
pip install pytest
4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric characters and underscores. Additionally namespaces cannot start with
# underscores or numbers and cannot contain consecutive underscores
namespace: 'PaloAltoNetworks'
namespace: 'paloaltonetworks'

# The name of the collection. Has the same character restrictions as 'namespace'
name: 'panos'

# The version of the collection. Must be compatible with semantic versioning
version: '1.0.0'
version: '1.0.1'

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: 'README.md'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,20 @@ class ModuleDocFragment(object):
- absent
'''

ENABLED_STATE = r'''
options:
state:
description:
- The state.
type: str
default: present
choices:
- present
- absent
- enabled
- disabled
'''

RULEBASE = r'''
options:
rulebase:
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/panos_address_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
- Panorama is supported.
- Check mode is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.vsys
- panos.device_group
- panos.state
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.vsys
- paloaltonetworks.panos.fragments.device_group
- paloaltonetworks.panos.fragments.state
options:
name:
description:
Expand Down Expand Up @@ -98,7 +98,7 @@
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/panos_address_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
- Panorama is supported.
- Check mode is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.vsys
- panos.device_group
- panos.state
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.vsys
- paloaltonetworks.panos.fragments.device_group
- paloaltonetworks.panos.fragments.state
options:
name:
description:
Expand Down Expand Up @@ -111,7 +111,7 @@
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection

try:
from pandevice.objects import AddressObject
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/panos_administrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
I(state=present) with I(admin_password) specified will always report
I(changed=True) in the return value.
extends_documentation_fragment:
- panos.transitional_provider
- panos.state
- panos.full_template_support
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.state
- paloaltonetworks.panos.fragments.full_template_support
options:
admin_username:
description:
Expand Down Expand Up @@ -135,7 +135,7 @@


from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
14 changes: 7 additions & 7 deletions plugins/modules/panos_aggregate_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
- Checkmode is supported.
- Panorama is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.vsys_import
- panos.template_only
- panos.state
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.vsys_import
- paloaltonetworks.panos.fragments.template_only
- paloaltonetworks.panos.fragments.state
options:
if_name:
description:
Expand Down Expand Up @@ -73,11 +73,11 @@
- Netflow profile for aggregate interface.
lldp_enabled:
description:
- Layer2: Enable LLDP
- (Layer2) Enable LLDP
type: bool
lldp_profile:
description:
- Layer2: Reference to an lldp profile
- (Layer2) Reference to an lldp profile
comment:
description:
- Interface comment.
Expand Down Expand Up @@ -133,7 +133,7 @@
'supported_by': 'community'}

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/panos_api_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- Panorama is supported.
- Checkmode is NOT supported.
extends_documentation_fragment:
- panos.transitional_provider
- paloaltonetworks.panos.fragments.transitional_provider
'''

EXAMPLES = '''
Expand All @@ -65,7 +65,7 @@


from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


def main():
Expand Down
16 changes: 4 additions & 12 deletions plugins/modules/panos_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,14 @@
- Checkmode is supported.
- Panorama is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.full_template_support
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.full_template_support
- paloaltonetworks.panos.fragments.enabled_state
options:
commit:
description:
- Commit configuration if changed.
default: true
state:
description:
- The state.
choices:
- present
- absent
- enabled
- disabled
default: 'present'
enable:
description:
- Enable BGP.
Expand Down Expand Up @@ -146,7 +138,7 @@


from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/panos_bgp_aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
- Checkmode is supported.
- Panorama is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.state
- panos.full_template_support
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.state
- paloaltonetworks.panos.fragments.full_template_support
options:
commit:
description:
Expand Down Expand Up @@ -157,7 +157,7 @@
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/panos_bgp_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
if the secret is properly set or not. Invoking this module with I(state=present)
will always apply the config to PAN-OS.
extends_documentation_fragment:
- panos.transitional_provider
- panos.state
- panos.full_template_support
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.state
- paloaltonetworks.panos.fragments.full_template_support
options:
commit:
description:
Expand Down Expand Up @@ -87,7 +87,7 @@
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/panos_bgp_conditional_advertisement.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
- Checkmode is supported.
- Panorama is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.full_template_support
- panos.state
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.full_template_support
- paloaltonetworks.panos.fragments.state
options:
commit:
description:
Expand Down Expand Up @@ -105,7 +105,7 @@


from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/panos_bgp_dampening.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
- Checkmode is supported.
- Panorama is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.full_template_support
- panos.state
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.full_template_support
- paloaltonetworks.panos.fragments.state
options:
commit:
description:
Expand Down Expand Up @@ -98,7 +98,7 @@
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/panos_bgp_peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
- Checkmode is supported.
- Panorama is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.full_template_support
- panos.state
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.full_template_support
- paloaltonetworks.panos.fragments.state
options:
commit:
description:
Expand Down Expand Up @@ -183,7 +183,7 @@
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/panos_bgp_peer_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
- Checkmode is supported.
- Panorama is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.state
- panos.full_template_support
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.state
- paloaltonetworks.panos.fragments.full_template_support
options:
commit:
description:
Expand Down Expand Up @@ -115,7 +115,7 @@
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection


try:
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/panos_bgp_policy_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
- Checkmode is supported.
- Panorama is supported.
extends_documentation_fragment:
- panos.transitional_provider
- panos.full_template_support
- paloaltonetworks.panos.fragments.transitional_provider
- paloaltonetworks.panos.fragments.full_template_support
options:
state:
description:
Expand Down Expand Up @@ -149,7 +149,7 @@


from ansible.module_utils.basic import AnsibleModule
from ansible_collections.PaloAltoNetworks.panos.plugins.module_utils.panos import get_connection
from ansible_collections.paloaltonetworks.panos.plugins.module_utils.panos import get_connection
from ansible.module_utils._text import to_text


Expand Down
Loading

0 comments on commit a6b1681

Please sign in to comment.