Skip to content

Commit

Permalink
documentation and correction of method in password feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Prescott committed Mar 6, 2024
1 parent db6e14a commit f5e1b92
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions odins_spear/methods/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, requester):
#DN

def group_dns(self, service_provider_id: str, group_id: str,
start_of_range_number: int, end_of_range_number: int):
start_of_range_number: str, end_of_range_number: str):
"""Removes range of numbers from a Group.
Args:
Expand Down Expand Up @@ -101,7 +101,7 @@ def group_dns(self, service_provider_id: str, group_id: str,
return self.requester.delete(endpoint, data=data)


def service_provider_dns(self, service_provider_id: str, start_of_range_number: int, end_of_range_number: int):
def service_provider_dns(self, service_provider_id: str, start_of_range_number: str, end_of_range_number: str):
"""Removes range of numbers from a Service Proiver or Enterprise.
Args:
Expand Down
6 changes: 3 additions & 3 deletions odins_spear/methods/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ def group_dns_unassign_bulk(self, service_provider_id: str, group_id: str,
Args:
service_provider_id (str): Service provider ID where the target group is located.
group_id (str): Group ID where numbers should be added to.
start_of_range_number (str): Starting number in range to add to group.
end_of_range_number (str): Ending number in range to add to group.
group_id (str): Group ID where numbers where numbers are located.
start_of_range_number (str): Starting number in range to unassign in group.
end_of_range_number (str): Ending number in range to unassign in group.
Returns:
None: This method does not return any specific value.
Expand Down
2 changes: 1 addition & 1 deletion odins_spear/methods/put.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ def group_dns_activate(self, service_provider_id: str, group_id: str, activated:
service_provider_id (str): Service provider ID where the group is located.
group_id (str): Group ID where numbers are hosted.
activated (bool): True to activate number and False to deactivate.
numbers (list): List of target numbers to update.
numbers (list): List of target numbers to update. These must be strings and follow correct format.
Returns:
JSON: All numbers assigned to group with activation state.
Expand Down
2 changes: 1 addition & 1 deletion odins_spear/scripts/bulk_password_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def main(api, service_provider_id: str, group_id: str, users: list, password_typ
if password_type.lower() == "sip":

logger.log_info("Generating new SIP passwords.")
new_passwords = api.get.passwords_generate(service_provider_id, group_id, len(users))['passwords']
new_passwords = api.get.sip_passwords_generate(service_provider_id, group_id, len(users))['passwords']
users_and_new_passwords = list(zip(users, new_passwords))

logger.log_info("Setting new SIP passwords.")
Expand Down
2 changes: 2 additions & 0 deletions odins_spear/scripts/move_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

def main(api, current_service_provider_id: str, current_group_id: str, target_service_provider_id: str,
target_group_id: str, start_of_range_number: str, end_of_range_number: str = None) -> bool:
""" Moves singular or a range of numbers from one group to another located on the same Broadwork instance.
"""

logger.log_info(f"Removing numbers from {current_group_id}.")
# delete number from group
Expand Down

0 comments on commit f5e1b92

Please sign in to comment.