Class: Fog::OpenStack::Compute::ServerGroup

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/openstack/compute/models/server_group.rb

Constant Summary collapse

VALID_SERVER_GROUP_POLICIES =
['affinity', 'anti-affinity', 'soft-affinity', 'soft-anti-affinity'].freeze

Instance Attribute Summary

Attributes inherited from Model

#project

Class Method Summary collapse

Methods inherited from Model

#create, #destroy, #initialize, #save, #update

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Class Method Details

.validate_server_group_policy(policy) ⇒ Object

Raises:

  • (ArgumentError)


14
15
16
17
18
# File 'lib/fog/openstack/compute/models/server_group.rb', line 14

def self.validate_server_group_policy(policy)
  raise ArgumentError, "#{policy} is an invalid policy... must use one of #{VALID_SERVER_GROUP_POLICIES.join(', ')}" \
    unless VALID_SERVER_GROUP_POLICIES.include? policy
  true
end