From d53b4296b5672e2b86743eaf02d365bf33671e78 Mon Sep 17 00:00:00 2001 From: Kenneth Chu Date: Thu, 11 Feb 2021 15:11:09 -0500 Subject: [PATCH] Add delegate for cpu/memory to Configured System --- app/models/configured_system.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/configured_system.rb b/app/models/configured_system.rb index 8c3f7ebfebf..2f3193ee5db 100644 --- a/app/models/configured_system.rb +++ b/app/models/configured_system.rb @@ -38,6 +38,9 @@ class ConfiguredSystem < ApplicationRecord delegate :my_zone, :provider, :zone, :to => :manager delegate :queue_name_for_ems_operations, :to => :manager, :allow_nil => true + virtual_delegate :cpu_total_cores, :to => :hardware, :allow_nil => true, :default => 0, :type => :integer + virtual_delegate :ram_size, :to => "hardware.memory_mb", :allow_nil => true, :default => 0, :type => :integer + virtual_column :my_zone, :type => :string virtual_column :configuration_architecture_name, :type => :string virtual_column :configuration_compute_profile_name, :type => :string