Openstex v0.4.0 Openstex.Keystone.V2.Helpers View Source

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.

Link to this section 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

Link to this section Functions

Link to this function authenticate(endpoint, token) View Source

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

Link to this function authenticate(endpoint, token, tenant) View Source
authenticate(String.t(), String.t(), Keyword.t()) ::
  {:ok, Openstex.Keystone.V2.Helpers.Identity.t()} |
  {:error, Openstex.Response.t()} |
  {:error, any()}
authenticate(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.
  • token: the x-auth token
  • tenant: A Keyword list as follows: [tenant_id: tenant_id, tenant_name: tenant_name]. One or the other should be present or {:error, message} is returned.
Link to this function authenticate(endpoint, username, password, tenant) View Source
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: [tenant_id: tenant_id, tenant_name: tenant_name]. One or the other should be present or {:error, message} is returned.
Link to this function authenticate!(endpoint, token) View Source
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.

Link to this function authenticate!(endpoint, username, password, tenant) View Source
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.