mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-05 06:12:09 +08:00
14 lines
347 B
Ruby
14 lines
347 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Serializers::DetachableVolume < Serializers::Base
|
|
def self.serialize_internal(dv, options = {})
|
|
{
|
|
id: dv.ubid,
|
|
name: dv.name,
|
|
size_gib: dv.size_gib,
|
|
state: dv.display_state,
|
|
vm_id: dv.vm_id && UBID.from_uuidish(dv.vm_id).to_s,
|
|
encrypted: dv.encrypted?
|
|
}
|
|
end
|
|
end
|