Class: Fog::Proxmox::Identity::Role

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/proxmox/identity/models/role.rb

Overview

class Role model authentication

Instance Method Summary collapse

Instance Method Details

#destroyObject



34
35
36
37
38
# File 'lib/fog/proxmox/identity/models/role.rb', line 34

def destroy
  requires :roleid
  service.delete_role(roleid)
  true
end

#save(options = {}) ⇒ Object



29
30
31
32
# File 'lib/fog/proxmox/identity/models/role.rb', line 29

def save(options = {})
  service.create_role(attributes.merge(options))
  reload
end

#updateObject



40
41
42
43
44
# File 'lib/fog/proxmox/identity/models/role.rb', line 40

def update
  requires :roleid
  service.update_role(roleid, attributes.reject { |attribute| %i[roleid special].include? attribute })
  reload
end