Skip to content

Commit

Permalink
Add :cinder_volume_types to SupportsFeatureMixin
Browse files Browse the repository at this point in the history
Also adds "supports_cinder_volume_types" virtual column
to ExtManagementSystem to accomodate accessing that
field from the API.
  • Loading branch information
mansam committed Sep 19, 2018
1 parent ea94ae7 commit 0a3094b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def hostname_format_valid?
virtual_total :total_subnets, :cloud_subnets
virtual_column :supports_block_storage, :type => :boolean
virtual_column :supports_cloud_object_store_container_create, :type => :boolean
virtual_column :supports_cinder_volume_types, :type => :boolean

virtual_aggregate :total_vcpus, :hosts, :sum, :total_vcpus
virtual_aggregate :total_memory, :hosts, :sum, :ram_size
Expand Down Expand Up @@ -587,6 +588,10 @@ def supports_cloud_object_store_container_create
supports_cloud_object_store_container_create?
end

def supports_cinder_volume_types
supports_cinder_volume_types?
end

def get_reserve(field)
(hosts + ems_clusters).inject(0) { |v, obj| v + (obj.send(field) || 0) }
end
Expand Down
1 change: 1 addition & 0 deletions app/models/mixins/supports_feature_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module SupportsFeatureMixin
:backup_create => 'CloudVolume backup creation',
:backup_restore => 'CloudVolume backup restore',
:cinder_service => 'Cinder storage service',
:cinder_volume_types => 'Cinder volume types',
:create_floating_ip => 'Floating IP Creation',
:create_host_aggregate => 'Host Aggregate Creation',
:create_security_group => 'Security Group Creation',
Expand Down

0 comments on commit 0a3094b

Please sign in to comment.