Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Translation Table for Disconnect JSON Response

When calling `disconnect_mac_address`, `count`, `count_success` and `count_failed` may be returned.

When `count` is `0`, no active session was found. This is a success,
since the `mac` is not connected.

Otherwise, look for `count_success` or `count_failed`.

count - 0 - no active session found (success)
count - 1 - count_success 1 = found and disconnected active session
count - 1 - count_failed 1 = found active session, but could not disconnect
4 changes: 2 additions & 2 deletions cassettes/test_404_disable_mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 17 Nov 2025 22:02:31 GMT
- Mon, 26 Jan 2026 17:53:03 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down Expand Up @@ -82,7 +82,7 @@ interactions:
Content-Type:
- application/problem+json
Date:
- Mon, 17 Nov 2025 22:02:31 GMT
- Mon, 26 Jan 2026 17:53:04 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down
4 changes: 2 additions & 2 deletions cassettes/test_404_enable_mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 17 Nov 2025 22:02:33 GMT
- Mon, 26 Jan 2026 17:52:28 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down Expand Up @@ -82,7 +82,7 @@ interactions:
Content-Type:
- application/problem+json
Date:
- Mon, 17 Nov 2025 22:02:34 GMT
- Mon, 26 Jan 2026 17:52:29 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down
2 changes: 1 addition & 1 deletion cassettes/test_connectivity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 17 Nov 2025 22:02:28 GMT
- Mon, 26 Jan 2026 17:53:35 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down
10 changes: 5 additions & 5 deletions cassettes/test_disable_mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 17 Nov 2025 22:02:29 GMT
- Mon, 26 Jan 2026 17:51:42 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down Expand Up @@ -71,7 +71,7 @@ interactions:
response:
body:
string: '{"id":4524,"mac_address":"123123123123","status":"Known","randomized_mac":true,"attributes":{},"added_at":"Nov
15, 2023 14:52:34 CST","updated_at":"Nov 17, 2025 15:02:29 CST","_links":{"self":{"href":"https:\/\/cleaned.example.edu\/api\/endpoint\/4524"}}}'
15, 2023 14:52:34 CST","updated_at":"Jan 26, 2026 11:50:00 CST","_links":{"self":{"href":"https:\/\/notauri.edu\/api\/endpoint\/4524"}}}'
headers:
Cache-Control:
- no-store, no-cache, must-revalidate
Expand All @@ -82,7 +82,7 @@ interactions:
Content-Type:
- application/hal+json
Date:
- Mon, 17 Nov 2025 22:02:30 GMT
- Mon, 26 Jan 2026 17:51:43 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down Expand Up @@ -129,7 +129,7 @@ interactions:
body:
string: '{"id":4524,"mac_address":"123123123123","status":"Disabled","randomized_mac":true,"attributes":{"Disabled
By":"TESTING","Disabled Reason":"Still testing..."},"added_at":"Nov 15, 2023
14:52:34 CST","updated_at":"Nov 17, 2025 16:02:30 CST","_links":{"self":{"href":"https:\/\/cleaned.example.edu\/api\/endpoint\/4524"}}}'
14:52:34 CST","updated_at":"Jan 26, 2026 11:51:43 CST","_links":{"self":{"href":"https:\/\/notauri.edu\/api\/endpoint\/4524"}}}'
headers:
Cache-Control:
- no-store, no-cache, must-revalidate
Expand All @@ -140,7 +140,7 @@ interactions:
Content-Type:
- application/hal+json
Date:
- Mon, 17 Nov 2025 22:02:30 GMT
- Mon, 26 Jan 2026 17:51:43 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down
111 changes: 111 additions & 0 deletions cassettes/test_disconnect_mac_address.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
interactions:
- request:
body: '{"grant_type": "password", "username": "JOE", "password": "NOTAPASSWORD",
"client_id": "FAKEID", "client_secret": "NOTASECRET"}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '238'
Content-Type:
- application/json
User-Agent:
- python-requests/2.32.5
method: POST
uri: https://cleaned.example.edu/api/oauth
response:
body:
string: '{"access_token": "NOTASECRET"}'
headers:
Cache-Control:
- no-store
Connection:
- Keep-Alive
Content-Length:
- '172'
Content-Type:
- application/json
Date:
- Tue, 10 Mar 2026 20:25:17 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
- timeout=4, max=500
Pragma:
- no-cache
Server:
- Apache
Set-Cookie: NO-COOKIE-FOR-YOU
Vary:
- X-Forwarded-For
X-Content-Type-Options:
- nosniff
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- 1;mode=block
- 1;mode=block
status:
code: 200
message: OK
- request:
body: '{}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer FAKE_TOKEN
Connection:
- keep-alive
Content-Length:
- '2'
Content-Type:
- application/json
User-Agent:
- python-requests/2.32.5
method: POST
uri: https://cleaned.example.edu/api/session-action/disconnect/mac/123123123123?async=false
response:
body:
string: '{"action_id":"async_action_1773174318368","status":"complete","count":1,"count_success":1,"count_failed":0,"count_queue":0,"_links":{"self":{"href":"https:\/\/cleaned.example.edu\/api\/session-action\/disconnect%2Fmac%2F123123123123"}}}'
headers:
Cache-Control:
- no-store, no-cache, must-revalidate
Connection:
- Keep-Alive
Content-Length:
- '251'
Content-Type:
- application/hal+json
Date:
- Tue, 10 Mar 2026 20:25:18 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
- timeout=4, max=500
Pragma:
- no-cache
Server:
- Apache
Set-Cookie: NO-COOKIE-FOR-YOU
Vary:
- X-Forwarded-For
X-Content-Type-Options:
- nosniff
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- 1;mode=block
- 1;mode=block
status:
code: 200
message: OK
version: 1
111 changes: 111 additions & 0 deletions cassettes/test_disconnect_mac_not_found.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
interactions:
- request:
body: '{"grant_type": "password", "username": "JOE", "password": "NOTAPASSWORD",
"client_id": "FAKEID", "client_secret": "NOTASECRET"}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '238'
Content-Type:
- application/json
User-Agent:
- python-requests/2.32.5
method: POST
uri: https://cleaned.example.edu/api/oauth
response:
body:
string: '{"access_token": "NOTASECRET"}'
headers:
Cache-Control:
- no-store
Connection:
- Keep-Alive
Content-Length:
- '172'
Content-Type:
- application/json
Date:
- Tue, 10 Mar 2026 20:25:17 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
- timeout=4, max=500
Pragma:
- no-cache
Server:
- Apache
Set-Cookie: NO-COOKIE-FOR-YOU
Vary:
- X-Forwarded-For
X-Content-Type-Options:
- nosniff
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- 1;mode=block
- 1;mode=block
status:
code: 200
message: OK
- request:
body: '{}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer FAKE_TOKEN
Connection:
- keep-alive
Content-Length:
- '2'
Content-Type:
- application/json
User-Agent:
- python-requests/2.32.5
method: POST
uri: https://cleaned.example.edu/api/session-action/disconnect/mac/123123123123?async=false
response:
body:
string: '{"action_id":"async_action_1773174318368","status":"failed","count":0,"count_success":0,"count_failed":0,"count_queue":0,"_links":{"self":{"href":"https:\/\/cleaned.example.edu\/api\/session-action\/disconnect%2Fmac%2F123123123123"}}}'
headers:
Cache-Control:
- no-store, no-cache, must-revalidate
Connection:
- Keep-Alive
Content-Length:
- '251'
Content-Type:
- application/hal+json
Date:
- Tue, 10 Mar 2026 20:25:18 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
- timeout=4, max=500
Pragma:
- no-cache
Server:
- Apache
Set-Cookie: NO-COOKIE-FOR-YOU
Vary:
- X-Forwarded-For
X-Content-Type-Options:
- nosniff
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- 1;mode=block
- 1;mode=block
status:
code: 200
message: OK
version: 1
15 changes: 7 additions & 8 deletions cassettes/test_enable_mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 17 Nov 2025 22:02:32 GMT
- Mon, 26 Jan 2026 17:49:59 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down Expand Up @@ -70,20 +70,19 @@ interactions:
uri: https://cleaned.example.edu/api/endpoint/mac-address/123123123123
response:
body:
string: '{"id":4524,"mac_address":"123123123123","status":"Disabled","randomized_mac":true,"attributes":{"Disabled
By":"TESTING","Disabled Reason":"Still testing..."},"added_at":"Nov 15, 2023
14:52:34 CST","updated_at":"Nov 17, 2025 16:02:30 CST","_links":{"self":{"href":"https:\/\/cleaned.example.edu\/api\/endpoint\/4524"}}}'
string: '{"id":4524,"mac_address":"123123123123","status":"Known","randomized_mac":true,"attributes":{},"added_at":"Nov
15, 2023 14:52:34 CST","updated_at":"Jan 26, 2026 11:49:20 CST","_links":{"self":{"href":"https:\/\/notauri.edu\/api\/endpoint\/4524"}}}'
headers:
Cache-Control:
- no-store, no-cache, must-revalidate
Connection:
- Keep-Alive
Content-Length:
- '330'
- '267'
Content-Type:
- application/hal+json
Date:
- Mon, 17 Nov 2025 22:02:32 GMT
- Mon, 26 Jan 2026 17:50:00 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down Expand Up @@ -128,7 +127,7 @@ interactions:
response:
body:
string: '{"id":4524,"mac_address":"123123123123","status":"Known","randomized_mac":true,"attributes":{},"added_at":"Nov
15, 2023 14:52:34 CST","updated_at":"Nov 17, 2025 16:02:33 CST","_links":{"self":{"href":"https:\/\/cleaned.example.edu\/api\/endpoint\/4524"}}}'
15, 2023 14:52:34 CST","updated_at":"Jan 26, 2026 11:50:00 CST","_links":{"self":{"href":"https:\/\/notauri.edu\/api\/endpoint\/4524"}}}'
headers:
Cache-Control:
- no-store, no-cache, must-revalidate
Expand All @@ -139,7 +138,7 @@ interactions:
Content-Type:
- application/hal+json
Date:
- Mon, 17 Nov 2025 22:02:33 GMT
- Mon, 26 Jan 2026 17:50:00 GMT
Expires:
- Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:
Expand Down
Loading
Loading