From 5e61dd59b1df7df1a31b0e8adcf56fc2b5b61f8e Mon Sep 17 00:00:00 2001 From: Paul Nguyen Date: Wed, 18 Nov 2020 14:09:37 -0800 Subject: [PATCH] fix(app/addon): correct user-id tag_user / untag_user Fix pandevice user-id tag_user / untag_user --- Splunk_TA_paloalto/bin/lib/pandevice/pandevice/userid.py | 4 ++-- .../bin/lib/pandevice/pandevice/userid.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Splunk_TA_paloalto/bin/lib/pandevice/pandevice/userid.py b/Splunk_TA_paloalto/bin/lib/pandevice/pandevice/userid.py index 9fac34f2..39ed28a9 100644 --- a/Splunk_TA_paloalto/bin/lib/pandevice/pandevice/userid.py +++ b/Splunk_TA_paloalto/bin/lib/pandevice/pandevice/userid.py @@ -661,7 +661,7 @@ def tag_user(self, user, tags, timeout=None, prefix=None): # Find the tags section for this specific user. entries = ru.findall('./entry') for entry in entries: - if entry.attrib['name'] == user: + if entry.attrib['user'] == user: te = entry.find('./tag') break else: @@ -705,7 +705,7 @@ def untag_user(self, user, tags=None, prefix=None): # Find the tags section for this specific user. entries = uu.findall('./entry') for entry in entries: - if entry.attrib['name'] == user: + if entry.attrib['user'] == user: break else: entry = ET.SubElement(uu, 'entry', {'user': user, }) diff --git a/SplunkforPaloAltoNetworks/bin/lib/pandevice/pandevice/userid.py b/SplunkforPaloAltoNetworks/bin/lib/pandevice/pandevice/userid.py index 9fac34f2..39ed28a9 100644 --- a/SplunkforPaloAltoNetworks/bin/lib/pandevice/pandevice/userid.py +++ b/SplunkforPaloAltoNetworks/bin/lib/pandevice/pandevice/userid.py @@ -661,7 +661,7 @@ def tag_user(self, user, tags, timeout=None, prefix=None): # Find the tags section for this specific user. entries = ru.findall('./entry') for entry in entries: - if entry.attrib['name'] == user: + if entry.attrib['user'] == user: te = entry.find('./tag') break else: @@ -705,7 +705,7 @@ def untag_user(self, user, tags=None, prefix=None): # Find the tags section for this specific user. entries = uu.findall('./entry') for entry in entries: - if entry.attrib['name'] == user: + if entry.attrib['user'] == user: break else: entry = ET.SubElement(uu, 'entry', {'user': user, })