Skip to content

Commit

Permalink
test: Adding new tests for class params (#356)
Browse files Browse the repository at this point in the history
* test: Adding new tests for class params

This also fixes a number of issues these tests found.
  • Loading branch information
shinmog authored Jul 7, 2021
1 parent bab35d1 commit 6162912
Show file tree
Hide file tree
Showing 6 changed files with 282 additions and 56 deletions.
3 changes: 3 additions & 0 deletions panos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ class NTPServer(PanObject):
# TODO: Add authentication
# TODO: Add PAN-OS pre-7.0 support

NAME = None
XPATH = "/ntp-servers/primary-ntp-server"

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -805,6 +806,8 @@ class Administrator(VersionedPanObject):
role_profile (str): The role based profile
password_hash (encrypted str): The encrypted password
password_profile (str): The password profile for this user
vsys_device (list): The vsys list (excluded)
vsys_read_only_device (list): The read-only device list (excluded)
"""

Expand Down
10 changes: 6 additions & 4 deletions panos/ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class HighAvailabilityInterface(PanObject):
"""

NAME = None
HA_SYNC = False

# TODO: Support encryption
Expand Down Expand Up @@ -189,12 +190,13 @@ class HA1(HighAvailabilityInterface):
"""HA1 interface
Args:
ip-address (str): IP of the interface
ip_address (str): IP of the interface
netmask (str): Netmask of the interface
port (str): Interface to use for this HA interface (eg. ethernet1/5)
gateway (str): Default gateway of the interface
link_speed (str): Link speed
link_duplex (str): Link duplex
monitor_hold_time (int): Monitor hold time
"""

Expand All @@ -210,7 +212,7 @@ class HA1Backup(HighAvailabilityInterface):
"""HA1 Backup interface
Args:
ip-address (str): IP of the interface
ip_address (str): IP of the interface
netmask (str): Netmask of the interface
port (str): Interface to use for this HA interface (eg. ethernet1/5)
gateway (str): Default gateway of the interface
Expand All @@ -226,7 +228,7 @@ class HA2(HighAvailabilityInterface):
"""HA2 interface
Args:
ip-address (str): IP of the interface
ip_address (str): IP of the interface
netmask (str): Netmask of the interface
port (str): Interface to use for this HA interface (eg. ethernet1/5)
gateway (str): Default gateway of the interface
Expand All @@ -242,7 +244,7 @@ class HA2Backup(HighAvailabilityInterface):
"""HA2 Backup interface
Args:
ip-address (str): IP of the interface
ip_address (str): IP of the interface
netmask (str): Netmask of the interface
port (str): Interface to use for this HA interface (eg. ethernet1/5)
gateway (str): Default gateway of the interface
Expand Down
Loading

0 comments on commit 6162912

Please sign in to comment.