Skip to content

Commit

Permalink
added mpsk api fetches
Browse files Browse the repository at this point in the history
added the sipa endpoints for the pycroft fetch
#498
  • Loading branch information
agmes4 committed Jan 19, 2025
1 parent 00f57f8 commit c5865b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sipa/model/pycroft/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ def change_mac(self, user_id, password, interface_id, new_mac, host_name):
return self.post(f'user/{user_id}/change-mac/{interface_id}',
data={'password': password, 'mac': new_mac, 'host_name': host_name})

def add_mpsk(self, user_id, password, name, mac):
return self.post(f'user/{user_id}/add-mpsk', data={'password': password, 'name': name, 'mac': mac})

def change_mpsk(self, user_id, password, name, mac, mpsk_id):
return self.post(f'user/{user_id}/change-mpsk/{mpsk_id}', data={'password': password, 'name': name, 'mac': mac})

def delete_mpsk(self, user_id, password, mpsk_id):
return self.post(f'user/{user_id}/delete-mpsk/{mpsk_id}', data={'password': password})

def activate_network_access(self, user_id, password, mac, birthdate, host_name):
return self.post(f'user/{user_id}/activate-network-access',
data={'password': password, 'mac': mac,
Expand Down

0 comments on commit c5865b8

Please sign in to comment.