diff --git a/pkgs/ops-pkg/changelog/undistributed/2025_11_04_cisco_ios_xe_learn_ntp.rst b/pkgs/ops-pkg/changelog/undistributed/2025_11_04_cisco_ios_xe_learn_ntp.rst new file mode 100644 index 000000000..2f2eb2a8d --- /dev/null +++ b/pkgs/ops-pkg/changelog/undistributed/2025_11_04_cisco_ios_xe_learn_ntp.rst @@ -0,0 +1,7 @@ +-------------------------------------------------------------------------------- + Fix +-------------------------------------------------------------------------------- +* IOSXE + * Modified: + * learn("ntp") + - "isconfigured" is a string rather than a boolean, matching nxos diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py index c8862cbab..a7c2dff63 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py @@ -55,7 +55,7 @@ def set_defaults(self, peer, vrf): local_dict = self.info['vrf'][vrf]['associations']['address'][peer]\ ['local_mode'][local_mode].setdefault('isconfigured', {}).\ - setdefault(isconfigured_value, {}) + setdefault(str(isconfigured_value), {}) local_dict['address'] = address local_dict['vrf'] = vrf local_dict['isconfigured'] = isconfigured_value diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/tests/ntp_output.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/tests/ntp_output.py index 51d903f06..101c5bb51 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/tests/ntp_output.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/tests/ntp_output.py @@ -192,7 +192,7 @@ class NtpOutput(object): 'local_mode': { 'client': { 'isconfigured': { - True: { + 'True': { 'address': '10.4.1.1', 'delay': 0.0, 'isconfigured': True, @@ -212,7 +212,7 @@ class NtpOutput(object): 'local_mode': { 'client': { 'isconfigured': { - False: { + 'False': { 'address': '127.127.1.1', 'delay': 0.0, 'isconfigured': False, @@ -232,7 +232,7 @@ class NtpOutput(object): 'local_mode': { 'client': { 'isconfigured': { - True: { + 'True': { 'address': '10.16.2.2', 'delay': 0.0, 'isconfigured': True, @@ -325,7 +325,7 @@ class NtpOutputNoConfig(object): 'local_mode': { 'client': { 'isconfigured': { - False: { + 'False': { 'address': '127.127.1.1', 'delay': 0.0, 'isconfigured': False,