Sha256: 34adf78cdda2659c5851a8d12b4bd74a602e72846a65486fd7bb4c82cc281ea1
Contents?: true
Size: 695 Bytes
Versions: 7
Compression:
Stored size: 695 Bytes
Contents
require 'fog/core/collection' require 'fog/openstack/models/network/port' module Fog module Network class OpenStack class Ports < Fog::Collection attribute :filters model Fog::Network::OpenStack::Port def initialize(attributes) self.filters ||= {} super end def all(filters = filters) self.filters = filters load(connection.list_ports(filters).body['ports']) end def get(port_id) if port = connection.get_port(port_id).body['port'] new(port) end rescue Fog::Network::OpenStack::NotFound nil end end end end end
Version data entries
7 entries across 7 versions & 5 rubygems