vcloud-net-spinner 0.1.4 → 0.1.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.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.1.5 2014-01-15
2
+
3
+ - Exit code 1 if config request fails.
4
+
1
5
  0.1.4 2014-01-09
2
6
 
3
7
  - Documentation changes only.
@@ -18,8 +18,7 @@ class EdgeGateway
18
18
  check_for_success auth_header, ConfigureTask.new(configure_request.response_body)
19
19
  return true
20
20
  else
21
- puts "Failed to configure the edge gateway"
22
- return false
21
+ abort("Failed to configure the edge gateway")
23
22
  end
24
23
  end
25
24
 
@@ -1 +1 @@
1
- VERSION = '0.1.4'
1
+ VERSION = '0.1.5'
@@ -0,0 +1,37 @@
1
+ require 'spec_helper'
2
+ require 'vcloud_network_configurator'
3
+
4
+ describe "request failed" do
5
+
6
+ before :each do
7
+ WebMock.disable_net_connect!
8
+ WebMock.reset!
9
+
10
+ session_url = "https://super%40org-name:man@www.vcloud.eggplant.com/sessions"
11
+ edge_gateway_configure_url = "https://www.vcloud.eggplant.com/admin/edgeGateway/123321/action/configureServices"
12
+
13
+ stub_request(:post, session_url).
14
+ with(:headers => {'Accept'=>'application/*+xml;version=5.1', 'User-Agent'=>'Ruby'}).
15
+ to_return(:status => 200,
16
+ :body => File.read('spec/integration/test_data/happy_path_auth_response.xml'),
17
+ :headers => { 'x-vcloud-authorization' => '123321'})
18
+
19
+ stub_request(:post, edge_gateway_configure_url).
20
+ with(:body => configure_firewall_xml,
21
+ :headers => { 'Accept'=>'application/*+xml;version=5.1',
22
+ 'Content-Type'=>'application/vnd.vmware.admin.edgeGatewayServiceConfiguration+xml',
23
+ 'User-Agent'=>'Ruby',
24
+ 'X-Vcloud-Authorization'=>'123321' }).
25
+ to_return(:status => 400, :body => 'eep')
26
+ end
27
+
28
+ it "should abort on failure" do
29
+ args = ["-u", "super", "-p", "man", "-U", "123321", "-r",
30
+ "spec/integration/test_data/rules_dir/common_firewall.rb,spec/integration/test_data/rules_dir/preview/firewall.rb",
31
+ "-o", "org-name",
32
+ "-c", "firewall", "https://www.vcloud.eggplant.com"]
33
+
34
+ configurator = VcloudNetworkConfigurator.new(args)
35
+ expect { configurator.execute }.to raise_error(SystemExit, "Failed to configure the edge gateway")
36
+ end
37
+ end
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.add_development_dependency "webmock"
28
28
  s.add_development_dependency "rspec", "~> 2.11.0"
29
29
  s.add_development_dependency "equivalent-xml", "~> 0.2.9"
30
- s.add_development_dependency "gem_publisher", "~> 1.3.0"
30
+ s.add_development_dependency "gem_publisher", "~> 1.3.1"
31
31
  s.add_runtime_dependency "parallel"
32
32
  s.add_runtime_dependency "highline"
33
33
  s.add_runtime_dependency "nokogiri", "~> 1.5.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcloud-net-spinner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.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: 2014-01-09 00:00:00.000000000 Z
12
+ date: 2014-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -114,7 +114,7 @@ dependencies:
114
114
  requirements:
115
115
  - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 1.3.0
117
+ version: 1.3.1
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ dependencies:
122
122
  requirements:
123
123
  - - ~>
124
124
  - !ruby/object:Gem::Version
125
- version: 1.3.0
125
+ version: 1.3.1
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: parallel
128
128
  requirement: !ruby/object:Gem::Requirement
@@ -212,6 +212,7 @@ files:
212
212
  - spec/integration/happy_path_firewall_spec.rb
213
213
  - spec/integration/happy_path_loadbalancer_spec.rb
214
214
  - spec/integration/happy_path_nat_spec.rb
215
+ - spec/integration/request_failed_spec.rb
215
216
  - spec/integration/test_data/happy_path_auth_response.xml
216
217
  - spec/integration/test_data/rules_dir/common_firewall.rb
217
218
  - spec/integration/test_data/rules_dir/common_lb.rb
@@ -242,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
243
  version: '0'
243
244
  segments:
244
245
  - 0
245
- hash: 2270830597403482561
246
+ hash: -3302073203716189298
246
247
  required_rubygems_version: !ruby/object:Gem::Requirement
247
248
  none: false
248
249
  requirements:
@@ -251,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
252
  version: '0'
252
253
  segments:
253
254
  - 0
254
- hash: 2270830597403482561
255
+ hash: -3302073203716189298
255
256
  requirements: []
256
257
  rubyforge_project: vcloud-net-spinner
257
258
  rubygems_version: 1.8.23