Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed JSON.DUMPs for the scripter #101

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion odins_spear/scripts/aa_cc_hg_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ def main(api, service_provider_id: str, group_id: str):
del aa_cc_hg["typeTag"]
return_data["huntGroups"].append(aa_cc_hg)

return json.dumps(return_data)
return (return_data)


6 changes: 3 additions & 3 deletions odins_spear/scripts/bulk_password_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def main(api, service_provider_id: str, group_id: str, users: list, password_typ

print("Setting new SIP passwords complete.")
formatted_user_and_new_passwords = [{"userId": user[0], "newPassword": user[1]} for user in users_and_new_passwords]
return json.dumps(formatted_user_and_new_passwords)
return (formatted_user_and_new_passwords)

# intigration password
elif password_type.lower() == "web":
Expand All @@ -32,7 +32,7 @@ def main(api, service_provider_id: str, group_id: str, users: list, password_typ

print("Setting new SIP passwords complete.")
formatted_user_and_new_passwords = [{"userId": user[0], "newPassword": user[1]} for user in users_and_new_passwords]
return json.dumps(formatted_user_and_new_passwords)
return (formatted_user_and_new_passwords)

# voicemail/ oortal
elif password_type.lower() == "vm": # voicemail
Expand All @@ -47,7 +47,7 @@ def main(api, service_provider_id: str, group_id: str, users: list, password_typ

print("Setting new voicemail passcodes complete.")
formatted_user_and_new_passcodes = [{"userId": user[0], "newPasscode": user[1]} for user in users_and_new_passcodes]
return json.dumps(formatted_user_and_new_passcodes)
return (formatted_user_and_new_passcodes)

# raise error if user attempts to change another type of password.
else:
Expand Down
3 changes: 2 additions & 1 deletion odins_spear/scripts/service_pack_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def main(api, service_provider_id, group_id):

assigned_service_pack_services.append(sps)

return json.dumps({
Service_Pack_Audit = ({
"servicePackServices": assigned_service_pack_services
})
return Service_Pack_Audit
2 changes: 1 addition & 1 deletion odins_spear/scripts/service_provider_trunking_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ def main(api: object, service_provider_id: str):
return_data["callCapacityDifference"] = return_data["maxActiveCalls"] - return_data["groupsCallCapacityTotal"]
return_data["burstingCallCapacityDifference"] = return_data["burstingMaxActiveCalls"] - return_data["groupsBurstingCallCapacityTotal"]

return json.dumps(return_data)
return (return_data)
2 changes: 1 addition & 1 deletion odins_spear/scripts/user_association.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ def main(api, service_provider_id: str, group_id: str, user_id: str):
except Exception:
USER_DATA["callCenters"] = None

return json.dumps(USER_DATA)
return (USER_DATA)