Sha256: 72f7ebbceda15c5d460a8e7c7cd0d2ad30b9bb75328206c93a3df9f6383058cb
Contents?: true
Size: 740 Bytes
Versions: 17
Compression:
Stored size: 740 Bytes
Contents
require 'fog/openstack/models/collection' require 'fog/openstack/models/network/subnet' module Fog module Network class OpenStack class Subnets < Fog::OpenStack::Collection attribute :filters model Fog::Network::OpenStack::Subnet def initialize(attributes) self.filters ||= {} super end def all(filters_arg = filters) filters = filters_arg load_response(service.list_subnets(filters), 'subnets') end def get(subnet_id) if subnet = service.get_subnet(subnet_id).body['subnet'] new(subnet) end rescue Fog::Network::OpenStack::NotFound nil end end end end end
Version data entries
17 entries across 17 versions & 2 rubygems