Files
notifications-admin/app/cloudfoundry_config.py
Alexey Bezhan 8346e1b8be Remove VCAP_SERVICES parsing code
We're no longer using user-provided services for application secrets
so we can remove the cloudfoundry_config code responsible for parsing
VCAP_SERVICES.
2018-01-09 14:18:32 +00:00

14 lines
409 B
Python

"""
Extracts cloudfoundry config from its json and populates the environment variables that we would expect to be populated
on local/aws boxes
"""
import os
import json
def extract_cloudfoundry_config():
vcap_application = json.loads(os.environ.get('VCAP_APPLICATION'))
os.environ['NOTIFY_ENVIRONMENT'] = vcap_application['space_name']
os.environ['NOTIFY_LOG_PATH'] = '/home/vcap/logs/app.log'