diff --git a/README.md b/README.md index d45376c..a85e2f6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![PyPI - License](https://img.shields.io/pypi/l/prisma-sase.svg?color=brightgreen)](https://pypi.org/project/prisma-sase/) [![GitHub issues](https://img.shields.io/github/issues/PaloAltoNetworks/prisma-sase-sdk-python.svg)](https://github.com/PaloAltoNetworks/prisma-sase-sdk-python/issues) -# Palo Alto Networks Prisma SASE Python SDK v6.2.1b1 +# Palo Alto Networks Prisma SASE Python SDK v6.2.2b1 Python2 and Python3 SDK for the Prisma SASE AppFabric #### Synopsis @@ -44,6 +44,7 @@ MIT #### Version | Version | Build | Changes | | ------- | ----- | ------- | +| **6.2.2** | **b1** | Support for June 2023 Controller release. | | **6.2.1** | **b1** | Support for April 2023 Controller release. | | **6.1.2** | **b1** | Support for January 2023 Controller release. | | **6.1.1** | **b1** | Support for November 2022 Controller release. | diff --git a/docs/index.html b/docs/index.html index 088ca58..e3d1614 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,7 +8,7 @@ prisma_sase documentation @@ -2650,7 +2650,7 @@

Index

prisma_sase module

Python2 and Python3 SDK for the Prisma SASE AppFabric

-

Version: v6.2.1b1

+

Version: v6.2.2b1

Author: Palo Alto Networks

Copyright: © 2023 Palo Alto Networks. All rights reserved

License: MIT

@@ -2698,7 +2698,7 @@

For more info

"""
 Python2 and Python3 SDK for the Prisma SASE AppFabric
 
-**Version:** v6.2.1b1
+**Version:** v6.2.2b1
 
 **Author:** Palo Alto Networks
 
@@ -2840,7 +2840,7 @@ 

For more info

# Version of SDK -version = "6.2.1b1" +version = "6.2.2b1" """SDK Version string""" __version__ = version @@ -6976,7 +6976,7 @@

Static methods

-

def modify_rest_retry(

self, total=8, connect=None, read=None, redirect=None, status=None, method_whitelist=frozenset({'GET', 'DELETE', 'PUT', 'HEAD', 'OPTIONS', 'TRACE'}), status_forcelist=None, backoff_factor=0.705883, raise_on_redirect=True, raise_on_status=True, respect_retry_after_header=True, adapter_url='https://')

+

def modify_rest_retry(

self, total=8, connect=None, read=None, redirect=None, status=None, method_whitelist=frozenset({'GET', 'HEAD', 'PUT', 'TRACE', 'OPTIONS', 'DELETE'}), status_forcelist=None, backoff_factor=0.705883, raise_on_redirect=True, raise_on_status=True, respect_retry_after_header=True, adapter_url='https://')

diff --git a/docs/interactive.m.html b/docs/interactive.m.html index ec5baa9..db61e2f 100644 --- a/docs/interactive.m.html +++ b/docs/interactive.m.html @@ -2879,7 +2879,8 @@

prisma_sase.interactive module

return False else: - print("Profile retrieval failed.") + print("Warning: Prisma SD-WAN profile retrieval failure. Please check if the service account " + "has the right privileges or Prisma SD-WAN is activated.") # Profile detail retrieval failed self._parent_class.email = None self._parent_class._password = None @@ -3021,7 +3022,8 @@

prisma_sase.interactive module

return False else: - print("Profile retrieval failed.") + print("Warning: Prisma SD-WAN profile retrieval failure. Please check if the service account " + "has the right privileges or Prisma SD-WAN is activated.") # Profile detail retrieval failed self._parent_class.client_id = None self._parent_class.client_secret = None @@ -3391,7 +3393,7 @@

prisma_sase.interactive module

return True else: - print("Profile retrieval failed.") + api_logger.info('Profile retrieval failed.') # clear password out of memory self._parent_class._password = None return False @@ -4048,7 +4050,8 @@

Classes

return False else: - print("Profile retrieval failed.") + print("Warning: Prisma SD-WAN profile retrieval failure. Please check if the service account " + "has the right privileges or Prisma SD-WAN is activated.") # Profile detail retrieval failed self._parent_class.email = None self._parent_class._password = None @@ -4190,7 +4193,8 @@

Classes

return False else: - print("Profile retrieval failed.") + print("Warning: Prisma SD-WAN profile retrieval failure. Please check if the service account " + "has the right privileges or Prisma SD-WAN is activated.") # Profile detail retrieval failed self._parent_class.client_id = None self._parent_class.client_secret = None @@ -4560,7 +4564,7 @@

Classes

return True else: - print("Profile retrieval failed.") + api_logger.info('Profile retrieval failed.') # clear password out of memory self._parent_class._password = None return False @@ -5620,7 +5624,8 @@

Static methods

self._parent_class.remove_header('Referer') return False else: - print("Profile retrieval failed.") + print("Warning: Prisma SD-WAN profile retrieval failure. Please check if the service account " + "has the right privileges or Prisma SD-WAN is activated.") # Profile detail retrieval failed self._parent_class.email = None self._parent_class._password = None @@ -5776,7 +5781,8 @@

Static methods

self._parent_class.client_secret = None return False else: - print("Profile retrieval failed.") + print("Warning: Prisma SD-WAN profile retrieval failure. Please check if the service account " + "has the right privileges or Prisma SD-WAN is activated.") # Profile detail retrieval failed self._parent_class.client_id = None self._parent_class.client_secret = None @@ -6380,7 +6386,7 @@

Static methods

self._parent_class.token_session = profile.sdk_content.get('token_session') return True else: - print("Profile retrieval failed.") + api_logger.info('Profile retrieval failed.') # clear password out of memory self._parent_class._password = None return False diff --git a/docs/post_api.m.html b/docs/post_api.m.html index 709efae..7941798 100644 --- a/docs/post_api.m.html +++ b/docs/post_api.m.html @@ -2596,6 +2596,8 @@

Index

  • deviceidconfigs
  • dhcpservers
  • directoryservices
  • +
  • directoryservices_deltasync
  • +
  • directoryservices_sync
  • directoryusergroups_query
  • directoryusers_query
  • dnsserviceprofiles
  • @@ -3491,6 +3493,50 @@

    prisma_sase.post_api module

    api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) + def directoryservices_deltasync(self, data, api_version="v2.0"): + """ + POST Directoryservices_Deltasync API Function + + **Parameters:**: + + - **data**: Dictionary containing data to POST as JSON + - **api_version**: API version to use (default v2.0) + + **Payload Attributes:** + + + **Returns:** requests.Response object extended with sdk_status and sdk_content properties. + """ + + cur_ctlr = self._parent_class.controller + + url = str(cur_ctlr) + "/sdwan/{}/api/directoryservices/deltasync".format(api_version) + + api_logger.debug("URL = %s", url) + return self._parent_class.rest_call(url, "post", data=data) + + def directoryservices_sync(self, data, api_version="v2.0"): + """ + POST Directoryservices_Sync API Function + + **Parameters:**: + + - **data**: Dictionary containing data to POST as JSON + - **api_version**: API version to use (default v2.0) + + **Payload Attributes:** + + + **Returns:** requests.Response object extended with sdk_status and sdk_content properties. + """ + + cur_ctlr = self._parent_class.controller + + url = str(cur_ctlr) + "/sdwan/{}/api/directoryservices/sync".format(api_version) + + api_logger.debug("URL = %s", url) + return self._parent_class.rest_call(url, "post", data=data) + def directoryusergroups_query(self, data, api_version="v2.0"): """ POST Directoryusergroups_Query API Function @@ -5272,7 +5318,7 @@

    prisma_sase.post_api module

    cur_ctlr = self._parent_class.controller - url = str(cur_ctlr) + "/sdwan/monitor/{}/api/monitor/insights".format(api_version) + url = str(cur_ctlr) + "/sdwan/{}/api/monitor/insights".format(api_version) api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) @@ -5294,7 +5340,7 @@

    prisma_sase.post_api module

    cur_ctlr = self._parent_class.controller - url = str(cur_ctlr) + "/sdwan/monitor/{}/api/monitor/insightslist".format(api_version) + url = str(cur_ctlr) + "/sdwan/{}/api/monitor/insightslist".format(api_version) api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) @@ -9315,6 +9361,9 @@

    prisma_sase.post_api module

    configs_sdwanapps = sdwanapps_configs """ Backwards-compatibility alias of `configs_sdwanapps` to `sdwanapps_configs`""" + deltasync_directoryservices = directoryservices_deltasync + """ Backwards-compatibility alias of `deltasync_directoryservices` to `directoryservices_deltasync`""" + extensions_i = element_extensions """ Backwards-compatibility alias of `extensions_i` to `element_extensions`""" @@ -9813,6 +9862,9 @@

    prisma_sase.post_api module

    summary_events = events_summary """ Backwards-compatibility alias of `summary_events` to `events_summary`""" + sync_directoryservices = directoryservices_sync + """ Backwards-compatibility alias of `sync_directoryservices` to `directoryservices_sync`""" + sys_metrics_monitor = monitor_sys_metrics """ Backwards-compatibility alias of `sys_metrics_monitor` to `monitor_sys_metrics`""" @@ -10454,6 +10506,50 @@

    Classes

    api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) + def directoryservices_deltasync(self, data, api_version="v2.0"): + """ + POST Directoryservices_Deltasync API Function + + **Parameters:**: + + - **data**: Dictionary containing data to POST as JSON + - **api_version**: API version to use (default v2.0) + + **Payload Attributes:** + + + **Returns:** requests.Response object extended with sdk_status and sdk_content properties. + """ + + cur_ctlr = self._parent_class.controller + + url = str(cur_ctlr) + "/sdwan/{}/api/directoryservices/deltasync".format(api_version) + + api_logger.debug("URL = %s", url) + return self._parent_class.rest_call(url, "post", data=data) + + def directoryservices_sync(self, data, api_version="v2.0"): + """ + POST Directoryservices_Sync API Function + + **Parameters:**: + + - **data**: Dictionary containing data to POST as JSON + - **api_version**: API version to use (default v2.0) + + **Payload Attributes:** + + + **Returns:** requests.Response object extended with sdk_status and sdk_content properties. + """ + + cur_ctlr = self._parent_class.controller + + url = str(cur_ctlr) + "/sdwan/{}/api/directoryservices/sync".format(api_version) + + api_logger.debug("URL = %s", url) + return self._parent_class.rest_call(url, "post", data=data) + def directoryusergroups_query(self, data, api_version="v2.0"): """ POST Directoryusergroups_Query API Function @@ -12235,7 +12331,7 @@

    Classes

    cur_ctlr = self._parent_class.controller - url = str(cur_ctlr) + "/sdwan/monitor/{}/api/monitor/insights".format(api_version) + url = str(cur_ctlr) + "/sdwan/{}/api/monitor/insights".format(api_version) api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) @@ -12257,7 +12353,7 @@

    Classes

    cur_ctlr = self._parent_class.controller - url = str(cur_ctlr) + "/sdwan/monitor/{}/api/monitor/insightslist".format(api_version) + url = str(cur_ctlr) + "/sdwan/{}/api/monitor/insightslist".format(api_version) api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) @@ -16278,6 +16374,9 @@

    Classes

    configs_sdwanapps = sdwanapps_configs """ Backwards-compatibility alias of `configs_sdwanapps` to `sdwanapps_configs`""" + deltasync_directoryservices = directoryservices_deltasync + """ Backwards-compatibility alias of `deltasync_directoryservices` to `directoryservices_deltasync`""" + extensions_i = element_extensions """ Backwards-compatibility alias of `extensions_i` to `element_extensions`""" @@ -16776,6 +16875,9 @@

    Classes

    summary_events = events_summary """ Backwards-compatibility alias of `summary_events` to `events_summary`""" + sync_directoryservices = directoryservices_sync + """ Backwards-compatibility alias of `sync_directoryservices` to `directoryservices_sync`""" + sys_metrics_monitor = monitor_sys_metrics """ Backwards-compatibility alias of `sys_metrics_monitor` to `monitor_sys_metrics`""" @@ -16950,6 +17052,17 @@

    Class variables

    +
    +
    +

    var deltasync_directoryservices

    + + + + +

    Backwards-compatibility alias of deltasync_directoryservices to directoryservices_deltasync

    +
    +
    +

    var elements_bulk_config_state_query

    @@ -18820,6 +18933,17 @@

    Class variables

    +
    +
    +

    var sync_directoryservices

    + + + + +

    Backwards-compatibility alias of sync_directoryservices to directoryservices_sync

    +
    +
    +

    var sys_metrics_monitor

    @@ -19941,6 +20065,86 @@

    Static methods

    +
    +
    +

    def directoryservices_deltasync(

    self, data, api_version='v2.0')

    +
    + + + + +

    POST Directoryservices_Deltasync API Function

    +

    Parameters::

    +
      +
    • data: Dictionary containing data to POST as JSON
    • +
    • api_version: API version to use (default v2.0)
    • +
    +

    Payload Attributes:

    +

    Returns: requests.Response object extended with sdk_status and sdk_content properties.

    +
    + +
    +
    def directoryservices_deltasync(self, data, api_version="v2.0"):
    +    """
    +    POST Directoryservices_Deltasync API Function
    +      **Parameters:**:
    +      - **data**: Dictionary containing data to POST as JSON
    +      - **api_version**: API version to use (default v2.0)
    +      **Payload Attributes:** 
    +    **Returns:** requests.Response object extended with sdk_status and sdk_content properties.
    +    """
    +    cur_ctlr = self._parent_class.controller
    +    url = str(cur_ctlr) + "/sdwan/{}/api/directoryservices/deltasync".format(api_version)
    +    api_logger.debug("URL = %s", url)
    +    return self._parent_class.rest_call(url, "post", data=data)
    +
    + +
    +
    + +
    + + +
    +
    +

    def directoryservices_sync(

    self, data, api_version='v2.0')

    +
    + + + + +

    POST Directoryservices_Sync API Function

    +

    Parameters::

    +
      +
    • data: Dictionary containing data to POST as JSON
    • +
    • api_version: API version to use (default v2.0)
    • +
    +

    Payload Attributes:

    +

    Returns: requests.Response object extended with sdk_status and sdk_content properties.

    +
    + +
    +
    def directoryservices_sync(self, data, api_version="v2.0"):
    +    """
    +    POST Directoryservices_Sync API Function
    +      **Parameters:**:
    +      - **data**: Dictionary containing data to POST as JSON
    +      - **api_version**: API version to use (default v2.0)
    +      **Payload Attributes:** 
    +    **Returns:** requests.Response object extended with sdk_status and sdk_content properties.
    +    """
    +    cur_ctlr = self._parent_class.controller
    +    url = str(cur_ctlr) + "/sdwan/{}/api/directoryservices/sync".format(api_version)
    +    api_logger.debug("URL = %s", url)
    +    return self._parent_class.rest_call(url, "post", data=data)
    +
    + +
    +
    + +
    + +

    def directoryusergroups_query(

    self, data, api_version='v2.0')

    @@ -23162,7 +23366,7 @@

    Static methods

    **Returns:** requests.Response object extended with sdk_status and sdk_content properties. """ cur_ctlr = self._parent_class.controller - url = str(cur_ctlr) + "/sdwan/monitor/{}/api/monitor/insights".format(api_version) + url = str(cur_ctlr) + "/sdwan/{}/api/monitor/insights".format(api_version) api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data)
    @@ -23202,7 +23406,7 @@

    Static methods

    **Returns:** requests.Response object extended with sdk_status and sdk_content properties. """ cur_ctlr = self._parent_class.controller - url = str(cur_ctlr) + "/sdwan/monitor/{}/api/monitor/insightslist".format(api_version) + url = str(cur_ctlr) + "/sdwan/{}/api/monitor/insightslist".format(api_version) api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) diff --git a/prisma_sase/__init__.py b/prisma_sase/__init__.py index ecacc3c..b75fc8c 100644 --- a/prisma_sase/__init__.py +++ b/prisma_sase/__init__.py @@ -1,7 +1,7 @@ """ Python2 and Python3 SDK for the Prisma SASE AppFabric -**Version:** v6.2.1b1 +**Version:** v6.2.2b1 **Author:** Palo Alto Networks @@ -21,6 +21,7 @@ * Python modules: * Requests + Security Extras >= 2.22.0- * Websockets (if Python >= 3.6) >= 8.1- + * urllib3 <= 1.26.16 - #### Code Example Super-simplified example code (rewrite of example.py in ~4 lines of code): @@ -143,7 +144,7 @@ # Version of SDK -version = "6.2.1b1" +version = "6.2.2b1" """SDK Version string""" __version__ = version @@ -485,6 +486,9 @@ def __init__(self, controller=controller, ssl_verify=verify, update_check=True): self.verify, self._session) + print("WARNING: prisma_sase SDK will soon end support for python versions 2.x, 3.6 and below. " + "Please update your python environment to 3.7 or above by the end of September 2023. ") + # Websocket/Python 3.6_ features if PYTHON36_FEATURES: # Update Headers for WebSocket requests diff --git a/prisma_sase/post_api.py b/prisma_sase/post_api.py index d55f2c2..c71c13b 100644 --- a/prisma_sase/post_api.py +++ b/prisma_sase/post_api.py @@ -612,6 +612,50 @@ def directoryservices(self, data, api_version="v2.0"): api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) + def directoryservices_deltasync(self, data, api_version="v2.0"): + """ + POST Directoryservices_Deltasync API Function + + **Parameters:**: + + - **data**: Dictionary containing data to POST as JSON + - **api_version**: API version to use (default v2.0) + + **Payload Attributes:** + + + **Returns:** requests.Response object extended with sdk_status and sdk_content properties. + """ + + cur_ctlr = self._parent_class.controller + + url = str(cur_ctlr) + "/sdwan/{}/api/directoryservices/deltasync".format(api_version) + + api_logger.debug("URL = %s", url) + return self._parent_class.rest_call(url, "post", data=data) + + def directoryservices_sync(self, data, api_version="v2.0"): + """ + POST Directoryservices_Sync API Function + + **Parameters:**: + + - **data**: Dictionary containing data to POST as JSON + - **api_version**: API version to use (default v2.0) + + **Payload Attributes:** + + + **Returns:** requests.Response object extended with sdk_status and sdk_content properties. + """ + + cur_ctlr = self._parent_class.controller + + url = str(cur_ctlr) + "/sdwan/{}/api/directoryservices/sync".format(api_version) + + api_logger.debug("URL = %s", url) + return self._parent_class.rest_call(url, "post", data=data) + def directoryusergroups_query(self, data, api_version="v2.0"): """ POST Directoryusergroups_Query API Function @@ -2393,7 +2437,7 @@ def monitor_insights(self, data, api_version="v2.0"): cur_ctlr = self._parent_class.controller - url = str(cur_ctlr) + "/sdwan/monitor/{}/api/monitor/insights".format(api_version) + url = str(cur_ctlr) + "/sdwan/{}/api/monitor/insights".format(api_version) api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) @@ -2415,7 +2459,7 @@ def monitor_insightslist(self, data, api_version="v2.0"): cur_ctlr = self._parent_class.controller - url = str(cur_ctlr) + "/sdwan/monitor/{}/api/monitor/insightslist".format(api_version) + url = str(cur_ctlr) + "/sdwan/{}/api/monitor/insightslist".format(api_version) api_logger.debug("URL = %s", url) return self._parent_class.rest_call(url, "post", data=data) @@ -6436,6 +6480,9 @@ def ws_extensions_query(self, data, api_version="v2.0"): configs_sdwanapps = sdwanapps_configs """ Backwards-compatibility alias of `configs_sdwanapps` to `sdwanapps_configs`""" + deltasync_directoryservices = directoryservices_deltasync + """ Backwards-compatibility alias of `deltasync_directoryservices` to `directoryservices_deltasync`""" + extensions_i = element_extensions """ Backwards-compatibility alias of `extensions_i` to `element_extensions`""" @@ -6934,6 +6981,9 @@ def ws_extensions_query(self, data, api_version="v2.0"): summary_events = events_summary """ Backwards-compatibility alias of `summary_events` to `events_summary`""" + sync_directoryservices = directoryservices_sync + """ Backwards-compatibility alias of `sync_directoryservices` to `directoryservices_sync`""" + sys_metrics_monitor = monitor_sys_metrics """ Backwards-compatibility alias of `sys_metrics_monitor` to `monitor_sys_metrics`""" diff --git a/requirements.txt b/requirements.txt index 84544be..2914190 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ requests[security] >= 2.22.0 websockets >= 8.1; python_version >= "3.6" +urllib3 <= 1.26.16 diff --git a/setup.cfg b/setup.cfg index 273d4f7..3c3a63c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] name = prisma-sase description = Python2 and Python3 SDK for the Prisma SASE AppFabric -version = v6.2.1b1 +version = v6.2.2b1 author = Prisma SASE Developer Support author-email = prisma-sase-developers@paloaltonetworks.com description-file = README.md diff --git a/setup.py b/setup.py index df10ea8..7fe215b 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ long_description = f.read() setup(name='prisma-sase', - version='6.2.1b1', + version='6.2.2b1', description='Python2 and Python3 SDK for the Prisma SASE AppFabric', long_description=long_description, long_description_content_type='text/markdown', @@ -14,7 +14,8 @@ license='MIT', install_requires=[ 'requests[security] >= 2.22.0', - 'websockets >= 8.1; python_version >= "3.6"' + 'websockets >= 8.1; python_version >= "3.6"', + 'urllib3 <= 1.26.16' ], packages=['prisma_sase'], classifiers=[