Skip to content

Commit

Permalink
move iso datastore from core
Browse files Browse the repository at this point in the history
  • Loading branch information
nasark committed Dec 5, 2022
1 parent a5e24cd commit 4721129
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 109 deletions.
2 changes: 0 additions & 2 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ def self.create_from_params(params, endpoints, authentications)
has_many :customization_scripts, :foreign_key => "manager_id", :dependent => :destroy, :inverse_of => :ext_management_system
has_many :cloud_subnets, :foreign_key => :ems_id, :dependent => :destroy

has_one :iso_datastore, :foreign_key => "ems_id", :dependent => :destroy, :inverse_of => :ext_management_system

belongs_to :zone
belongs_to :zone_before_pause, :class_name => "Zone", :inverse_of => :paused_ext_management_systems # used for maintenance mode

Expand Down
53 changes: 0 additions & 53 deletions app/models/iso_datastore.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/models/iso_image.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class IsoImage < ApplicationRecord
belongs_to :iso_datastore
belongs_to :storage
belongs_to :pxe_image_type

has_many :customization_templates, :through => :pxe_image_type
Expand Down
2 changes: 2 additions & 0 deletions app/models/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Storage < ApplicationRecord
has_many :storage_files, :dependent => :destroy
has_many :storage_files_files, -> { where("rsc_type = 'file'") }, :class_name => "StorageFile", :foreign_key => "storage_id"
has_many :files, -> { where("rsc_type = 'file'") }, :class_name => "StorageFile", :foreign_key => "storage_id"
has_many :iso_images, :dependent => :destroy

has_many :miq_events, :as => :target, :dependent => :destroy

Expand Down Expand Up @@ -80,6 +81,7 @@ class Storage < ApplicationRecord
supports(:delete) { _("Only storage without VMs and Hosts can be removed") if vms_and_templates.any? || hosts.any? }

supports_not :evacuate
supports_not :iso_datastore

def to_s
name
Expand Down
53 changes: 0 additions & 53 deletions spec/models/iso_datastore_spec.rb

This file was deleted.

0 comments on commit 4721129

Please sign in to comment.