Sha256: b93da8d9a835217a0ad61bdf08cc89752068aa2459c8b17ce9e0b530b5b97817

Contents?: true

Size: 415 Bytes

Versions: 5

Compression:

Stored size: 415 Bytes

Contents

module FogExtensions
  module Libvirt
    module Server

      def to_s
        name
      end

      def nics_attributes=(attrs); end

      def volumes_attributes=(attrs); end

      # Libvirt expect units in KB, while we use bytes
      def memory
        attributes[:memory_size].to_i * 1024
      end

      def memory= mem
        attributes[:memory_size] = mem.to_i / 1024 if mem
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/lib/fog_extensions/libvirt/server.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/lib/fog_extensions/libvirt/server.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/lib/fog_extensions/libvirt/server.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/lib/fog_extensions/libvirt/server.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/lib/fog_extensions/libvirt/server.rb