| Class | OpenStack::Connection |
| In: |
lib/openstack/connection.rb
|
| Parent: | Object |
| auth_host | [R] | |
| auth_method | [R] | |
| auth_path | [R] | |
| auth_port | [R] | |
| auth_scheme | [R] | |
| authkey | [R] | |
| authok | [RW] | |
| authtenant | [R] | |
| authtoken | [RW] | |
| authuser | [R] | |
| ca_cert | [R] | |
| domain_id | [R] | |
| domain_name | [R] | |
| endpoint_type | [R] | |
| http | [R] | |
| is_debug | [R] | |
| project_domain_id | [R] | |
| project_domain_name | [R] | |
| project_id | [R] | |
| project_name | [R] | |
| proxy_host | [R] | |
| proxy_port | [R] | |
| quantum_version | [RW] | |
| region | [R] | |
| regions_list | [R] | |
| retries | [R] | |
| service_host | [RW] | |
| service_name | [R] | |
| service_path | [RW] | |
| service_port | [RW] | |
| service_scheme | [RW] | |
| service_type | [R] | |
| ssl_version | [R] | |
| user_domain | [R] | |
| user_domain_id | [R] |
Creates and returns a new Connection object, depending on the service_type passed in the options:
e.g: os = OpenStack::Connection.create({:username => "herp@derp.com", :api_key=>"password",
:auth_url => "https://region-a.geo-1.identity.cloudsvc.com:35357/v2.0/",
:authtenant=>"herp@derp.com-default-tenant", :service_type=>"object-store")
Will return an OpenStack::Swift::Connection object.
options hash:
:username - Your OpenStack username or public key, depending on auth_method. *required*
:auth_method - Type of authentication - 'password', 'key', 'rax-kskey', 'token' - defaults to 'password'.
For auth v3.0 valid options are 'password', 'token', 'password_user_id'
:authtenant_name OR :authtenant_id - Your OpenStack tenant name or id *required*. Defaults to username.
passing :authtenant will default to using that parameter as tenant name.
:api_key - Your OpenStack API key *required* (either private key or password, depending on auth_method)
:auth_url - Configurable auth_url endpoint.
:service_name - (Optional for v2.0 auth only). The optional name of the compute service to use.
:service_type - (Optional for v2.0 auth only). Defaults to "compute"
:user_domain - (Optional for v3.0 auth only). The optional name of the user domain.
:user_domain_id - (Optional for v3.0 auth only). Defaults to "default"
:project_id - (Optional for v3.0 auth only). For authorization scoping
:project_name - (Optional for v3.0 auth only). For authorization scoping
:project_domain_name - (Optional for v3.0 auth only). For authorization scoping
:project_domain_id - (Optional for v3.0 auth only). For authorization scoping
:domain_name - (Optional for v3.0 auth only). For authorization scoping
:domain_id - (Optional for v3.0 auth only). For authorization scoping
:region - (Optional for v2.0 auth only). The specific service region to use. Defaults to first returned region.
:retry_auth - Whether to retry if your auth token expires (defaults to true)
:proxy_host - If you need to connect through a proxy, supply the hostname here
:proxy_port - If you need to connect through a proxy, supply the port here
:ca_cert - path to a CA chain in PEM format
:ssl_version - explicitly set an version (:SSLv3 etc, see OpenSSL::SSL::SSLContext::METHODS)
:is_debug - Only for development purpose for debug output
:endpoint_type - Type of endpoint. Optional. 'publicURL', 'internalURL', 'adminURL'
The options hash is used to create a new OpenStack::Connection object (private constructor) and this is passed to the constructor of OpenStack::Compute::Connection or OpenStack::Swift::Connection (depending on :service_type) where authentication is done using OpenStack::Authentication.