stackit 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stackit/mixin/availability_zone.rb +15 -0
- data/lib/stackit/mixin/tier.rb +8 -4
- data/lib/stackit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdda9a13490cb6d90640e958f9cd42a748185024
|
4
|
+
data.tar.gz: 4c2a5584e18dcc02e102c65b7ccb895cb5a8529e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0236c6783d0ab999ff465db3e86f9d71a65d89ffe59a906efce2fcedd1b458943f6acaa2db9a1e82c1a17dde2fcdfce3aedee604db3cc31210d9c882fd69c3d1
|
7
|
+
data.tar.gz: 8cb6842996ccf6073659a72f55f0af4e4d7c40bd07e6a77b3d7b898e024a488d0c01260256fefa15bdc772be19c716d68b9dd1f88c7c9fdca48f4eff227d44c1
|
@@ -1,13 +1,28 @@
|
|
1
1
|
module Stackit::Mixin::AvailabilityZone
|
2
2
|
|
3
|
+
attr_accessor :az
|
3
4
|
attr_accessor :az_syms
|
4
5
|
|
6
|
+
def az=(az)
|
7
|
+
@az = az || az_syms[0]
|
8
|
+
end
|
9
|
+
|
5
10
|
def az_syms=(keys)
|
6
11
|
@az_syms = keys.each{ |key|
|
7
12
|
key = key.to_sym
|
8
13
|
}
|
9
14
|
end
|
10
15
|
|
16
|
+
def az_hash
|
17
|
+
{
|
18
|
+
az_sym => resolve_parameter(az_sym)
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
def availability_zone
|
23
|
+
resolve_parameter(az)
|
24
|
+
end
|
25
|
+
|
11
26
|
def availability_zones
|
12
27
|
resolve_parameters(az_syms)
|
13
28
|
end
|
data/lib/stackit/mixin/tier.rb
CHANGED
@@ -15,6 +15,14 @@ module Stackit::Mixin::Tier
|
|
15
15
|
@tier_map = map
|
16
16
|
end
|
17
17
|
|
18
|
+
def subnet
|
19
|
+
resolve_parameter(tier_map[tier][az])
|
20
|
+
end
|
21
|
+
|
22
|
+
def subnets
|
23
|
+
resolve_parameters(tier_map[tier].values)
|
24
|
+
end
|
25
|
+
|
18
26
|
def selected_subnet_sym
|
19
27
|
tier_map[tier][selected_az_sym]
|
20
28
|
end
|
@@ -23,10 +31,6 @@ module Stackit::Mixin::Tier
|
|
23
31
|
resolve_parameter(selected_subnet_sym)
|
24
32
|
end
|
25
33
|
|
26
|
-
def subnets
|
27
|
-
resolve_parameters(tier_map[tier].values)
|
28
|
-
end
|
29
|
-
|
30
34
|
def random_subnet
|
31
35
|
random_az_and_subnet[:subnet]
|
32
36
|
end
|
data/lib/stackit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stackit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Hahn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|