Skip to content

Commit

Permalink
Rename ServiceCLass to ServiceOffering
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladas committed Aug 24, 2018
1 parent 09c4ae5 commit 83c0c7d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def self.api_allowed_attributes
has_many :miq_events, :as => :target, :dependent => :destroy
has_many :cloud_subnets, :foreign_key => :ems_id, :dependent => :destroy

has_many :service_classes, :foreign_key => :ems_id, :dependent => :destroy, :inverse_of => :ext_management_system
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_plans, :foreign_key => :ems_id, :dependent => :destroy, :inverse_of => :ext_management_system

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,21 +228,21 @@ def persistent_volume_claims
add_common_default_values
end

def service_classes
def service_offerings
add_properties(
:model_class => ::ServiceClass,
:model_class => ::ServiceOffering,
)
add_common_default_values
end

def container_service_plans
def service_plans
add_properties(
:model_class => ::ServicePlan,
)
add_common_default_values
end

def container_service_instances
def service_instances
add_properties(
:model_class => ::ServiceInstance,
)
Expand Down
2 changes: 1 addition & 1 deletion app/models/service_instance.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ServiceInstance < ApplicationRecord
belongs_to :ext_management_system, :foreign_key => "ems_id", :inverse_of => :service_instances
belongs_to :service_class
belongs_to :service_offering
belongs_to :service_plan
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ServiceClass < ApplicationRecord
belongs_to :ext_management_system, :foreign_key => "ems_id", :inverse_of => :service_classes
class ServiceOffering < ApplicationRecord
belongs_to :ext_management_system, :foreign_key => "ems_id", :inverse_of => :service_offerings
belongs_to :service_broker

has_many :service_plans, :dependent => :nullify
Expand Down
2 changes: 1 addition & 1 deletion app/models/service_plan.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class ServicePlan < ApplicationRecord
belongs_to :ext_management_system, :foreign_key => "ems_id", :inverse_of => :service_plans
belongs_to :service_class
belongs_to :service_offering

has_many :service_instances, :dependent => :nullify
end

0 comments on commit 83c0c7d

Please sign in to comment.