Skip to content

Commit

Permalink
Add Cloud Volume Type model
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Lucidi authored and mansam committed Jun 19, 2018
1 parent a17e881 commit a71a1f6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/models/cloud_volume_type.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class CloudVolumeType < ApplicationRecord
include NewWithTypeStiMixin
include ProviderObjectMixin

acts_as_miq_taggable

belongs_to :ext_management_system, :foreign_key => :ems_id, :class_name => "ExtManagementSystem"

def self.class_by_ems(ext_management_system)
ext_management_system && ext_management_system.class::CloudVolumeType
end
end
1 change: 1 addition & 0 deletions app/models/manageiq/providers/cloud_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class << model_name
has_many :cloud_tenants, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_resource_quotas, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_volumes, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_volume_types, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_volume_backups, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_volume_snapshots, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_object_store_containers, :foreign_key => :ems_id, :dependent => :destroy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module ManageIQ::Providers::StorageManager::BlockMixin
has_many :cloud_volumes, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_volume_snapshots, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_volume_backups, :foreign_key => :ems_id, :dependent => :destroy
has_many :cloud_volume_types, :foreign_key => :ems_id, :dependent => :destroy

supports :block_storage
end
Expand Down

0 comments on commit a71a1f6

Please sign in to comment.