Class: VersSdk::VmCreateVmConfig
- Inherits:
-
Object
- Object
- VersSdk::VmCreateVmConfig
- Defined in:
- lib/vers_sdk/models.rb
Overview
Struct representing configuration options common to all VMs
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_json(json_str) ⇒ Object
1235 1236 1237 1238 |
# File 'lib/vers_sdk/models.rb', line 1235 def self.from_json(json_str) obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str new(obj) end |
Instance Method Details
#to_h ⇒ Object
1240 1241 1242 1243 1244 1245 1246 1247 1248 |
# File 'lib/vers_sdk/models.rb', line 1240 def to_h { "fs_size_mib" => @vm_create_vm_config, "image_name" => @vm_create_vm_config, "kernel_name" => @vm_create_vm_config, "mem_size_mib" => @vm_create_vm_config, "vcpu_count" => @vm_create_vm_config, } end |
#to_json(*args) ⇒ Object
1250 1251 1252 |
# File 'lib/vers_sdk/models.rb', line 1250 def to_json(*args) to_h.to_json(*args) end |