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

fix: layer2 interface creation #496

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Conversation

jamesholland-uk
Copy link
Member

@jamesholland-uk jamesholland-uk commented Feb 8, 2023

Description

In PAN-OS, layer 2 interfaces do not get added to virtual routers. This fix stops the SDK trying to add layer 2 interfaces to virtual routers when the interface is created.

Motivation and Context

Fix for PaloAltoNetworks/pan-os-ansible#173

How Has This Been Tested?

Tested locally via Ansible

Before:

TASK [Create interfaces] ***********************************************************************************************************************************************************************************************************************
failed: [host_labfw] (item={'name': 'ethernet1/8', 'mode': 'layer2', 'vlan_name': 'Management', 'lldp_enabled': False, 'zone_name': 'VLANs'}) => {"ansible_loop_var": "item", "changed": false, "item": {"lldp_enabled": false, "mode": "layer2", "name": "ethernet1/8", "vlan_name": "Management", "zone_name": "VLANs"}, "msg": "Failed set_virtual_router:  interface 'ethernet1/8' is not a valid reference"}

After:

TASK [Create interfaces] ***********************************************************************************************************************************************************************************************************************
changed: [host_labfw] => (item={'name': 'ethernet1/8', 'mode': 'layer2', 'vlan_name': 'Management', 'lldp_enabled': False, 'zone_name': 'VLANs'})

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

Copy link
Collaborator

@shinmog shinmog left a comment

Choose a reason for hiding this comment

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

lgtm

@jamesholland-uk jamesholland-uk merged commit 424c74c into develop Feb 15, 2023
@jamesholland-uk jamesholland-uk deleted the fix-l2-interface-creation branch February 15, 2023 13:40
@jamesholland-uk jamesholland-uk removed the request for review from btorresgil February 15, 2023 13:42
github-actions bot pushed a commit that referenced this pull request Feb 22, 2023
### [1.8.1](v1.8.0...v1.8.1) (2023-02-22)

### Bug Fixes

* layer2 interface creation ([#496](#496)) ([424c74c](424c74c))
@github-actions
Copy link

🎉 This PR is included in version 1.8.1 🎉

The release is available on PyPI and GitHub release

Posted by semantic-release bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants