def get_credentials():
	try:
		with open('metadata') as cred_file:
			creds = yaml.safe_load(cred_file)
			creds['opsmgr']
			creds['opsmgr']['url']
			creds['opsmgr']['username']
			creds['opsmgr']['password']
	except __HOLE__ as e:
		print >> sys.stderr, 'metadata file is missing a value:', e.message
		sys.exit(1)
	except IOError as e:
		print >> sys.stderr, 'Not a Concourse PCF pool resource.'
		print >> sys.stderr, 'Execute this from within the pool repository root, after a successful claim/acquire.'
		sys.exit(1)
	return creds
dataset/ETHPy150Open cf-platform-eng/tile-generator/lib/opsmgr.py/get_credentials