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

The Class definition for ntp-servers is missing the "authentication-type" parameter. #504

Open
rokkberr opened this issue Apr 26, 2023 · 0 comments
Labels

Comments

@rokkberr
Copy link

rokkberr commented Apr 26, 2023

Describe the bug

The Class definition for ntp-servers is missing the "authentication-type" parameter.

Expected behavior

When I modify or instantiate an NTPServerPrimary of NTPServerSecondary object, and apply it to the firewall, it should be reflected in the configuration as such:

ntp-servers {
  primary-ntp-server {
    ntp-server-address <address>;
    authentication-type {
      none;
    }
  }
}

Current behavior

If I modify an existing object, the "authentication-type" block disappears.
If I instantiate a new object, adds it to the systemSettings object as a child, the "authentication-type" block is never made.

Possible solution

Steps to reproduce

Firewall:

firewall# show deviceconfig system ntp-servers
ntp-servers {
  primary-ntp-server {
    ntp-server-address ntp1.example.com;
    authentication-type {
      none;
    }
  }
}

Python:

firewall = panos.firewall.Firewall(<parameters>)
sysset = panos.device.SystemSettings.refreshall(firewall)
ntpobj = sysset.children[0]
print (ntpobj.address)
>> 'ntp1.example.com'
ntpobj.address="ntp2.example.com"
ntpobj.apply()

Firewall:

firewall# show deviceconfig system ntp-servers
ntp-servers {
  primary-ntp-server {
    ntp-server-address ntp2.example.com;
  }
}

Screenshots

Context

I have about 20 firewalls with a wrong ntp configuration. I would love to edit it via Python code instead of logging into each one to fix them by CLI.

Your Environment

Python 3.11.2
pan-os-python 1.8.1

Tested on two firewalls:
model: PA-5220
sw-version: 10.2.3-h4

model: PA-220
sw-version: 9.1.12-h3

@rokkberr rokkberr added the bug label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant