ironfan 4.12.0 → 4.12.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v4.12.1
2
+ * REALM discovery aids: see https://github.com/infochimps-labs/ironfan/pull/309 for details
3
+
1
4
  # v4.12.0
2
5
  * Added realms (supra-cluster scoping): see https://github.com/infochimps-labs/ironfan/pull/308 for details
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.12.0
1
+ 4.12.1
data/ironfan.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ironfan"
8
- s.version = "4.12.0"
8
+ s.version = "4.12.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Infochimps"]
12
- s.date = "2013-09-24"
12
+ s.date = "2013-09-26"
13
13
  s.description = "Ironfan allows you to orchestrate not just systems but clusters of machines. It includes a powerful layer on top of knife and a collection of cloud cookbooks."
14
14
  s.email = "coders@infochimps.com"
15
15
  s.extra_rdoc_files = [
@@ -9,6 +9,10 @@ module Ironfan
9
9
  self.cluster_role Ironfan::Dsl::Role.new(:name => "#{attrs[:name]}-cluster")
10
10
  end
11
11
 
12
+ def facet(name,attrs={},&block)
13
+ super(name,attrs.merge(cluster_names: cluster_names),&block)
14
+ end
15
+
12
16
  # Utility method to reference all servers from constituent facets
13
17
  def servers
14
18
  result = Gorillib::ModelCollection.new(:item_type => Ironfan::Dsl::Server, :key_method => :full_name)
@@ -27,6 +27,8 @@ module Ironfan
27
27
  member :cluster_role, Ironfan::Dsl::Role
28
28
  member :facet_role, Ironfan::Dsl::Role
29
29
 
30
+ magic :cluster_names, Whatever
31
+
30
32
  def initialize(attrs={},&block)
31
33
  self.underlay = attrs[:owner] if attrs[:owner]
32
34
  super
@@ -4,19 +4,29 @@ module Ironfan
4
4
  class Realm < Ironfan::Dsl::Compute
5
5
  collection :clusters, Ironfan::Dsl::Cluster, :resolver => :deep_resolve
6
6
 
7
+ magic :cluster_suffixes, Whatever
8
+
7
9
  def initialize(attrs={},&block)
10
+ cluster_names OpenStruct.new
11
+ cluster_suffixes OpenStruct.new
8
12
  super
9
13
  end
10
14
 
11
15
  def cluster(label, attrs={},&blk)
12
- new_name = [realm_name, label].join '_'
13
- cluster = Ironfan::Dsl::Cluster.new(name: new_name)
16
+ new_name = [realm_name, label].join('_').to_sym
17
+ cluster = Ironfan::Dsl::Cluster.new(name: new_name, cluster_names: OpenStruct.new)
18
+ cluster_names.new_ostruct_member label
19
+ cluster_names.send "#{label}=", new_name
20
+ cluster_suffixes.new_ostruct_member label
21
+ cluster_suffixes.send "#{label}=", label
22
+ (clusters.keys.map{|k| clusters[k]} << cluster).each do |cl|
23
+ cl.cluster_names cluster_names
24
+ end
14
25
  cluster.receive!(attrs, &blk)
15
26
  super(new_name, cluster)
16
27
  end
17
28
 
18
29
  def realm_name() name; end
19
30
  end
20
-
21
31
  end
22
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ironfan
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.12.0
4
+ version: 4.12.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-24 00:00:00.000000000 Z
12
+ date: 2013-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
@@ -382,7 +382,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
382
382
  version: '0'
383
383
  segments:
384
384
  - 0
385
- hash: -1961603152383725034
385
+ hash: 3895515305460381618
386
386
  required_rubygems_version: !ruby/object:Gem::Requirement
387
387
  none: false
388
388
  requirements: