Skip to content

Commit d2a925e

Browse files
committed
Merge branch 'release/0.10.0'
2 parents aca38f1 + 249ae0f commit d2a925e

File tree

4 files changed

+64
-3
lines changed

4 files changed

+64
-3
lines changed

HISTORY.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@
33
History
44
=======
55

6-
0.9.2
6+
0.11.0
77
-----
88

99
Released: Pending
1010

1111
Status: Alpha
1212

13+
0.10.0
14+
------
15+
16+
Released: 2019-05-07
17+
18+
Status: Alpha
19+
20+
- Added `device.Telemetry`
21+
1322
0.9.1
1423
-----
1524

pandevice/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
__author__ = 'Palo Alto Networks'
2525
__email__ = '[email protected]'
26-
__version__ = '0.9.1'
26+
__version__ = '0.10.0'
2727

2828

2929
import logging

pandevice/device.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ class SystemSettings(VersionedPanObject):
262262
CHILDTYPES = (
263263
"device.NTPServerPrimary",
264264
"device.NTPServerSecondary",
265+
"device.Telemetry",
265266
)
266267

267268
def _setup(self):
@@ -452,3 +453,54 @@ def change_password(self, new_password):
452453
dev = self.nearest_pandevice()
453454
self.password_hash = dev.request_password_hash(new_password)
454455
self.update('password_hash')
456+
457+
458+
class Telemetry(VersionedPanObject):
459+
"""Share telemetry data with Palo Alto Networks.
460+
461+
Join other Palo Alto Networks customers in a global sharing community,
462+
helping to raise the bar against the latest attack techniques. Your
463+
participation allows us to deliver new threat prevention controls across
464+
the attack lifecycle. Choose the type of data you share across
465+
applications, threat intelligence, and device health information to improve
466+
the fidelity of the protections we deliver. This is an opt-in feature
467+
controlled with granular policy, and we encourage you to join the
468+
community.
469+
470+
Add only one of these to a firewall.
471+
472+
Args:
473+
app_reports (bool): Application reports
474+
threat_reports (bool): Threat preventioin reports
475+
url_reports (bool): URL reports
476+
file_type_reports (bool): File type identification reports
477+
threat_data (bool): Threat prevention data
478+
threat_pcaps (bool): Enable sending packet captures with threat
479+
prevention information. This requires that "threat_data" also be
480+
enabled.
481+
product_usage_stats (bool): Health and performance reports
482+
passive_dns_monitoring (bool): Passive DNS monitoring
483+
484+
"""
485+
NAME = None
486+
ROOT = Root.DEVICE
487+
488+
def _setup(self):
489+
# xpaths
490+
self._xpaths.add_profile(value='/update-schedule/statistics-service')
491+
492+
bool_params = (
493+
('app_reports', 'application-reports'),
494+
('threat_reports', 'threat-prevention-reports'),
495+
('url_reports', 'url-reports'),
496+
('file_type_reports', 'file-identification-reports'),
497+
('threat_data', 'threat-prevention-information'),
498+
('threat_pcaps', 'threat-prevention-pcap'),
499+
('product_usage_stats', 'health-performance-reports'),
500+
('passive_dns_monitoring', 'passive-dns-monitoring'),
501+
)
502+
503+
self._params = tuple(
504+
VersionedParamPath(param, vartype='yesno', path=path)
505+
for param, path in bool_params
506+
)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
setup(
2525
name='pandevice',
26-
version='0.9.1',
26+
version='0.10.0',
2727
description='Framework for interacting with Palo Alto Networks devices via API',
2828
long_description='The Palo Alto Networks Device Framework is a way to interact with Palo Alto Networks devices (including Next-generation Firewalls and Panorama) using the device API that is object oriented and conceptually similar to interaction with the device via the GUI or CLI.',
2929
author='Palo Alto Networks',

0 commit comments

Comments
 (0)