vagrant-hp 0.1.2 → 0.1.3

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,6 @@
5
5
 
6
6
  module VagrantPlugins
7
7
  module HP
8
- VERSION = "0.1.2"
8
+ VERSION = '0.1.3'
9
9
  end
10
10
  end
@@ -26,6 +26,8 @@ en:
26
26
  Waiting for instance to become "ready"...
27
27
  waiting_for_ssh: |-
28
28
  Waiting for SSH to become available...
29
+ associate_floating_ip_to_server: |-
30
+ Associating floating-ip to server...
29
31
  warn_networks: |-
30
32
  Warning! The HP provider doesn't support any of the Vagrant
31
33
  high-level network configurations (`config.vm.network`). They
@@ -36,6 +38,8 @@ en:
36
38
  Finding flavor for server...
37
39
  finding_image: |-
38
40
  Finding image for server...
41
+ deleting_floating_ip: |-
42
+ "Attempting to delete floating-ip..."
39
43
 
40
44
  default:
41
45
  ssh_username_default: |-
@@ -1,41 +1,43 @@
1
- require "vagrant-hp/config"
1
+ require 'vagrant-hp/config'
2
+ require 'coveralls'
3
+ Coveralls.wear!
2
4
 
3
5
  describe VagrantPlugins::HP::Config do
4
6
  let(:instance) { described_class.new }
5
7
 
6
- describe "defaults" do
8
+ describe 'defaults' do
7
9
  subject do
8
10
  instance.tap do |o|
9
11
  o.finalize!
10
12
  end
11
13
  end
12
14
 
13
- its("access_key") { should be_nil }
14
- its("tenant_id") { should be_nil }
15
- its("availability_zone") { should == "az1" }
16
- its("image") { should be_nil }
17
- its("keypair_name") { should be_nil }
18
- its("secret_key") { should be_nil }
19
- its("ssh_private_key_path") { should be_nil }
20
- its("ssh_username") { should be_nil }
21
- its("flavor") { should == "standard.small" }
22
- its("tenant_id") { should be_nil }
23
- its("server_name") { should be_nil }
15
+ its('access_key') { should be_nil }
16
+ its('tenant_id') { should be_nil }
17
+ its('availability_zone') { should == 'az1' }
18
+ its('image') { should be_nil }
19
+ its('keypair_name') { should be_nil }
20
+ its('secret_key') { should be_nil }
21
+ its('ssh_private_key_path') { should be_nil }
22
+ its('ssh_username') { should be_nil }
23
+ its('flavor') { should == 'standard.small' }
24
+ its('tenant_id') { should be_nil }
25
+ its('server_name') { should be_nil }
24
26
  end
25
27
 
26
- describe "overriding defaults" do
28
+ describe 'overriding defaults' do
27
29
  # I typically don't meta-program in tests, but this is a very
28
30
  # simple boilerplate test, so I cut corners here. It just sets
29
31
  # each of these attributes to "foo" in isolation, and reads the value
30
32
  # and asserts the proper result comes back out.
31
33
  [:access_key, :tenant_id, :availability_zone, :image,
32
- :keypair_name,:secret_key,:ssh_private_key_path,:ssh_username,
33
- :flavor,:tenant_id,:server_name].each do |attribute|
34
+ :keypair_name, :secret_key, :ssh_private_key_path, :ssh_username,
35
+ :flavor, :tenant_id, :server_name].each do |attribute|
34
36
 
35
37
  it "should not default #{attribute} if overridden" do
36
- instance.send("#{attribute}=".to_sym, "foo")
38
+ instance.send("#{attribute}=".to_sym, 'foo')
37
39
  instance.finalize!
38
- instance.send(attribute).should == "foo"
40
+ instance.send(attribute).should == 'foo'
39
41
  end
40
42
  end
41
43
  end
data/test.rb ADDED
@@ -0,0 +1,49 @@
1
+ require 'rubygems'
2
+ require 'fog'
3
+
4
+ hp_access_key = "Y5SKH1MU6HZ2PEM9ZNZL"
5
+ hp_secret_key = "YA2BJr98R3hDK7IwpIkHXlDCDo9GG+GIuqhflPqQ"
6
+ hp_tenant_id = "87309806546461"
7
+ hp_avl_zone = "US West"
8
+
9
+
10
+ conn = Fog::Compute.new(
11
+ :provider => "HP",
12
+ :version => :v2,
13
+ :hp_access_key => hp_access_key,
14
+ :hp_secret_key => hp_secret_key,
15
+ #:hp_auth_uri => "<IDENTITY_ENDPOINT_URL>",
16
+ :hp_tenant_id => hp_tenant_id,
17
+ #:hp_avl_zone => "<your_AVAILABILITY_ZONE>",
18
+ #:hp_avl_zone => 'az-1.region-a.geo-1'
19
+ :hp_avl_zone => 'region-a.geo-1'
20
+ )
21
+
22
+ puts "+++++++++++++++++++++++"
23
+ #puts "conn: #{conn.inspect}"
24
+ puts "+++++++++++++++++++++++"
25
+ #puts "keypairs: #{conn.key_pairs.inspect}"
26
+ puts "+++++++++++++++++++++++"
27
+
28
+
29
+ puts "Floating_ips:"
30
+ #puts "#{conn.methods}"
31
+ #puts "#{conn.list_addresses.inspect}"
32
+ puts "#{conn.addresses.inspect}"
33
+ puts "+++++++++++++++++++++++"
34
+ #puts "allocate_address: #{conn.allocate_address.inspect}"
35
+ #puts "allocate_address: #{conn.allocate_address.inspect}"
36
+ puts "Allocating new address"
37
+ ip = conn.addresses.create
38
+ #ip = conn.allocate_address
39
+ puts "methods: #{ip.methods}"
40
+
41
+ server = conn.servers.get('1b6e1de8-a167-42ca-84e3-da612d733115')
42
+ puts "server: #{server.inspect}"
43
+ puts "+++++++++++++++++++++++"
44
+ puts "allocate_address"
45
+ puts "server.id: #{server.id}"
46
+ puts "ip.ip: #{ip.ip}"
47
+ conn.associate_address("#{server.id}", "#{ip.ip}")
48
+ #ip.server = server
49
+
@@ -0,0 +1,38 @@
1
+ require 'rubygems'
2
+ require 'fog'
3
+
4
+ hp_access_key = "Y5SKH1MU6HZ2PEM9ZNZL"
5
+ hp_secret_key = "YA2BJr98R3hDK7IwpIkHXlDCDo9GG+GIuqhflPqQ"
6
+ hp_tenant_id = "87309806546461"
7
+ hp_avl_zone = "US West"
8
+
9
+
10
+ conn = Fog::Compute.new(
11
+ :provider => "HP",
12
+ :version => :v2,
13
+ :hp_access_key => hp_access_key,
14
+ :hp_secret_key => hp_secret_key,
15
+ #:hp_auth_uri => "<IDENTITY_ENDPOINT_URL>",
16
+ :hp_tenant_id => hp_tenant_id,
17
+ #:hp_avl_zone => "<your_AVAILABILITY_ZONE>",
18
+ #:hp_avl_zone => 'az-1.region-a.geo-1'
19
+ :hp_avl_zone => 'region-a.geo-1'
20
+ )
21
+
22
+ puts "+++++++++++++++++++++++"
23
+ #puts "conn: #{conn.inspect}"
24
+ puts "+++++++++++++++++++++++"
25
+ #puts "keypairs: #{conn.key_pairs.inspect}"
26
+ puts "+++++++++++++++++++++++"
27
+
28
+
29
+ puts "Floating_ips: #{conn.addresses.inspect}"
30
+ conn.addresses.each do |addr|
31
+ addr.destroy
32
+ puts "#{addr.inspect} destroyed"
33
+ end
34
+ #puts "#{conn.methods}"
35
+ #puts "#{conn.list_addresses.inspect}"
36
+
37
+
38
+
@@ -0,0 +1,27 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIIEpAIBAAKCAQEAvOyP27saQNFB+JQmGZm94dvMzyHs+2UrBvE9C/vz8SH+P17Z
3
+ X+b7ZfEvr5zw2ESuXXutESz+6LddDFddi9ZNjgrP1c7KcpHisM8mZ4CWA6gjJlEw
4
+ vjbix6/Z7XGst1msP1jKIlBIQAbw1JiRmS14hUyQI+RFa9em5nymu7NeBkXK46Mv
5
+ 1u0+nc+pMPGcM6/DftnXM9y36RzMwrRtxaiEifiAH51aKy241sXVtS0UutABgfXL
6
+ g6jYuFt6aNz2txgMtDSBuTZsrP+yg+ayFt+zjjWQiFREqqlkqkUWuw2mbIu2terP
7
+ GAF0ntGx856d2WiYVgTcHb/3QnVUe2H/RSvsowIDAQABAoIBAH76QHZe+vY1rzFz
8
+ 4WezfXwgTzeoha8yAAlaer1jSkH3pvrQtSlQBgguYu6VfQrenpMWXOv+YhXnqBJz
9
+ Zdxm3RlrCuWZZ1g51TMhB57pPeqXR4ipaSlvmly8RKziikNxcePhuXn2m5jtEVDS
10
+ eomJlkeBfh+hfUdOWk7v2OCvXbK4biNrZpp5K061NjoE1DmWyY3KbcJRLz+BO7qF
11
+ Nx466LeA8C/SVO9Zw42k+PrDpxRm4JuV/BUkteY1Py2VjvRr100mpcbjNWWXuR0H
12
+ BpxS2jrLIW1jNUcDUe22jKfctkEpJcL/5rrjcfg+QlxMmvVSHgh968LtRXLncd/z
13
+ /X3iTYECgYEA5A9V1EkKOsyYzKAlQPzRclQqhI14kJN3AMraf9Ut3ZNBP3E8Y06s
14
+ 8u0ceiM7WFZVJGpCjKcOtxXNI/aIdoWD5bDFeQLfqrvrjovkpMGjYlDQOkL7YPrg
15
+ hYOCNLljeSl5rEbRhbfBt+Cq5yxKiu1ZfSAIcjhem4f0Bid1Ftu32+UCgYEA1BHO
16
+ Rpj0LzKSPdZKRjU5PhPJSvNkhDoetfRP7G530ngCEIIZ5Iha6NVu6/v4ytofnKL1
17
+ yAysSwt58RJWYXL7Bgr6ULNPnnYp0IeVO7cZOOPoqPtkxszu8gWzYuYtrMNOcZTp
18
+ npWopcyoFC3PDopYFWJFwfO9vb0Iq70/lyDUbecCgYEA1mlwiUAORQ+8DI332GyY
19
+ wcNNogebtVlfBbixyoNzNqFOM8ZTPw5l3ZJ9NntPPRMVw0G/xZr+Y7U0g74xuDR4
20
+ uAcE8Wt5O3ynzwHI+fkvkaxmyI/W5OuZEQ196fHuCqiqwwRl0jDcCPNJ2kOy5YCW
21
+ pOPr7O8AS3t7Ohn4pH/4EN0CgYEAws2MZ0tPWx+gOI9k8PMpHv379Q55MgFVfpzq
22
+ 4etjxAEbHGD2OfiLUb/lQX7XPjd5vF/xWA9UISdsn2bR1HhTYGyrHYBpTc2LgZNa
23
+ IV2DHMA2UyuCmh9cCxPzgZChOka6AxngNB2TqqHBb6/YuKmaWiJIo+4rSGSh12hj
24
+ RocQu9cCgYB+NdjOHiHOqFAscRPixhJEX3G+zhz7F85vX6Aa4daZyTPo4auHXHZJ
25
+ COtUzr38af9RGIx0K0q15MV6i+Yr3SWdHfYkjbAWLVITKBzPSXiZcuWJImo0aJTz
26
+ hGkUZgv2YU6eL73dkBDopWGzd5tKBexLkK9pzTopiJjm0vBE/2Dlmw==
27
+ -----END RSA PRIVATE KEY-----
@@ -14,13 +14,14 @@ Gem::Specification.new do |s|
14
14
  s.required_rubygems_version = ">= 1.3.6"
15
15
  s.rubyforge_project = "vagrant-hp"
16
16
 
17
- s.add_runtime_dependency "fog", "~> 1.15.0"
17
+ s.add_runtime_dependency "fog", "~> 1.19.0"
18
18
 
19
19
  s.add_development_dependency "rake"
20
- s.add_development_dependency "rspec-core", "~> 2.12.2"
21
- s.add_development_dependency "rspec-expectations", "~> 2.12.1"
22
- s.add_development_dependency "rspec-mocks", "~> 2.12.1"
20
+ s.add_development_dependency "rspec-core", "~> 2.14.7"
21
+ s.add_development_dependency "rspec-expectations", "~> 2.14.4"
22
+ s.add_development_dependency "rspec-mocks", "~> 2.14.4"
23
23
  s.add_development_dependency "rubygems-bundler"
24
+ s.add_development_dependency "rubocop"
24
25
 
25
26
  # The following block of code determines the files that should be included
26
27
  # in the gem. It does this by reading all the files in the directory where
metadata CHANGED
@@ -1,110 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-hp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.1.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Mohit Sethi
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2014-01-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: fog
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: 1.15.0
19
+ version: 1.19.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: 1.15.0
26
+ version: 1.19.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec-core
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
53
- version: 2.12.2
47
+ version: 2.14.7
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
61
- version: 2.12.2
54
+ version: 2.14.7
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec-expectations
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
69
- version: 2.12.1
61
+ version: 2.14.4
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
77
- version: 2.12.1
68
+ version: 2.14.4
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec-mocks
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
85
- version: 2.12.1
75
+ version: 2.14.4
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
93
- version: 2.12.1
82
+ version: 2.14.4
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rubygems-bundler
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
108
109
  - !ruby/object:Gem::Version
109
110
  version: '0'
110
111
  description: Enables Vagrant to manage machines on HP Cloud.
@@ -113,65 +114,70 @@ executables: []
113
114
  extensions: []
114
115
  extra_rdoc_files: []
115
116
  files:
116
- - CHANGELOG.md
117
+ - locales/en.yml
118
+ - test_key.pem
119
+ - LICENSE
120
+ - spec/vagrant-hp/config_spec.rb
117
121
  - dummy_hp.box
118
- - example_box/metadata.json
119
- - example_box/README.md
120
- - example_box/Vagrantfile
122
+ - README.md
121
123
  - Gemfile
122
- - lib/vagrant-hp/action/connect_hp.rb
123
- - lib/vagrant-hp/action/create_server.rb
124
- - lib/vagrant-hp/action/delete_server.rb
124
+ - vagrant-hp.gemspec
125
+ - test_address.rb
126
+ - Rakefile
127
+ - CHANGELOG.md_
128
+ - lib/vagrant-hp.rb
129
+ - lib/vagrant-hp/provider.rb
130
+ - lib/vagrant-hp/util/timer.rb
131
+ - lib/vagrant-hp/plugin.rb
132
+ - lib/vagrant-hp/action.rb
133
+ - lib/vagrant-hp/errors.rb
134
+ - lib/vagrant-hp/version.rb
135
+ - lib/vagrant-hp/config.rb
125
136
  - lib/vagrant-hp/action/halt_server.rb
126
- - lib/vagrant-hp/action/is_created.rb
127
- - lib/vagrant-hp/action/is_running.rb
128
- - lib/vagrant-hp/action/message_already_created.rb
129
- - lib/vagrant-hp/action/message_not_created.rb
130
- - lib/vagrant-hp/action/read_ssh_info.rb
131
137
  - lib/vagrant-hp/action/read_state.rb
138
+ - lib/vagrant-hp/action/delete_server.rb
132
139
  - lib/vagrant-hp/action/sync_folders.rb
140
+ - lib/vagrant-hp/action/read_ssh_info.rb
141
+ - lib/vagrant-hp/action/message_already_created.rb
142
+ - lib/vagrant-hp/action/create_server.rb
133
143
  - lib/vagrant-hp/action/timed_provision.rb
144
+ - lib/vagrant-hp/action/message_not_created.rb
145
+ - lib/vagrant-hp/action/test.rb
134
146
  - lib/vagrant-hp/action/warn_networks.rb
135
- - lib/vagrant-hp/action.rb
136
- - lib/vagrant-hp/config.rb
137
- - lib/vagrant-hp/errors.rb
138
- - lib/vagrant-hp/plugin.rb
139
- - lib/vagrant-hp/provider.rb
140
- - lib/vagrant-hp/util/timer.rb
141
- - lib/vagrant-hp/version.rb
142
- - lib/vagrant-hp.rb
143
- - LICENSE
144
- - locales/en.yml
145
- - Rakefile
146
- - README.md
147
- - spec/vagrant-hp/config_spec.rb
148
- - vagrant-hp.gemspec
147
+ - lib/vagrant-hp/action/is_created.rb
148
+ - lib/vagrant-hp/action/connect_hp.rb
149
+ - lib/vagrant-hp/action/is_running.rb
150
+ - test.rb
151
+ - example_box/README.md
152
+ - example_box/metadata.json
153
+ - example_box/Vagrantfile
154
+ - CHANGELOG.md
155
+ - Vagrantfile
156
+ - .rubocop.yml
157
+ - .coveragerc
158
+ - .travis.yml
149
159
  - .gitignore
150
160
  homepage: http://github.com/mohitsethi/vagrant-hp
151
161
  licenses: []
162
+ metadata: {}
152
163
  post_install_message:
153
164
  rdoc_options: []
154
165
  require_paths:
155
166
  - lib
156
167
  required_ruby_version: !ruby/object:Gem::Requirement
157
- none: false
158
168
  requirements:
159
- - - ! '>='
169
+ - - '>='
160
170
  - !ruby/object:Gem::Version
161
171
  version: '0'
162
- segments:
163
- - 0
164
- hash: 860518013
165
172
  required_rubygems_version: !ruby/object:Gem::Requirement
166
- none: false
167
173
  requirements:
168
- - - ! '>='
174
+ - - '>='
169
175
  - !ruby/object:Gem::Version
170
176
  version: 1.3.6
171
177
  requirements: []
172
178
  rubyforge_project: vagrant-hp
173
- rubygems_version: 1.8.24
179
+ rubygems_version: 2.1.11
174
180
  signing_key:
175
- specification_version: 3
181
+ specification_version: 4
176
182
  summary: Enables Vagrant to manage machines on HP Cloud.
177
183
  test_files: []