Class: Cartography::Cluster

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

Defined Under Namespace

Classes: Endpoints, Site

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Cluster

Returns a new instance of Cluster.



13
14
15
16
17
18
19
20
21
# File 'lib/cartography/cluster.rb', line 13

def initialize(params = {})
  @cluster_id = params["ClusterID"]
  @environment = params["Environment"]
  @type = params["Type"]
  @namespace = params["Namespace"]
  @site_list = params["SiteList"]
  @sites = params["Sites"].map { |s| Site.new(s) }
  @endpoints = Endpoints.new(params["Endpoints"])
end

Instance Attribute Details

#cluster_idObject (readonly)

Returns the value of attribute cluster_id.



5
6
7
# File 'lib/cartography/cluster.rb', line 5

def cluster_id
  @cluster_id
end

#endpointsObject (readonly)

Returns the value of attribute endpoints.



5
6
7
# File 'lib/cartography/cluster.rb', line 5

def endpoints
  @endpoints
end

#environmentObject (readonly)

Returns the value of attribute environment.



5
6
7
# File 'lib/cartography/cluster.rb', line 5

def environment
  @environment
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



5
6
7
# File 'lib/cartography/cluster.rb', line 5

def namespace
  @namespace
end

#site_listObject (readonly)

Returns the value of attribute site_list.



5
6
7
# File 'lib/cartography/cluster.rb', line 5

def site_list
  @site_list
end

#sitesObject (readonly)

Returns the value of attribute sites.



5
6
7
# File 'lib/cartography/cluster.rb', line 5

def sites
  @sites
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/cartography/cluster.rb', line 5

def type
  @type
end