diff --git a/lib/rouster.rb b/lib/rouster.rb index bb2ef35..707a99b 100644 --- a/lib/rouster.rb +++ b/lib/rouster.rb @@ -195,15 +195,15 @@ def initialize(opts = nil) ostack_defaults = { :ssh_port => 22, } - @passthrough = ostack_defaults.merge(@passthrough) + @passthrough = ostack_defaults.merge(@passthrough) - [:openstack_auth_url, :openstack_username, :openstack_tenant, :openstack_api_key, - :key ].each do |r| - raise ArgumentError.new(sprintf('OpenStack passthrough requires %s specification', r)) if @passthrough[r].nil? - end + [:openstack_auth_url, :openstack_username, :openstack_tenant, :openstack_api_key, + :key ].each do |r| + raise ArgumentError.new(sprintf('OpenStack passthrough requires %s specification', r)) if @passthrough[r].nil? +end if @passthrough.has_key?(:image_ref) - @logger.debug(':image_ref specified, will start new Nova instance') + @logger.debug(':image_ref specified, will start new Nova instance') elsif @passthrough.has_key?(:instance) @logger.debug(':instance specified, will connect to existing OpenStack instance') inst_details = self.ostack_describe_instance(@passthrough[:instance]) diff --git a/lib/rouster/vagrant.rb b/lib/rouster/vagrant.rb index 8f3a908..36e2b1c 100644 --- a/lib/rouster/vagrant.rb +++ b/lib/rouster/vagrant.rb @@ -54,7 +54,7 @@ def up elsif (self.passthrough[:type].equal?(:openstack)) self.ostack_up() else - raise InternalError.new(sprintf('failed to execute up(), unsupported passthrough type %s', self.passthrough[:type])) + self.vagrant(sprintf('up %s', @name)) end else self.vagrant(sprintf('up %s', @name)) diff --git a/plugins/openstack.rb b/plugins/openstack.rb index 4d9c757..754c03c 100644 --- a/plugins/openstack.rb +++ b/plugins/openstack.rb @@ -37,7 +37,7 @@ def ostack_up self.connect_ssh_tunnel else server = @nova.servers.create(:name => @name, :flavor_ref => @passthrough[:flavor_ref], - :image_ref => @passthrough[:image_ref], :key_name => @passthrough[:keypair]) + :image_ref => @passthrough[:image_ref], :key_name => @passthrough[:keypair]) server.wait_for { ready? } @instance_data = server self.passthrough[:host] = server.addresses["NextGen"][0]["addr"]