You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Version 1.0.8 (13/10/2025)
1. Updated common.py to include an optioal timeout parameter for web requests within the ClearPassAPILogin class.
2. API code includes new, modified or deleted API that is implemented in Aruba ClearPass v6.12.6.
3. Updated Readme
4. Included new function within new Utils class to pull token from token file.
5. Updated __init__.py file
Copy file name to clipboardExpand all lines: PKG-INFO.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Metadata-Version: 2.1
2
2
Name: pyclearpass
3
-
Version: 1.0.7
3
+
Version: 1.0.8
4
4
Summary: This package contains all of the API functions to work with the HPE Aruba Networking ClearPass API. This package been built based on version v6.12 but is always generated on the latest version available to download.
3. Using the api token located in a file. You can generate an API token by clicking on the API client and then clicking 'Generate Access Token'. The Token file is expected in the following format and is expected to exist in the script execution folder. This is the preferred method to avoid having your credentials directly exposed in your script file.
92
+
93
+
```json
94
+
{"access_token":"your_token_here"}
95
+
```
96
+
The python file is expected in the following format
Find an API you want to use, by prefixing `Api` in your IDE and Intellisense will show the available APIs available. Each of the top level API category names are available as a module. Once you have chosen a specific API module to use, for example ApiPolicyElements, it will show you the available methods if you suffix a . to the command - `ApiPolicyElements.`
92
103
93
104
The example below prints a single the roles available within the ClearPass server.
@@ -133,9 +144,10 @@ or
133
144
134
145
The examples below all exclude importing the module and creating the login variable. This is described directly below. Note, these are just a full examples, there are hundreds of API commands available within the SDK.
135
146
136
-
## New Login Session (Mandatory)
147
+
## Login
148
+
### Mandatory Login Session Parameters
137
149
138
-
The login variable only needs to be defined once in the script. Two examples are shown below to achieve this;
150
+
The login variable only needs to be defined once in the script. Three examples are shown below to achieve this;
3. Using the api token located in a file. You can generate an API token by clicking on the API client and then clicking 'Generate Access Token'. The Token file is expected in the following format and is expected to exist in the script execution folder. This is the preferred method to avoid having your credentials directly exposed in your script file.
172
+
173
+
```json
174
+
{"access_token":"your_token_here"}
175
+
```
176
+
The python file is expected in the following format
You can also include a timeout on the within the ClearPassAPILogin class to define how long the web request should try before timing out. An example is provided below of 10 seconds
> You may find it easier to initially pull a working Enforcement Policy with minimal rules before trying to create a new one from scratch.
403
-
>
404
-
> For example, the rule evaluation in the GUI shows as 'First applicable', however in the back-end it is shown as 'first-applicable'. This example is a working policy. It is demonstrated with a loop which could read an entry in a CSV file if adapted.
405
-
406
-
## Update an existing Enforcement Policy, retaining the original items and using a loop to add additional items
description = "HPE Aruba Networking ClearPass SDK has been developed in Python v3.9 to utilise the full functionality of the HPE Aruba Networking ClearPass REST API environment. Each available REST API command is available for use in this module."
description='HPE Aruba Networking ClearPass SDK has been developed in Python v3.9 to utilise the full functionality of the HPE Aruba Networking ClearPass REST API environment. Each available REST API command is available for use in this package.',
0 commit comments