Class: Fog::OpenStack::KeyManager::Real

Inherits:
Object
  • Object
show all
Includes:
Core
Defined in:
lib/fog/openstack/key_manager.rb,
lib/fog/openstack/key_manager/requests/get_secret.rb,
lib/fog/openstack/key_manager/requests/list_secrets.rb,
lib/fog/openstack/key_manager/requests/create_secret.rb,
lib/fog/openstack/key_manager/requests/delete_secret.rb,
lib/fog/openstack/key_manager/requests/get_container.rb,
lib/fog/openstack/key_manager/requests/get_secret_acl.rb,
lib/fog/openstack/key_manager/requests/list_containers.rb,
lib/fog/openstack/key_manager/requests/create_container.rb,
lib/fog/openstack/key_manager/requests/delete_container.rb,
lib/fog/openstack/key_manager/requests/delete_secret_acl.rb,
lib/fog/openstack/key_manager/requests/get_container_acl.rb,
lib/fog/openstack/key_manager/requests/update_secret_acl.rb,
lib/fog/openstack/key_manager/requests/get_secret_payload.rb,
lib/fog/openstack/key_manager/requests/replace_secret_acl.rb,
lib/fog/openstack/key_manager/requests/get_secret_metadata.rb,
lib/fog/openstack/key_manager/requests/delete_container_acl.rb,
lib/fog/openstack/key_manager/requests/update_container_acl.rb,
lib/fog/openstack/key_manager/requests/replace_container_acl.rb

Instance Attribute Summary

Attributes included from Core

#auth_token, #auth_token_expiration, #current_tenant, #current_user, #current_user_id, #openstack_application_credential_id, #openstack_application_credential_secret, #openstack_cache_ttl, #openstack_domain_id, #openstack_domain_name, #openstack_identity_api_version, #openstack_project_domain, #openstack_project_domain_id, #openstack_project_id, #openstack_user_domain, #openstack_user_domain_id, #unscoped_token

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Core

#credentials, #initialize, #reload

Class Method Details

.not_found_classObject



95
96
97
# File 'lib/fog/openstack/key_manager.rb', line 95

def self.not_found_class
  Fog::OpenStack::KeyManager::NotFound
end

Instance Method Details

#create_container(options) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fog/openstack/key_manager/requests/create_container.rb', line 5

def create_container(options)
  request(
    :body    => Fog::JSON.encode(options),
    :expects => [201],
    :method  => 'POST',
    :path    => 'containers'
  )
end

#create_secret(options) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fog/openstack/key_manager/requests/create_secret.rb', line 5

def create_secret(options)
  request(
    :body    => Fog::JSON.encode(options),
    :expects => [201],
    :method  => 'POST',
    :path    => 'secrets'
  )
end

#default_path_prefixObject



99
100
101
# File 'lib/fog/openstack/key_manager.rb', line 99

def default_path_prefix
  'v1'
end

#default_service_typeObject



103
104
105
# File 'lib/fog/openstack/key_manager.rb', line 103

def default_service_type
  %w[key-manager]
end

#delete_container(id) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/delete_container.rb', line 5

def delete_container(id)
  request(
    :expects => [204],
    :method  => 'DELETE',
    :path    => "containers/#{id}"
  )
end

#delete_container_acl(uuid) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/delete_container_acl.rb', line 5

def delete_container_acl(uuid)
  request(
    :expects => [200],
    :method  => 'DELETE',
    :path    => "containers/#{uuid}/acl"
  )
end

#delete_secret(id) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/delete_secret.rb', line 5

def delete_secret(id)
  request(
    :expects => [204],
    :method  => 'DELETE',
    :path    => "secrets/#{id}"
  )
end

#delete_secret_acl(uuid) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/delete_secret_acl.rb', line 5

def delete_secret_acl(uuid)
  request(
    :expects => [200],
    :method  => 'DELETE',
    :path    => "secrets/#{uuid}/acl"
  )
end

#get_container(uuid) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/get_container.rb', line 5

def get_container(uuid)
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "containers/#{uuid}",
  )
end

#get_container_acl(uuid) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/get_container_acl.rb', line 5

def get_container_acl(uuid)
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "containers/#{uuid}/acl"
  )
end

#get_secret(uuid) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/get_secret.rb', line 5

def get_secret(uuid)
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "secrets/#{uuid}",
  )
end

#get_secret_acl(uuid) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/get_secret_acl.rb', line 5

def get_secret_acl(uuid)
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "secrets/#{uuid}/acl"
  )
end

#get_secret_metadata(uuid) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fog/openstack/key_manager/requests/get_secret_metadata.rb', line 5

def (uuid)
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "secrets/#{uuid}/metadata",
  )
end

#get_secret_payload(uuid) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/fog/openstack/key_manager/requests/get_secret_payload.rb', line 5

def get_secret_payload(uuid)
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "secrets/#{uuid}/payload",
    :headers => {
      'Accept' => '*/*'
    }
  )
end

#list_containers(options = {}) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fog/openstack/key_manager/requests/list_containers.rb', line 5

def list_containers(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => 'containers',
    :query   => options
  )
end

#list_secrets(options = {}) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fog/openstack/key_manager/requests/list_secrets.rb', line 5

def list_secrets(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => 'secrets',
    :query   => options
  )
end

#replace_container_acl(uuid, options) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fog/openstack/key_manager/requests/replace_container_acl.rb', line 5

def replace_container_acl(uuid, options)
  request(
    :body    => Fog::JSON.encode(options),
    :expects => [200],
    :method  => 'PUT',
    :path    => "containers/#{uuid}/acl"
  )
end

#replace_secret_acl(uuid, options) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fog/openstack/key_manager/requests/replace_secret_acl.rb', line 5

def replace_secret_acl(uuid, options)
  request(
    :body    => Fog::JSON.encode(options),
    :expects => [200],
    :method  => 'PUT',
    :path    => "secrets/#{uuid}/acl"
  )
end

#update_container_acl(uuid, options) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fog/openstack/key_manager/requests/update_container_acl.rb', line 5

def update_container_acl(uuid, options)
  request(
    :body    => Fog::JSON.encode(options),
    :expects => [200],
    :method  => 'PATCH',
    :path    => "containers/#{uuid}/acl"
  )
end

#update_secret_acl(uuid, options) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fog/openstack/key_manager/requests/update_secret_acl.rb', line 5

def update_secret_acl(uuid, options)
  request(
    :body    => Fog::JSON.encode(options),
    :expects => [200],
    :method  => 'PATCH',
    :path    => "secrets/#{uuid}/acl"
  )
end