Class: Crowbar::Client::Request::Node::Rename

Inherits:
Base
  • Object
show all
Defined in:
lib/crowbar/client/request/node/rename.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
# File 'lib/crowbar/client/request/node/rename.rb', line 24

def content
  super.easy_merge!(
    alias: attrs.value
  )
end

#methodObject



30
31
32
# File 'lib/crowbar/client/request/node/rename.rb', line 30

def method
  :post
end

#urlObject



34
35
36
37
38
39
40
41
42
# File 'lib/crowbar/client/request/node/rename.rb', line 34

def url
  [
    "crowbar",
    "machines",
    "1.0",
    "rename",
    attrs.name
  ].join("/")
end