-
Notifications
You must be signed in to change notification settings - Fork 896
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17610 from mansam/create-cloud-volume-types
Add Cloud Volume Type model
- Loading branch information
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class CloudVolumeType < ApplicationRecord | ||
# CloudVolumeTypes represent various "flavors" of | ||
# volume that are available to create within a given | ||
# Storage service. | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters