def getOsCredentialsFromEnvironment():
	credentials = {}
	try:
		credentials['VERSION'] = os.environ['OS_COMPUTE_API_VERSION']
		credentials['USERNAME'] = os.environ['OS_USERNAME']
		credentials['PASSWORD'] = os.environ['OS_PASSWORD']
		credentials['TENANT_NAME'] = os.environ['OS_TENANT_NAME']
		credentials['AUTH_URL'] = os.environ['OS_AUTH_URL']
	except __HOLE__ as e:
		print("ERROR: environment variable %s is not defined" % e, file=sys.stderr)
		sys.exit(-1)

	return credentials
dataset/ETHPy150Open lukaspustina/dynamic-inventory-for-ansible-with-openstack/openstack_inventory.py/getOsCredentialsFromEnvironment