Class: Cartography::Cluster::Site
- Inherits:
-
Object
- Object
- Cartography::Cluster::Site
- Defined in:
- lib/cartography/cluster.rb
Defined Under Namespace
Classes: Endpoints, LoadBalancer, ServerGroup
Instance Attribute Summary collapse
-
#availability_zone ⇒ Object
readonly
Returns the value of attribute availability_zone.
-
#cluster_id ⇒ Object
readonly
Returns the value of attribute cluster_id.
-
#endpoints ⇒ Object
readonly
Returns the value of attribute endpoints.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#load_balancers ⇒ Object
readonly
Returns the value of attribute load_balancers.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#server_groups ⇒ Object
readonly
Returns the value of attribute server_groups.
-
#site ⇒ Object
readonly
Returns the value of attribute site.
-
#site_groups ⇒ Object
readonly
Returns the value of attribute site_groups.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#zone_assignment ⇒ Object
readonly
Returns the value of attribute zone_assignment.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Site
constructor
A new instance of Site.
Constructor Details
#initialize(params = {}) ⇒ Site
Returns a new instance of Site.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/cartography/cluster.rb', line 51 def initialize(params = {}) @site = params["Site"] @site_groups = params["SiteGroups"] @region = params["Region"] @server_groups = params["ServerGroups"].map { |p| ServerGroup.new(p) } @load_balancers = params["LoadBalancers"].each_with_object({}) do |(kind, lbs), hash| hash[kind] = lbs.map { |lb| LoadBalancer.new(lb) } end @zone_assignment = params["ZoneAssignment"] @availability_zone = params["AvailabilityZone"] @endpoints = Endpoints.new(params["Endpoints"]) end |
Instance Attribute Details
#availability_zone ⇒ Object (readonly)
Returns the value of attribute availability_zone.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def availability_zone @availability_zone end |
#cluster_id ⇒ Object (readonly)
Returns the value of attribute cluster_id.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def cluster_id @cluster_id end |
#endpoints ⇒ Object (readonly)
Returns the value of attribute endpoints.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def endpoints @endpoints end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def environment @environment end |
#load_balancers ⇒ Object (readonly)
Returns the value of attribute load_balancers.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def load_balancers @load_balancers end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def namespace @namespace end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def region @region end |
#server_groups ⇒ Object (readonly)
Returns the value of attribute server_groups.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def server_groups @server_groups end |
#site ⇒ Object (readonly)
Returns the value of attribute site.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def site @site end |
#site_groups ⇒ Object (readonly)
Returns the value of attribute site_groups.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def site_groups @site_groups end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def type @type end |
#zone_assignment ⇒ Object (readonly)
Returns the value of attribute zone_assignment.
38 39 40 |
# File 'lib/cartography/cluster.rb', line 38 def zone_assignment @zone_assignment end |