Sha256: fdeaf7907fec22f1bc253a0c1b66a6aa10c197c8a5a18c21096068da577b3865
Contents?: true
Size: 953 Bytes
Versions: 7
Compression:
Stored size: 953 Bytes
Contents
module Fog module Compute class Vsphere class Interfacetypes < Fog::Collection autoload :Interfacetype, File.expand_path('../interfacetype', __FILE__) model Fog::Compute::Vsphere::Interfacetype attr_accessor :datacenter attr_accessor :servertype def all(filters = {}) requires :servertype case servertype when Fog::Compute::Vsphere::Servertype load service.list_interface_types(filters.merge(datacenter: datacenter, servertype: servertype.id)) else raise 'interfacetypes should have a servertype' end end def get(id) requires :servertype requires :datacenter new service.get_interface_type id, servertype, datacenter rescue Fog::Compute::Vsphere::NotFound nil end end end end end
Version data entries
7 entries across 5 versions & 2 rubygems