Exemple #1
0
import api_lib
from helpers import validate_api_base_url, validate_buckets

MAJOR = 0
MINOR = 4
BUGFIX = 0
INFO = ""

VERSION = "{}.{}.{}".format(MAJOR, MINOR, BUGFIX)
if INFO:
    VERSION += "-" + INFO

debug_env = os.getenv("DEBUG", "false")
DEBUG = True if debug_env.lower() == "true" else False

API_BASE_URL = validate_api_base_url(os.environ["API_BASE_URL"])
# SSH into server and run: `$ bbb-conf --secret` to get secret
API_SECRET = os.environ["API_SECRET"]

API_CLIENT = api_lib.Client(API_BASE_URL, API_SECRET)

ROOM_PARTICIPANTS_CUSTOM_BUCKETS = validate_buckets(
    os.getenv("ROOM_PARTICIPANTS_CUSTOM_BUCKETS", default=""))
ROOM_LISTENERS_CUSTOM_BUCKETS = validate_buckets(
    os.getenv("ROOM_LISTENERS_CUSTOM_BUCKETS", default=""))
ROOM_VOICE_PARTICIPANTS_CUSTOM_BUCKETS = validate_buckets(
    os.getenv("ROOM_VOICE_PARTICIPANTS_CUSTOM_BUCKETS", default=""))
ROOM_VIDEO_PARTICIPANTS_CUSTOM_BUCKETS = validate_buckets(
    os.getenv("ROOM_VIDEO_PARTICIPANTS_CUSTOM_BUCKETS", default=""))

PORT = int(os.getenv("PORT", 9688))
Exemple #2
0
VERSION = "{}.{}.{}".format(MAJOR, MINOR, BUGFIX)
if INFO:
    VERSION += "-" + INFO

debug_env = os.getenv("DEBUG", "false")
DEBUG = True if debug_env.lower() == "true" else False

tls_verify_temp = os.getenv("TLS_VERIFY", "true")

TLS_VERIFY = str_to_bool_or_none(tls_verify_temp)
if TLS_VERIFY is None:
    # If we failed to determine a boolean value it means it (should) be a string representing the CA_BUNDLE path
    TLS_VERIFY = tls_verify_temp

API_BASE_URL = validate_api_base_url('https://BBB_URL/bigbluebutton/api/')
# SSH into server and run: `$ bbb-conf --secret` to get secret
API_SECRET = 'BBB_SECRET'

API_CLIENT = api_lib.Client(API_BASE_URL, API_SECRET, TLS_VERIFY)

ROOM_PARTICIPANTS_CUSTOM_BUCKETS = validate_buckets(
    os.getenv("ROOM_PARTICIPANTS_CUSTOM_BUCKETS", default=""))
ROOM_LISTENERS_CUSTOM_BUCKETS = validate_buckets(
    os.getenv("ROOM_LISTENERS_CUSTOM_BUCKETS", default=""))
ROOM_VOICE_PARTICIPANTS_CUSTOM_BUCKETS = validate_buckets(
    os.getenv("ROOM_VOICE_PARTICIPANTS_CUSTOM_BUCKETS", default=""))
ROOM_VIDEO_PARTICIPANTS_CUSTOM_BUCKETS = validate_buckets(
    os.getenv("ROOM_VIDEO_PARTICIPANTS_CUSTOM_BUCKETS", default=""))

PORT = int(os.getenv("PORT", 9688))