solar/resources/keystone_user/test.py
2015-08-04 09:32:57 +02:00

19 lines
483 B
Python

import requests
from solar.core.log import log
from solar.core import validation
def test(resource):
log.debug('Testing keystone_user %s', resource.args['user_name'].value)
args = resource.args
token, _ = validation.validate_token(
keystone_host=args['keystone_host'].value,
keystone_port=args['keystone_port'].value,
user=args['user_name'].value,
tenant=args['tenant_name'].value,
password=args['user_password'].value,
)