From 57308efaf7d476313d3ee3e5146ff8fdac0b2ccb Mon Sep 17 00:00:00 2001 From: Jay Carman Date: Thu, 8 Oct 2020 03:41:41 -0500 Subject: [PATCH] Add new 'CloudSubnet' extra attribute column In 'ManageIQ::Providers::IbmCloud::PowerVirtualServers' subnets are typed as 'vlan' and 'pub-vlan'. This generic ':network_type' virtual column in the 'cloud_subnets' 'extra_attributes' table would facilitate persisting the subnet type. --- app/models/cloud_subnet.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/cloud_subnet.rb b/app/models/cloud_subnet.rb index 4e44f55b753..9e97e9a81ea 100644 --- a/app/models/cloud_subnet.rb +++ b/app/models/cloud_subnet.rb @@ -30,9 +30,10 @@ class CloudSubnet < ApplicationRecord virtual_column :host_routes, :type => :string virtual_column :ip_version, :type => :string virtual_column :subnetpool_id, :type => :string + virtual_column :network_type, :type => :string # Define all getters and setters for extra_attributes related virtual columns - %i(allocation_pools host_routes ip_version subnetpool_id).each do |action| + %i(allocation_pools host_routes ip_version subnetpool_id network_type).each do |action| define_method("#{action}=") do |value| extra_attributes_save(action, value) end