Class: Fog::DNS::OpenStack::V2::ZoneTransferRequest

Inherits:
OpenStack::Model show all
Defined in:
lib/fog/dns/openstack/v2/models/zone_transfer_request.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::Model

#create, #initialize

Constructor Details

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

Instance Method Details

#destroy(options = {}) ⇒ Object



41
42
43
44
45
# File 'lib/fog/dns/openstack/v2/models/zone_transfer_request.rb', line 41

def destroy(options = {})
  requires :id
  service.delete_zone_transfer_request(id)
  true
end

#saveObject



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/fog/dns/openstack/v2/models/zone_transfer_request.rb', line 20

def save
  if persisted?
    update(description: description, target_project_id: target_project_id)
  else
    merge_attributes(ervice.create_zone_transfer_request(zone_id, {
      :target_project_id => target_project_id,
      :description => description,
      :project_id => project_id
    }))
  end
  true
end

#update(options = nil) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/fog/dns/openstack/v2/models/zone_transfer_request.rb', line 33

def update(options = nil)
  requires :id
  merge_attributes(ervice.update_zone_transfer_request(id,options[:description],{
    :target_project_id => options[:target_project_id]
  }))
  self
end