Updated Colors
This commit is contained in:
@@ -82,7 +82,7 @@ def show_disclaimer():
|
||||
print(
|
||||
f"""
|
||||
{Colors.BOLD}
|
||||
{Colors.RED}{Colors.BLINK}WARNING {Colors.END}{Colors.LIGHT_WHITE}- This script is provided as a {Colors.ITALIC}DEMO ONLY.{Colors.END}{Colors.LIGHT_WHITE} It is intended to illistrate how to use the Voice1 APIs. By using this script, you agree to the terms of use and acknowledge that you are responsible for any actions taken.
|
||||
{Colors.RED}{Colors.BLINK}WARNING {Colors.END}{Colors.LIGHT_WHITE}- This script is provided "AS-IS" for use as a {Colors.ITALIC}DEMO ONLY.{Colors.END}{Colors.LIGHT_WHITE} It is intended to illistrate how to use the Voice1 APIs. By using this script, you agree to the terms of use and acknowledge that you are responsible for any actions taken.
|
||||
|
||||
Neither VOICE1 nor VOICE1’s resellers, contractors, or associates shall be responsible for providing Services to the extent that the issue is caused by (a) Customer’s misuse, improper use, mis-configuration, alteration, or damage to the Software; (b) Customer’s use of the Software with any hardware or software not supplied or supported by VOICE1; (c) Customer’s failure to install an update to the Software if such update would have resolved the issue; or (d) uses in a manner not in accordance with the Agreement. VOICE1 shall have no responsibility for loss of or damage to Customer’s data or loss of business, regardless of the cause of any such loss or damage.
|
||||
|
||||
@@ -1215,29 +1215,29 @@ def menu():
|
||||
def prompt_credentials(config):
|
||||
"""Prompt for credentials"""
|
||||
|
||||
print(f"{bcolors.HEADER}DO NOT SHARE YOUR CREDENTIALS WITH ANYONE.{bcolors.ENDC}")
|
||||
print(f"{Colors.LIGHT_GREEN}DO NOT SHARE YOUR CREDENTIALS WITH ANYONE.{Colors.END}")
|
||||
|
||||
config["username"] = input("Enter your api.switchvoxuc.com username: ")
|
||||
config["password"] = input("Enter your api.switchvoxuc.com password: ")
|
||||
config["provider_username"] = input("Enter your api.nwsip.com username: ")
|
||||
config["provider_password"] = input("Enter your api.nwsip.com password: ")
|
||||
|
||||
print(f"{bcolors.HEADER}Configure additoinal tenant credentials.{bcolors.ENDC}")
|
||||
print(f"{Colors.LIGHT_GREEN}Configure additoinal tenant credentials.{Colors.END}")
|
||||
tenant = input("Enter your tenant name or enter for None: ") or None
|
||||
if tenant is not None:
|
||||
tenant = tenant.upper()
|
||||
config["tenant"] = {tenant: {}}
|
||||
config["tenant"][tenant]["username"] = input(
|
||||
f"Enter your {bcolors.OKBLUE}{tenant}{bcolors.ENDC} api.switchvoxuc.com username: "
|
||||
f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.switchvoxuc.com username: "
|
||||
)
|
||||
config["tenant"][tenant]["password"] = input(
|
||||
f"Enter your {bcolors.OKBLUE}{tenant}{bcolors.ENDC} api.switchvoxuc.com password: "
|
||||
f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.switchvoxuc.com password: "
|
||||
)
|
||||
config["tenant"][tenant]["provider_username"] = input(
|
||||
f"Enter your {bcolors.OKBLUE}{tenant}{bcolors.ENDC} api.nwsip.com username: "
|
||||
f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.nwsip.com username: "
|
||||
)
|
||||
config["tenant"][tenant]["provider_password"] = input(
|
||||
f"Enter your {bcolors.OKBLUE}{tenant}{bcolors.ENDC} api.nwsip.com password: "
|
||||
f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.nwsip.com password: "
|
||||
)
|
||||
|
||||
return config
|
||||
@@ -1250,7 +1250,7 @@ if __name__ == "__main__":
|
||||
show_disclaimer()
|
||||
disclaimer_accepted = (
|
||||
input(
|
||||
"Do you accept the disclaimer? You must enter 'ACCEPT' in all capitals: "
|
||||
"Do you accept the disclaimer? You must enter {Colors.BOLD}'ACCEPT'{Colors.END} in all capitals: "
|
||||
)
|
||||
or disclaimer_accepted
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user