Permalink
Browse files

Put the project name in metadata keys and machine_group_name.

  • Loading branch information...
1 parent 8c4aa6c commit bb5f4bbd13b36922464170b568e68ccb9fe64134 @Fluxx Fluxx committed Jun 1, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/rudy/huxtable.rb
  2. +3 −3 lib/rudy/metadata.rb
View
@@ -168,7 +168,7 @@ def defined_keypairpath(name=nil)
def current_machine_group
- [@@global.environment, @@global.role].join(Rudy::DELIM)
+ [@@global.project, @@global.environment, @@global.role].compact.join(Rudy::DELIM)
end
def current_group_name
View
@@ -4,7 +4,7 @@ module Rudy
module Metadata
include Rudy::Huxtable
- COMMON_FIELDS = [:region, :zone, :environment, :role].freeze
+ COMMON_FIELDS = [:region, :zone, :project, :environment, :role].freeze
@@rsdb = nil
@@domain = Rudy::Huxtable.domain
@@ -182,8 +182,8 @@ def initialize(rtype, opts={})
end
def name(*other)
- parts = [@rtype, @zone, @environment, @role, @position, *other].flatten
- parts.join Rudy::DELIM
+ parts = [@rtype, @zone, @project, @environment, @role, @position, *other]
+ parts.compact.flatten.join Rudy::DELIM
end
def save(replace=false)

0 comments on commit bb5f4bb

Please sign in to comment.