lib/fog/ovirt/compute/v3.rb
def ovirt_attrs(obj)
            opts = { :raw => obj }
            obj.instance_variables.each do |v|
              key = v.to_s.delete("@").to_sym
              value = obj.instance_variable_get(v)
              # ignore nil values
              next if value.nil?

              opts[key] = case value
                          when OVIRT::Link
                            value.id
                          when OVIRT::TemplateVersion
                            value
                          when Array
                            value
                          when Hash
                            value
                          else
                            value.to_s.strip
                          end
            end
            opts
          end
# converts an OVIRT object into an hash for fog to consume.
converts an OVIRT object into an hash for fog to consume.
converts an OVIRT object into an hash for fog to consume .
def ovirt_attrs(obj)
            opts = { :raw => obj }
            obj.instance_variables.each do |v|
              key = v.to_s.delete("@").to_sym
              value = obj.instance_variable_get(v)
              next if value.nil?
              opts[key] = case value
                          when OVIRT::Link
                            value.id
                          when OVIRT::TemplateVersion
                            value
                          when Array
                            value
                          when Hash
                            value
                          else
                            value.to_s.strip
                          end
            end
            opts
          end
def ovirt_attrs ( obj ) opts = { :raw => obj } obj . instance_variables . each do | v | key = v . to_s . delete ( "@" ) . to_sym value = obj . instance_variable_get ( v ) next if value . nil? opts [ key ] = case value when OVIRT :: Link value . id when OVIRT :: TemplateVersion value when Array value when Hash value else value . to_s . strip end end opts end
converts an OVIRT object into an hash for fog to consume.
converts an OVIRT object into an hash for fog to consume .
# ignore nil values
obj