class Fog::HP::Network::Ports

Public Class Methods

new(attributes) click to toggle source
Calls superclass method
# File lib/fog/hp/models/network/ports.rb, line 12
def initialize(attributes)
  self.filters ||= {}
  super
end

Public Instance Methods

all(filters_arg = filters) click to toggle source
# File lib/fog/hp/models/network/ports.rb, line 17
def all(filters_arg = filters)
  filters = filters_arg
  non_aliased_filters = Fog::HP.convert_aliased_attributes_to_original(self.model, filters)
  load(service.list_ports(non_aliased_filters).body['ports'])
end
get(port_id) click to toggle source
# File lib/fog/hp/models/network/ports.rb, line 23
def get(port_id)
  if port = service.get_port(port_id).body['port']
    new(port)
  end
rescue Fog::HP::Network::NotFound
  nil
end