From 3b772fc88fcb3e189760e15f6cfd55000c2030f5 Mon Sep 17 00:00:00 2001 From: Ladislav Smola Date: Mon, 27 Aug 2018 11:23:23 +0200 Subject: [PATCH] Remove service instances for now --- app/models/ext_management_system.rb | 1 - .../inventory/persister/builder/container_manager.rb | 4 ---- app/models/service_instance.rb | 5 ----- app/models/service_offering.rb | 1 - app/models/service_parameters_set.rb | 2 -- 5 files changed, 13 deletions(-) delete mode 100644 app/models/service_instance.rb diff --git a/app/models/ext_management_system.rb b/app/models/ext_management_system.rb index a9508de68c1..e60c9c3f320 100644 --- a/app/models/ext_management_system.rb +++ b/app/models/ext_management_system.rb @@ -80,7 +80,6 @@ def self.api_allowed_attributes has_many :vms_and_templates_advanced_settings, :through => :vms_and_templates, :source => :advanced_settings has_many :service_offerings, :foreign_key => :ems_id, :dependent => :destroy, :inverse_of => :ext_management_system - has_many :service_instances, :foreign_key => :ems_id, :dependent => :destroy, :inverse_of => :ext_management_system has_many :service_parameters_sets, :foreign_key => :ems_id, :dependent => :destroy, :inverse_of => :ext_management_system validates :name, :presence => true, :uniqueness => {:scope => [:tenant_id]} diff --git a/app/models/manageiq/providers/inventory/persister/builder/container_manager.rb b/app/models/manageiq/providers/inventory/persister/builder/container_manager.rb index 8994fede4ee..574898b35e5 100644 --- a/app/models/manageiq/providers/inventory/persister/builder/container_manager.rb +++ b/app/models/manageiq/providers/inventory/persister/builder/container_manager.rb @@ -236,10 +236,6 @@ def service_parameters_sets add_common_default_values end - def service_instances - add_common_default_values - end - protected def custom_reconnect_block diff --git a/app/models/service_instance.rb b/app/models/service_instance.rb deleted file mode 100644 index 0dab90934d0..00000000000 --- a/app/models/service_instance.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ServiceInstance < ApplicationRecord - belongs_to :ext_management_system, :foreign_key => "ems_id", :inverse_of => :service_instances - belongs_to :service_offering - belongs_to :service_parameters_set -end diff --git a/app/models/service_offering.rb b/app/models/service_offering.rb index 1681e9f4f0c..3f69272393f 100644 --- a/app/models/service_offering.rb +++ b/app/models/service_offering.rb @@ -3,5 +3,4 @@ class ServiceOffering < ApplicationRecord belongs_to :service_broker has_many :service_parameters_sets, :dependent => :nullify - has_many :service_instances, :dependent => :nullify end diff --git a/app/models/service_parameters_set.rb b/app/models/service_parameters_set.rb index 0748bba1cf9..33220d54d6c 100644 --- a/app/models/service_parameters_set.rb +++ b/app/models/service_parameters_set.rb @@ -1,6 +1,4 @@ class ServiceParametersSet < ApplicationRecord belongs_to :ext_management_system, :foreign_key => "ems_id", :inverse_of => :service_parameters_sets belongs_to :service_offering - - has_many :service_instances, :dependent => :nullify end