Openstex v0.3.4 Openstex.Keystone.V2.Helpers

A module that provides helper functions for executing more complex multi-step queries for Keystone authentication.

See the ExOvh library for an example usage of the helpers module.

Summary

Functions

Defaults to authenticate(endpoint, token, []). See authenticate/3

Helper function to authenticate openstack using keystone (identity) api. Returns a Openstex.Helpers.V2.Keystone.Identity struct

Helper function to authenticate openstack using keystone (identity) api. Returns a Openstex.Helpers.V2.Keystone.Identity struct

Helper function to authenticate openstack using keystone (identity) api. Returns a Openstex.Helpers.V2.Keystone.Identity struct or raises and error. See authenticate/3

Helper function to authenticate openstack using keystone (identity) api. Returns a Openstex.Helpers.V2.Keystone.Identity struct or raises and error. See authenticate/4

Functions

authenticate(endpoint, token)

Defaults to authenticate(endpoint, token, []). See authenticate/3.

authenticate(endpoint, token, tenant)
authenticate(String.t, String.t, Keyword.t) ::
  {:ok, Openstex.Keystone.V2.Helpers.Identity.t} |
  {:error, HTTPipe.Conn.t} |
  {:error, any}
authenticate(String.t, String.t, Keyword.t) ::
  {:ok, Openstex.Keystone.V2.Helpers.Identity.t} |
  {:error, Openstex.Response.t} |
  {:error, any}

Helper function to authenticate openstack using keystone (identity) api. Returns a Openstex.Helpers.V2.Keystone.Identity struct.

Arguments

  • endpoint: the endpoint to which the http request should be sent for accessing keystone authentication.
  • token: the x-auth token
  • tenant: A Keyword list as follows: [tenantid: tenantid, tenantname: tenantname]. One or the other should be present or {:error, message} is returned.
authenticate(endpoint, username, password, tenant)
authenticate(String.t, String.t, String.t, Keyword.t) ::
  {:ok, Openstex.Keystone.V2.Helpers.Identity.t} |
  {:error, HTTPipe.Conn.t} |
  {:error, any}

Helper function to authenticate openstack using keystone (identity) api. Returns a Openstex.Helpers.V2.Keystone.Identity struct.

Arguments

  • endpoint: the endpoint to which the http request should be sent for accessing keystone authentication.
  • username: openstack username
  • password: openstack password
  • tenant: A Keyword list as follows: [tenantid: tenantid, tenantname: tenantname]. One or the other should be present or {:error, message} is returned.
authenticate!(endpoint, token)
authenticate!(String.t, String.t) ::
  Openstex.Keystone.V2.Helpers.Identity.t |
  no_return

Helper function to authenticate openstack using keystone (identity) api. Returns a Openstex.Helpers.V2.Keystone.Identity struct or raises and error. See authenticate/3.

authenticate!(endpoint, username, password, tenant)
authenticate!(String.t, String.t, String.t, Keyword.t) ::
  Openstex.Keystone.V2.Helpers.Identity.t |
  no_return

Helper function to authenticate openstack using keystone (identity) api. Returns a Openstex.Helpers.V2.Keystone.Identity struct or raises and error. See authenticate/4.