'Create a secret/access pair for use with ec2 style auth.
Generates a new set of credentials that map the user/tenant
pair.
:param request: current request
:param user_id: id of user
:param tenant_id: id of tenant
:returns: credential: dict of ec2 credential'

def create_credential(self, request, user_id, tenant_id):

    self.identity_api.get_user(user_id)
    self.resource_api.get_project(tenant_id)
    blob = {'access': uuid.uuid4().hex, 'secret': uuid.uuid4().hex, 'trust_id': request.context.trust_id}
    credential_id = utils.hash_access_key(blob['access'])
    cred_ref = {'user_id': user_id, 'project_id': tenant_id, 'blob': jsonutils.dumps(blob), 'id': credential_id, 'type': CRED_TYPE_EC2}
    self.credential_api.create_credential(credential_id, cred_ref)
    return {'credential': self._convert_v3_to_ec2_credential(cred_ref)}
