Class: Fog::Identity::Proxmox::Group

Inherits:
Proxmox::Model show all
Defined in:
lib/fog/identity/proxmox/models/group.rb

Overview

class Group model authentication

Instance Method Summary collapse

Methods inherited from Proxmox::Model

#initialize, #inspect

Constructor Details

This class inherits a constructor from Fog::Proxmox::Model

Instance Method Details

#create(new_attributes = {}) ⇒ Object


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

def create(new_attributes = {})
  service.create_group(attributes.merge(new_attributes))
end

#destroyObject


46
47
48
49
50
# File 'lib/fog/identity/proxmox/models/group.rb', line 46

def destroy
  requires :groupid
  service.delete_group(groupid)
  true
end

#to_sObject


38
39
40
# File 'lib/fog/identity/proxmox/models/group.rb', line 38

def to_s
  groupid
end

#updateObject


52
53
54
55
56
# File 'lib/fog/identity/proxmox/models/group.rb', line 52

def update
  requires :groupid
  attr = attributes.reject { |key, _value| key == :groupid }
  service.update_group(groupid, attr)
end