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

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

Constant Summary collapse

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

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Class Method Summary collapse

Methods inherited from OpenStack::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/compute/openstack/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