Class: ForemanDiscovery::ProxyOperations

Inherits:
ProxyAPI::Resource
  • Object
show all
Defined in:
lib/foreman_discovery/proxy_operations.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ ProxyOperations

Returns a new instance of ProxyOperations.



3
4
5
6
7
# File 'lib/foreman_discovery/proxy_operations.rb', line 3

def initialize args
  @url  = args[:url]
  @operation = args[:operation]
  super args
end

Instance Method Details

#parse_get_operationObject



13
14
15
16
# File 'lib/foreman_discovery/proxy_operations.rb', line 13

def parse_get_operation
  @url  += "/#{@operation}"
  parse get
end

#parse_put_operationObject



9
10
11
# File 'lib/foreman_discovery/proxy_operations.rb', line 9

def parse_put_operation
  parse put({}, "/#{@operation}")
end