class Fog::Parsers::Compute::ProfitBricks::GetNic

Public Instance Methods

end_element(name) click to toggle source
# File lib/fog/profitbricks/parsers/compute/get_nic.rb, line 11
def end_element(name)
  case name
  when 'dataCenterId', 'nicId', 'nicName', 'serverId',
     'internetAccess', 'serverId', 'ips', 'macAddress',
     'dhcpActive', 'gatewayIp', 'provisioningState'
    @response['getNicResponse'][name] = value
  when 'dataCenterVersion', 'lanId'
    @response['getNicResponse'][name] = value.to_i
  when 'active', 'firewallId', 'firewallRules'
    @response['getNicResponse']['firewall'][name] = value
  end
end
reset() click to toggle source
# File lib/fog/profitbricks/parsers/compute/get_nic.rb, line 6
def reset
  @response = { 'getNicResponse' => {} }
  @response['getNicResponse']['firewall'] = {}
end