Skip to content

Commit

Permalink
Merge branch 'release/0.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
shinmog committed May 7, 2019
2 parents aca38f1 + 249ae0f commit d2a925e
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 3 deletions.
11 changes: 10 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@
History
=======

0.9.2
0.11.0
-----

Released: Pending

Status: Alpha

0.10.0
------

Released: 2019-05-07

Status: Alpha

- Added `device.Telemetry`

0.9.1
-----

Expand Down
2 changes: 1 addition & 1 deletion pandevice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

__author__ = 'Palo Alto Networks'
__email__ = '[email protected]'
__version__ = '0.9.1'
__version__ = '0.10.0'


import logging
Expand Down
52 changes: 52 additions & 0 deletions pandevice/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ class SystemSettings(VersionedPanObject):
CHILDTYPES = (
"device.NTPServerPrimary",
"device.NTPServerSecondary",
"device.Telemetry",
)

def _setup(self):
Expand Down Expand Up @@ -452,3 +453,54 @@ def change_password(self, new_password):
dev = self.nearest_pandevice()
self.password_hash = dev.request_password_hash(new_password)
self.update('password_hash')


class Telemetry(VersionedPanObject):
"""Share telemetry data with Palo Alto Networks.
Join other Palo Alto Networks customers in a global sharing community,
helping to raise the bar against the latest attack techniques. Your
participation allows us to deliver new threat prevention controls across
the attack lifecycle. Choose the type of data you share across
applications, threat intelligence, and device health information to improve
the fidelity of the protections we deliver. This is an opt-in feature
controlled with granular policy, and we encourage you to join the
community.
Add only one of these to a firewall.
Args:
app_reports (bool): Application reports
threat_reports (bool): Threat preventioin reports
url_reports (bool): URL reports
file_type_reports (bool): File type identification reports
threat_data (bool): Threat prevention data
threat_pcaps (bool): Enable sending packet captures with threat
prevention information. This requires that "threat_data" also be
enabled.
product_usage_stats (bool): Health and performance reports
passive_dns_monitoring (bool): Passive DNS monitoring
"""
NAME = None
ROOT = Root.DEVICE

def _setup(self):
# xpaths
self._xpaths.add_profile(value='/update-schedule/statistics-service')

bool_params = (
('app_reports', 'application-reports'),
('threat_reports', 'threat-prevention-reports'),
('url_reports', 'url-reports'),
('file_type_reports', 'file-identification-reports'),
('threat_data', 'threat-prevention-information'),
('threat_pcaps', 'threat-prevention-pcap'),
('product_usage_stats', 'health-performance-reports'),
('passive_dns_monitoring', 'passive-dns-monitoring'),
)

self._params = tuple(
VersionedParamPath(param, vartype='yesno', path=path)
for param, path in bool_params
)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

setup(
name='pandevice',
version='0.9.1',
version='0.10.0',
description='Framework for interacting with Palo Alto Networks devices via API',
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.',
author='Palo Alto Networks',
Expand Down

0 comments on commit d2a925e

Please sign in to comment.