Skip to content

Commit

Permalink
Merge pull request #21045 from k-chu/add_cpu_ram_virtual_delegate
Browse files Browse the repository at this point in the history
Add delegate for cpu/memory to Configured System
  • Loading branch information
agrare authored Feb 11, 2021
2 parents 2bed2a4 + d53b429 commit 17cd92b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/configured_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 17cd92b

Please sign in to comment.