Class: Crowbar::Client::Request::HostIP::Deallocate

Inherits:
Base
  • Object
show all
Defined in:
lib/crowbar/client/request/host_ip/deallocate.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs, #request

Instance Method Summary collapse

Methods inherited from Base

#headers, #initialize, #params, #process

Constructor Details

This class inherits a constructor from Crowbar::Client::Request::Base

Instance Method Details

#contentObject



24
25
26
27
28
29
# File 'lib/crowbar/client/request/host_ip/deallocate.rb', line 24

def content
  super.easy_merge!(
    name: attrs.node,
    network: attrs.network
  )
end

#methodObject



31
32
33
# File 'lib/crowbar/client/request/host_ip/deallocate.rb', line 31

def method
  :post
end

#urlObject



35
36
37
38
39
40
41
42
43
# File 'lib/crowbar/client/request/host_ip/deallocate.rb', line 35

def url
  [
    "crowbar",
    "network",
    "1.0",
    "deallocate_ip",
    attrs.prop
  ].join("/")
end