bosh_openstack_registry 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,8 @@ module Bosh::OpenstackRegistry
5
5
  class ApiController < Sinatra::Base
6
6
 
7
7
  not_found do
8
+ exception = request.env["sinatra.error"]
9
+ @logger.error(exception.message)
8
10
  json(:status => "not_found")
9
11
  end
10
12
 
@@ -64,7 +64,7 @@ module Bosh::OpenstackRegistry
64
64
 
65
65
  # Get the list of IPs belonging to this server
66
66
  def server_ips(server_id)
67
- server = @openstack.servers.get(server_id)
67
+ server = @openstack.servers.find { |s| s.name == server_id }
68
68
  raise ServerNotFound, "Server `#{server_id}' not found" unless server
69
69
  ips = []
70
70
  server.addresses.each do |network, addresses|
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bosh
4
4
  module OpenstackRegistry
5
- VERSION = "0.0.4"
5
+ VERSION = "0.0.5"
6
6
  end
7
7
  end
@@ -27,7 +27,7 @@ describe Bosh::OpenstackRegistry::ServerManager do
27
27
  })
28
28
 
29
29
  @compute.should_receive(:servers).and_return(servers)
30
- servers.should_receive(:get).with("foo").and_return(server)
30
+ servers.should_receive(:find).and_return(server)
31
31
  end
32
32
 
33
33
  describe "reading settings" do
@@ -69,7 +69,7 @@ describe Bosh::OpenstackRegistry::ServerManager do
69
69
  expect {
70
70
  servers = mock("servers")
71
71
  @compute.should_receive(:servers).and_return(servers)
72
- servers.should_receive(:get).with("foo").and_return(nil)
72
+ servers.should_receive(:find).and_return(nil)
73
73
  create_server(:server_id => "foo", :settings => "bar")
74
74
  manager.read_settings("foo", "10.0.0.1")
75
75
  }.to raise_error(Bosh::OpenstackRegistry::ServerNotFound,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_openstack_registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
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: 2012-12-10 00:00:00.000000000 Z
12
+ date: 2012-12-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel