Class: Fog::Compute::Cloudstack::PublicIpAddress

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/cloudstack/models/compute/public_ip_address.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



41
42
43
44
45
46
47
48
# File 'lib/fog/cloudstack/models/compute/public_ip_address.rb', line 41

def destroy
  requires :id

  response = service.disassociate_ip_address('id' => id )
  success_status = response['disassociateipaddressresponse']['success']

  success_status == 'true'
end

#saveObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/fog/cloudstack/models/compute/public_ip_address.rb', line 24

def save
  requires :display_text, :name

  options = {
    'displaytext' => display_text,
    'name'        => name,
    'customized'  => is_customized,
    'disksize'    => disk_size,
    'domain_id'   => domain_id,
    'storagetype' => storage_type,
    'tags'        => tags
  }

  response = service.associate_ip_address(options)
  merge_attributes(response['associateipaddressresponse'])
end