Association of Subnet is not found for its subclasses

Sorry for the delay.

I’ve tried your recommendations, @SGuser1, but the outcome has not changed compared to what @aruzicka suggested or what I came up with myself.

# foreman-rake console (Rails 6.1.7)
irb(main):001:0> [Subnet, Subnet::Ipv4, Subnet::Ipv6].map { |s| s.reflect_on_all_associations.map(&:name).include? :subnet_bgp_config }
=> [true, false, false]

You can review my plugin code on GitHub again: XMol/foreman_subnets_with_bgp_config@sguser1.

Nevertheless, thank you for your input!

After two weeks of working on this plugin, I decided to add the BGP settings directly to the Subnet table/model. It took just a couple of hours and the plugin is ready for testing.

Eventually, Foreman, Katello and Satellite will have switched to Rails 7 and we will have caught up to that release, so we can segregate the settings into their own table at some point in the future.

Thanks to everybody who took the time to read along and provide assistance, albeit futile.