Class: Cartography::PlacementConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/cartography/placement_constraint.rb

Overview

PlacementConstraint holds data for the current state of a specific placement constraint.

Defined Under Namespace

Classes: PlacementError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PlacementConstraint

Returns a new instance of PlacementConstraint.



15
16
17
18
19
20
21
22
23
# File 'lib/cartography/placement_constraint.rb', line 15

def initialize(params = {})
  @placement_constraint_id = params["PlacementConstraintID"]
  @account_id = params["AccountID"]
  @cluster = params["Cluster"]
  @environment = params["Environment"]
  @keyspace = params["Keyspace"]
  @placement_error = PlacementError.new(params["PlacementError"])
  @sites = params["Sites"]
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



7
8
9
# File 'lib/cartography/placement_constraint.rb', line 7

def 
  @account_id
end

#clusterObject (readonly)

Returns the value of attribute cluster.



7
8
9
# File 'lib/cartography/placement_constraint.rb', line 7

def cluster
  @cluster
end

#environmentObject (readonly)

Returns the value of attribute environment.



7
8
9
# File 'lib/cartography/placement_constraint.rb', line 7

def environment
  @environment
end

#keyspaceObject (readonly)

Returns the value of attribute keyspace.



7
8
9
# File 'lib/cartography/placement_constraint.rb', line 7

def keyspace
  @keyspace
end

#placement_constraint_idObject (readonly)

Returns the value of attribute placement_constraint_id.



7
8
9
# File 'lib/cartography/placement_constraint.rb', line 7

def placement_constraint_id
  @placement_constraint_id
end

#placement_errorObject (readonly)

Returns the value of attribute placement_error.



7
8
9
# File 'lib/cartography/placement_constraint.rb', line 7

def placement_error
  @placement_error
end

#sitesObject (readonly)

Returns the value of attribute sites.



7
8
9
# File 'lib/cartography/placement_constraint.rb', line 7

def sites
  @sites
end