Sha256: 5ba4be55fc2bf9ccc07dc1d18359b643f3cfcbe4eafacb2262328bc71c172875

Contents?: true

Size: 943 Bytes

Versions: 11

Compression:

Stored size: 943 Bytes

Contents

module Fog
  module Compute
    class Ovirt
      class V4
        module Shared
          def check_arguments(id, options)
            raise ArgumentError, "instance id is a required parameter" unless id
            raise ArgumentError, "interface id is a required parameter for update-interface" unless options.key? :id
          end
        end

        class Real
          extend ::Fog::Compute::Ovirt::V4::Shared

          def update_interface(id, options)
            check_arguments(id, options)

            interface_id = options[:id]
            nic = client.system_service.vms_service.vm_service(id).nics_service.nic_service(interface_id)
            nic.update(nic, options)
          end
        end

        class Mock
          extend ::Fog::Compute::Ovirt::V4::Shared

          def update_interface(id, options)
            check_arguments(id, options)
            true
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 9 versions & 2 rubygems

Version Path
fog-ovirt-1.1.4 lib/fog/ovirt/requests/compute/v4/update_interface.rb
fog-ovirt-1.1.3 lib/fog/ovirt/requests/compute/v4/update_interface.rb
fog-ovirt-1.1.2 lib/fog/ovirt/requests/compute/v4/update_interface.rb
fog-ovirt-1.1.1 lib/fog/ovirt/requests/compute/v4/update_interface.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-ovirt-1.1.0/lib/fog/ovirt/requests/compute/v4/update_interface.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-ovirt-1.1.0/lib/fog/ovirt/requests/compute/v4/update_interface.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-ovirt-1.1.0/lib/fog/ovirt/requests/compute/v4/update_interface.rb
fog-ovirt-1.1.0 lib/fog/ovirt/requests/compute/v4/update_interface.rb
fog-ovirt-1.0.4 lib/fog/ovirt/requests/compute/v4/update_interface.rb
fog-ovirt-1.0.3 lib/fog/ovirt/requests/compute/v4/update_interface.rb
fog-ovirt-1.0.2 lib/fog/ovirt/requests/compute/v4/update_interface.rb