Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Merge branch 'KNIFE_RACKSPACE-40'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattray committed Sep 27, 2012
2 parents 193d93d + 2cc227c commit f6d74e9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* KNIFE_RACKSPACE-38 Support the -P --purge option
* Refactored to use msg_pair method like other knife plugins with eye on eventual base class.
* KNIFE_RACKSPACE-29 Support private network to connect to for bootstrap
* KNIFE_RACKSPACE-40 Support for disabling host key checking
* Added the 'unknown' state to `rackspace server list`, appeared transitory

## v0.5.14
* KNIFE_RACKSPACE-25 version bump to match knife-ec2's dependencies
Expand Down
7 changes: 7 additions & 0 deletions lib/chef/knife/rackspace_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ class RackspaceServerCreate < Knife
:proc => Proc.new { |m| Chef::Config[:knife][:rackspace_metadata] = JSON.parse(m) },
:default => ""

option :host_key_verify,
:long => "--[no-]host-key-verify",
:description => "Verify host key, enabled by default",
:boolean => true,
:default => true

def tcp_test_ssh(hostname)
tcp_socket = TCPSocket.new(hostname, 22)
readable = IO.select([tcp_socket], nil, nil, 5)
Expand Down Expand Up @@ -223,6 +229,7 @@ def bootstrap_for_node(server, bootstrap_ip_address)
bootstrap.config[:ssh_user] = config[:ssh_user] || "root"
bootstrap.config[:ssh_password] = server.password
bootstrap.config[:identity_file] = config[:identity_file]
bootstrap.config[:host_key_verify] = config[:host_key_verify]
bootstrap.config[:chef_node_name] = config[:chef_node_name] || server.id
bootstrap.config[:prerelease] = config[:prerelease]
bootstrap.config[:bootstrap_version] = locate_config_value(:bootstrap_version)
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/knife/rackspace_server_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def run
case server.state.downcase
when 'deleted','suspended'
ui.color(server.state.downcase, :red)
when 'build'
when 'build','unknown'
ui.color(server.state.downcase, :yellow)
else
ui.color(server.state.downcase, :green)
Expand Down

0 comments on commit f6d74e9

Please sign in to comment.