[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Ovirt-devel] [PATCH]: Add host memory in kb to the database



On Mon, Aug 11, 2008 at 11:30:01AM -0400, Scott Seago wrote:
> Steve Linabery wrote:
>> On Mon, Aug 11, 2008 at 10:54:19AM -0400, Scott Seago wrote:    
>>> Well the attribute doesn't exist, but as mentioned above, there's a   
>>> method with this name that sets the proper memory value (assuming 
>>> what  you have is in megabytes).
>>>     
>>
>> For the record, there is only memory_in_mb= that does what you describe here (but which doesn't work for initializing a new instance).
>>
>>   
> It actually works fine for initializing an instance:
>
> irb(main):045:0> foo = Host.new(:hostname=>"foo", :memory_in_mb=>256)
> => #<Host id: nil, uuid: nil, hypervisor_type: nil, hostname: "foo",  
> arch: nil, memory: 262144, is_disabled: nil, hardware_pool_id: nil,  
> state: nil, load_average: nil, created_at: nil, updated_at: nil>
> irb(main):046:0> foo.memory_in_mb
> => 256
> irb(main):047:0> foo.memory
> => 262144

Thanks for the edu-muh-catin'!

>
> But again, in this instance we don't want the conversion happening.
>
> Scott
>
> _______________________________________________
> Ovirt-devel mailing list
> Ovirt-devel redhat com
> https://www.redhat.com/mailman/listinfo/ovirt-devel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]