class Fog::Identity::Proxmox::Real
Real class
class Real #add_permission request
class Real #change_password request
class Real #check_permissions request
class Real #create_domain collection
class Real #create_group request
class Real #create_pool request
class Real #create_role request
class Real #create_user request
class Real #delete_domain collection
class Real #delete_group request
class Real #delete_pool request
class Real #delete_role collection
class Real #delete_user request
class Real #get_domain request
class Real #get_group collection
class Real #get_pool collection
class Real #list_domains request
class Real #list_groups request
class Real #list_permissions request
class Real #list_pools request
class Real #list_roles request
class Real #list_users request
class Real #read_version request
class Real #remove_permission request
class Real #update_domain request
class Real #update_group request
class Real #update_pool request
class Real #update_role request
class Real #update_user request
Public Class Methods
# File lib/fog/identity/proxmox.rb, line 109 def initialize(options = {}) initialize_identity(options) @connection_options = options[:connection_options] || {} @path_prefix = URI.parse(options[:pve_url]).path authenticate @persistent = options[:persistent] || false url = "#{@scheme}://#{@host}:#{@port}" @connection = Fog::Core::Connection.new(url, @persistent, @connection_options.merge(path_prefix: @path_prefix)) end
Public Instance Methods
# File lib/fog/identity/proxmox/requests/add_permission.rb, line 25 def add_permission(permission) request( expects: [200], method: 'PUT', path: 'access/acl', body: URI.encode_www_form(permission) ) end
# File lib/fog/identity/proxmox/requests/change_password.rb, line 25 def change_password(userid, password) request( expects: [200], method: 'PUT', path: 'access/password', body: "userid=#{userid}&password=#{password}" ) end
# File lib/fog/identity/proxmox/requests/check_permissions.rb, line 25 def check_permissions(principal) response = request( expects: [200], method: 'POST', path: 'access/ticket', body: URI.encode_www_form(principal) ) body = JSON.decode(response.body) data = body['data'] data end
# File lib/fog/identity/proxmox.rb, line 119 def config self end
# File lib/fog/identity/proxmox.rb, line 123 def configure(source) source.instance_variables.each do |v| instance_variable_set(v, source.instance_variable_get(v)) end end
# File lib/fog/identity/proxmox/requests/create_domain.rb, line 24 def create_domain(domain) request( expects: [200], method: 'POST', path: 'access/domains', body: URI.encode_www_form(domain) ) end
# File lib/fog/identity/proxmox/requests/create_group.rb, line 24 def create_group(group) request( expects: [200], method: 'POST', path: 'access/groups', body: URI.encode_www_form(group) ) end
# File lib/fog/identity/proxmox/requests/create_pool.rb, line 24 def create_pool(pool) request( expects: [200], method: 'POST', path: 'pools', body: URI.encode_www_form(pool) ) end
# File lib/fog/identity/proxmox/requests/create_role.rb, line 24 def create_role(role) request( expects: [200], method: 'POST', path: 'access/roles', body: URI.encode_www_form(role) ) end
# File lib/fog/identity/proxmox/requests/create_user.rb, line 24 def create_user(user) request( expects: [200], method: 'POST', path: 'access/users', body: URI.encode_www_form(user) ) end
# File lib/fog/identity/proxmox/requests/delete_domain.rb, line 25 def delete_domain(realm) request( expects: [200], method: 'DELETE', path: "access/domains/#{realm}" ) end
# File lib/fog/identity/proxmox/requests/delete_group.rb, line 25 def delete_group(groupid) request( expects: [200], method: 'DELETE', path: "access/groups/#{groupid}" ) end
# File lib/fog/identity/proxmox/requests/delete_pool.rb, line 24 def delete_pool(poolid) request( expects: [200], method: 'DELETE', path: "pools/#{poolid}" ) end
# File lib/fog/identity/proxmox/requests/delete_role.rb, line 25 def delete_role(roleid) request( expects: [200], method: 'DELETE', path: "access/roles/#{roleid}" ) end
# File lib/fog/identity/proxmox/requests/delete_user.rb, line 24 def delete_user(userid) request( expects: [200], method: 'DELETE', path: "access/users/#{userid}" ) end
# File lib/fog/identity/proxmox/requests/get_domain.rb, line 25 def get_domain(realm) request( expects: [200], method: 'GET', path: "access/domains/#{realm}" ) end
# File lib/fog/identity/proxmox/requests/get_group.rb, line 25 def get_group(groupid) request( expects: [200], method: 'GET', path: "access/groups/#{groupid}" ) end
# File lib/fog/identity/proxmox/requests/get_pool.rb, line 25 def get_pool(poolid) request( expects: [200], method: 'GET', path: "pools/#{poolid}" ) end
# File lib/fog/identity/proxmox/requests/get_role.rb, line 25 def get_role(roleid) request( expects: [200], method: 'GET', path: "access/roles/#{roleid}" ) end
# File lib/fog/identity/proxmox/requests/get_user.rb, line 25 def get_user(userid) request( expects: [200], method: 'GET', path: "access/users/#{userid}" ) end
# File lib/fog/identity/proxmox/requests/list_domains.rb, line 25 def list_domains request( expects: [200], method: 'GET', path: 'access/domains' ) end
# File lib/fog/identity/proxmox/requests/list_groups.rb, line 25 def list_groups request( expects: [200], method: 'GET', path: 'access/groups' ) end
# File lib/fog/identity/proxmox/requests/list_permissions.rb, line 25 def list_permissions request( expects: [200], method: 'GET', path: 'access/acl' ) end
# File lib/fog/identity/proxmox/requests/list_pools.rb, line 25 def list_pools request( expects: [200], method: 'GET', path: 'pools' ) end
# File lib/fog/identity/proxmox/requests/list_roles.rb, line 25 def list_roles request( expects: [200], method: 'GET', path: 'access/roles' ) end
# File lib/fog/identity/proxmox/requests/list_users.rb, line 25 def list_users(options = {}) request( expects: [200], method: 'GET', path: 'access/users', query: options ) end
# File lib/fog/identity/proxmox/requests/read_version.rb, line 25 def read_version response = request( expects: [200], method: 'GET', path: 'version' ) body = JSON.decode(response.body) data = body['data'] data end
# File lib/fog/identity/proxmox/requests/remove_permission.rb, line 25 def remove_permission(permission) permission.store('delete', 1) request( expects: [200], method: 'PUT', path: 'access/acl', body: URI.encode_www_form(permission) ) end
# File lib/fog/identity/proxmox/requests/update_domain.rb, line 25 def update_domain(realm, attributes) request( expects: [200], method: 'PUT', path: "access/domains/#{realm}", body: URI.encode_www_form(attributes) ) end
# File lib/fog/identity/proxmox/requests/update_group.rb, line 25 def update_group(groupid, attributes) request( expects: [200], method: 'PUT', path: "access/groups/#{groupid}", body: URI.encode_www_form(attributes) ) end
# File lib/fog/identity/proxmox/requests/update_pool.rb, line 25 def update_pool(poolid, attributes) request( expects: [200], method: 'PUT', path: "pools/#{poolid}", body: URI.encode_www_form(attributes) ) end
# File lib/fog/identity/proxmox/requests/update_role.rb, line 25 def update_role(roleid, attributes) request( expects: [200], method: 'PUT', path: "access/roles/#{roleid}", body: URI.encode_www_form(attributes) ) end
# File lib/fog/identity/proxmox/requests/update_user.rb, line 25 def update_user(userid, attributes) request( expects: [200], method: 'PUT', path: "access/users/#{userid}", body: URI.encode_www_form(attributes) ) end