class Fog::Compute::Ovirt::Interfaces

Attributes

vm[RW]

Public Instance Methods

all(_filters = {}) click to toggle source

rubocop:disable Metrics/AbcSize

# File lib/fog/ovirt/models/compute/interfaces.rb, line 13
def all(_filters = {})
  requires :vm
  if vm.is_a? Fog::Compute::Ovirt::Server
    load service.list_vm_interfaces(vm.id)
  elsif vm.is_a? Fog::Compute::Ovirt::Template
    load service.list_template_interfaces(vm.id)
  else
    raise ::Fog::Ovirt::Errors::OvirtError, "interfaces should have vm or template"
  end
end
get(id) click to toggle source

rubocop:enable Metrics/AbcSize

# File lib/fog/ovirt/models/compute/interfaces.rb, line 25
def get(id)
  new service.get_interface(id)
end