kitchen-opennebula 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +3 -0
- data/LICENSE +15 -0
- data/README.md +157 -0
- data/Rakefile +21 -0
- data/kitchen-opennebula.gemspec +31 -0
- data/lib/kitchen/driver/opennebula.rb +189 -0
- data/lib/kitchen/driver/opennebula_version.rb +26 -0
- metadata +166 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4aa2f07facce9d15588344222e675ad9ecb5fe9f
|
4
|
+
data.tar.gz: 5ec519944e3a5ff31aeb1964287a1b3d6ae67734
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ad95628a34b8415e54cc0b0f7e8a12757c4392631fca308e758322b055e64a00bf5f3c389d6d94ff2820a83dfd7041e627a2938c7b0911556ccedd4b6f222116
|
7
|
+
data.tar.gz: 9b91c666fce2d0da921c83c75c98f40e61d448657c6fad7d2d2937e6c78401f8d225639d2c1e9afe3b85744d2f71bd0e1130bbb2e563665c1a8caf0abb444a39
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.project
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Author:: Andrew J. Brown (<anbrown@blackberry.com>)
|
2
|
+
|
3
|
+
Copyright (C) 2014, BlackBerry, Ltd.
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
# <a name="title"></a> Kitchen::Opennebula
|
2
|
+
|
3
|
+
A Test Kitchen Driver for Opennebula.
|
4
|
+
|
5
|
+
## <a name="requirements"></a> Requirements
|
6
|
+
|
7
|
+
This driver depends on BlackBerry patches to Fog (https://github.com/fog/fog)
|
8
|
+
for better support for OpenNebula. These patches can be found at
|
9
|
+
https://github.com/blackberry/fog until they are merged to upstream.
|
10
|
+
|
11
|
+
## <a name="installation"></a> Installation and Setup
|
12
|
+
|
13
|
+
Please read the [Driver usage][driver_usage] page for more details.
|
14
|
+
|
15
|
+
## Virtual Machine Requirements
|
16
|
+
|
17
|
+
This driver requires an OpenNebula OS image that conforms to a number of requirements
|
18
|
+
|
19
|
+
* The VM puts the ssh key defined in the SSH\_PUBLIC\_KEY context variable into `$HOME/.ssh/authorized_keys`
|
20
|
+
* The VM ensures the user has passwordless sudo access
|
21
|
+
|
22
|
+
## <a name="config"></a> Configuration
|
23
|
+
|
24
|
+
### <a name="opennebula_endpoint"></a> opennebula\_endpoint
|
25
|
+
|
26
|
+
URL where the OpenNebula daemon is listening.
|
27
|
+
The default value is taken from the ONE\_XMLRPC environment variable, or `http://127.0.0.1:2633/RPC2` if unset.
|
28
|
+
|
29
|
+
### <a name="oneauth_file"></a> oneauth\_file
|
30
|
+
|
31
|
+
Path to the file containing OpenNebula authentication information. It should contain a single line stating "username:password".
|
32
|
+
The default value is taken from the ONE\_AUTH environment variable, or `$HOME/.one/one_auth` if unset.
|
33
|
+
|
34
|
+
### <a name="template_name"></a> template\_name
|
35
|
+
|
36
|
+
Name of the VM definition file (OpenNebula template) registered with OpenNebula. Can be used with `template_uname` or `template_uid` to further restrict which template to use if multiple users have the same template name. Only one of `template_name` or `template_id` must be specified in the .kitchen.yml file.
|
37
|
+
The default value is unset, or `nil`.
|
38
|
+
|
39
|
+
### <a name="template_id"></a> template\_id
|
40
|
+
|
41
|
+
ID of the VM definition file (OpenNebula template) registered with OpenNebula. Only one of `template_name` or `template_id` must be specified in the .kitchen.yml file.
|
42
|
+
The default value is unset, or `nil`.
|
43
|
+
|
44
|
+
### <a name="template_uname"></a> template\_uname
|
45
|
+
|
46
|
+
Username who owns the VM definition file (OpenNebula template). Can be used with `template_name` to address naming conflicts where multiple users have the same template name.
|
47
|
+
The default value is unset, or `nil`.
|
48
|
+
|
49
|
+
### <a name="template_uid"></a> template\_uid
|
50
|
+
|
51
|
+
UID of the user who owns the VM definition file (OpenNebula template). Can be used with `template_name` to address naming conflicts where multiple users have the same template name.
|
52
|
+
The default value is unset, or `nil`.
|
53
|
+
|
54
|
+
### <a name="vm_hostname"></a> vm\_hostname
|
55
|
+
|
56
|
+
Hostname to set for the newly created VM.
|
57
|
+
The default value is `driver.instance.name`
|
58
|
+
|
59
|
+
### <a name="public_key_path"></a> public\_key\_path
|
60
|
+
|
61
|
+
Path to SSH public key to pass to the VM, to use to authenticate with `username` when logging in or converging a node.
|
62
|
+
The default value is `~/.ssh/id_rsa.pub`, `~/.ssh/id_dsa.pub`, `~/.ssh/identity.pub`, or `~/.ssh/id_ecdsa.pub`, whichever is present on the filesystem.
|
63
|
+
|
64
|
+
### <a name="username"></a> username
|
65
|
+
|
66
|
+
This is the username used for SSH authentication to the new VM.
|
67
|
+
The default value is `local`.
|
68
|
+
|
69
|
+
### <a name="memory"></a> memory
|
70
|
+
|
71
|
+
The amount of memory to provision for the new VM. This parameter will override the memory settings provided in the VM template.
|
72
|
+
The default value is 512MB.
|
73
|
+
|
74
|
+
### <a name="user_variables"></a> user\_variables
|
75
|
+
|
76
|
+
A hash of variables to pass into the "user template" section of the VM, to customize the virtual machine.
|
77
|
+
The default value is `{}`.
|
78
|
+
|
79
|
+
### <a name="context_variables"></a> context\_variables
|
80
|
+
|
81
|
+
A hash of variables to pass into the "CONTEXT" section of the VM, to further customize the virtual machine. These variables override any existing context variables that are provided as part of the specified VM template.
|
82
|
+
The default value is `{}`.
|
83
|
+
|
84
|
+
### <a name="config-require-chef-omnibus"></a> require\_chef\_omnibus
|
85
|
+
|
86
|
+
Determines whether or not a Chef [Omnibus package][chef_omnibus_dl] will be
|
87
|
+
installed. There are several different behaviors available:
|
88
|
+
|
89
|
+
* `true` - the latest release will be installed. Subsequent converges
|
90
|
+
will skip re-installing if chef is present.
|
91
|
+
* `latest` - the latest release will be installed. Subsequent converges
|
92
|
+
will always re-install even if chef is present.
|
93
|
+
* `<VERSION_STRING>` (ex: `10.24.0`) - the desired version string will
|
94
|
+
be passed the the install.sh script. Subsequent converges will skip if
|
95
|
+
the installed version and the desired version match.
|
96
|
+
* `false` or `nil` - no chef is installed.
|
97
|
+
|
98
|
+
The default value is unset, or `nil`.
|
99
|
+
|
100
|
+
### <a name="wait_for"></a> wait_for
|
101
|
+
|
102
|
+
This variable is used to override timeout for Fog's common `wait_for` method which states that it "takes a block and waits for either the block to return true for the object or for a timeout (defaults to 10 minutes)".
|
103
|
+
|
104
|
+
### <a name="no_ssh_tcp_check"></a> no\_ssh\_tcp\_check
|
105
|
+
|
106
|
+
To avoid test-kitchen's ssh tcp check in the create phase you can set `no_ssh_tcp_check` to `true` and do single sleep instead. Sleep period is configured by `no_ssh_tcp_check_sleep`. The default for `no_ssh_tcp_check` is set to `false`.
|
107
|
+
|
108
|
+
### <a name="no_ssh_tcp_check_sleep"></a> no\_ssh\_tcp\_check\_sleep
|
109
|
+
|
110
|
+
This variable configures a single sleep used when `no_ssh_tcp_check` is set to `true`. The default for `no_ssh_tcp_check` is 2 minutes.
|
111
|
+
|
112
|
+
### <a name="no_passwordless_sudo_check"></a> no\_passwordless\_sudo\_check
|
113
|
+
|
114
|
+
To avoid test-kitchen's passwordless sudo check in the create phase you can set `no_passwordless_sudo_check` to `true` and do single sleep instead. Sleep period is configured by `no_passwordless_sudo_sleep`. The default for `no_passwordless_sudo_check` is set to `false`.
|
115
|
+
|
116
|
+
### <a name="no_passwordless_sudo_sleep"></a> no\_passwordless\_sudo\_sleep
|
117
|
+
|
118
|
+
This variable configures a single sleep used when `no_passwordless_sudo_check` is set to `true`. The default for `no_passwordless_sudo_sleep` is 2 minutes.
|
119
|
+
|
120
|
+
### <a name="passwordless_sudo_timeout"></a> passwordless\_sudo\_timeout
|
121
|
+
|
122
|
+
This variable configures the max timeout will wait in the create phase for passwordless sudo to be setup. The variable is used when `no_passwordless_sudo_check` is set to `false`. The default for `passwordless_sudo_timeout` is 5 minutes.
|
123
|
+
|
124
|
+
### <a name="passwordless_sudo_retry_interval"></a> passwordless\_sudo\_retry\_interval
|
125
|
+
|
126
|
+
This variable configures retry interval in the create phase to periodically check that passwordless sudo is setup. It does this until max timeout (set by `passwordless_sudo_timeout`) is reached. The variable is used when `no_passwordless_sudo_check` is set to `false`. The default for `passwordless_sudo_retry_interval` is 10 seconds.
|
127
|
+
|
128
|
+
## <a name="development"></a> Development
|
129
|
+
|
130
|
+
* Source hosted at [GitHub][repo]
|
131
|
+
* Report issues/questions/feature requests on [GitHub Issues][issues]
|
132
|
+
|
133
|
+
Pull requests are very welcome! Make sure your patches are well tested.
|
134
|
+
Ideally create a topic branch for every separate change you make. For
|
135
|
+
example:
|
136
|
+
|
137
|
+
1. Fork the repo
|
138
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
139
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
140
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
141
|
+
5. Create new Pull Request
|
142
|
+
|
143
|
+
## <a name="authors"></a> Authors
|
144
|
+
|
145
|
+
Created and maintained by [Andrew Brown][author] (<anbrown@blackberry.com>)
|
146
|
+
|
147
|
+
## <a name="license"></a> License
|
148
|
+
|
149
|
+
Apache 2.0 (see [LICENSE][license])
|
150
|
+
|
151
|
+
|
152
|
+
[author]: https://github.com/andrewjamesbrown
|
153
|
+
[issues]: https://github.com/test-kitchen/kitchen-opennebula/issues
|
154
|
+
[license]: https://github.com/test-kitchen/kitchen-opennebula/blob/master/LICENSE
|
155
|
+
[repo]: https://github.com/test-kitchen/kitchen-opennebula
|
156
|
+
[driver_usage]: http://docs.kitchen-ci.org/drivers/usage
|
157
|
+
[chef_omnibus_dl]: http://www.getchef.com/chef/install/
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require 'cane/rake_task'
|
3
|
+
require 'tailor/rake_task'
|
4
|
+
|
5
|
+
desc "Run cane to check quality metrics"
|
6
|
+
Cane::RakeTask.new do |cane|
|
7
|
+
cane.canefile = './.cane'
|
8
|
+
end
|
9
|
+
|
10
|
+
Tailor::RakeTask.new
|
11
|
+
|
12
|
+
desc "Display LOC stats"
|
13
|
+
task :stats do
|
14
|
+
puts "\n## Production Code Stats"
|
15
|
+
sh "countloc -r lib"
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Run all quality tasks"
|
19
|
+
task :quality => [:cane, :tailor, :stats]
|
20
|
+
|
21
|
+
task :default => [:quality]
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'kitchen/driver/opennebula_version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'kitchen-opennebula'
|
8
|
+
spec.version = Kitchen::Driver::OPENNEBULA_VERSION
|
9
|
+
spec.authors = ['Andrew J. Brown']
|
10
|
+
spec.email = ['anbrown@blackberry.com']
|
11
|
+
spec.description = %q{A Test Kitchen Driver for Opennebula}
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = ''
|
14
|
+
spec.license = 'Apache 2.0'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = []
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'test-kitchen', '~> 1.2'
|
22
|
+
spec.add_dependency 'fog', '~> 1.26'
|
23
|
+
spec.add_dependency 'opennebula'
|
24
|
+
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
26
|
+
spec.add_development_dependency 'rake'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'cane'
|
29
|
+
spec.add_development_dependency 'tailor'
|
30
|
+
spec.add_development_dependency 'countloc'
|
31
|
+
end
|
@@ -0,0 +1,189 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Author:: Andrew J. Brown (<anbrown@blackberry.com>)
|
4
|
+
#
|
5
|
+
# Copyright (C) 2014, BlackBerry, Ltd.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
|
19
|
+
require 'fog'
|
20
|
+
require 'kitchen'
|
21
|
+
|
22
|
+
module Kitchen
|
23
|
+
|
24
|
+
module Driver
|
25
|
+
|
26
|
+
# Opennebula driver for Kitchen.
|
27
|
+
#
|
28
|
+
# @author Andrew J. Brown <anbrown@blackberry.com>
|
29
|
+
class Opennebula < Kitchen::Driver::SSHBase
|
30
|
+
default_config :opennebula_endpoint,
|
31
|
+
ENV.fetch('ONE_XMLRPC', 'http://127.0.0.1:2633/RPC2')
|
32
|
+
|
33
|
+
default_config :oneauth_file,
|
34
|
+
ENV.fetch('ONE_AUTH', "#{ENV['HOME']}/.one/one_auth")
|
35
|
+
|
36
|
+
default_config :vm_hostname do |driver|
|
37
|
+
"#{driver.instance.name}"
|
38
|
+
end
|
39
|
+
|
40
|
+
default_config :public_key_path do
|
41
|
+
[
|
42
|
+
File.expand_path('~/.ssh/id_rsa.pub'),
|
43
|
+
File.expand_path('~/.ssh/id_dsa.pub'),
|
44
|
+
File.expand_path('~/.ssh/identity.pub'),
|
45
|
+
File.expand_path('~/.ssh/id_ecdsa.pub')
|
46
|
+
].find { |path| File.exist?(path) }
|
47
|
+
end
|
48
|
+
|
49
|
+
default_config :username, 'local'
|
50
|
+
default_config :memory, 512
|
51
|
+
default_config :user_variables, { }
|
52
|
+
default_config :context_variables, { }
|
53
|
+
|
54
|
+
default_config :wait_for, 600
|
55
|
+
default_config :no_ssh_tcp_check, false
|
56
|
+
default_config :no_ssh_tcp_check_sleep, 120
|
57
|
+
default_config :no_passwordless_sudo_check, false
|
58
|
+
default_config :no_passwordless_sudo_sleep, 120
|
59
|
+
|
60
|
+
def initialize(config)
|
61
|
+
super
|
62
|
+
Fog.timeout = config[:wait_for].to_i
|
63
|
+
end
|
64
|
+
|
65
|
+
def create(state)
|
66
|
+
conn = opennebula_connect
|
67
|
+
|
68
|
+
# Check if VM is already created.
|
69
|
+
if state[:vm_id] && !conn.list_vms({:id => state[:vm_id]}).empty?
|
70
|
+
info("OpenNebula instance #{instance.to_str} already created.")
|
71
|
+
return
|
72
|
+
end
|
73
|
+
|
74
|
+
if config[:template_id].nil? and config[:template_name].nil?
|
75
|
+
raise "template_name or template_id not specified in .kitchen.yml"
|
76
|
+
elsif !config[:template_id].nil? and !config[:template_name].nil?
|
77
|
+
raise "Only one of template_name or template_id should be specified in .kitchen.yml"
|
78
|
+
end
|
79
|
+
|
80
|
+
newvm = conn.servers.new
|
81
|
+
if config[:template_id]
|
82
|
+
newvm.flavor = conn.flavors.get config[:template_id]
|
83
|
+
elsif config[:template_name]
|
84
|
+
filter = {
|
85
|
+
:name => config[:template_name],
|
86
|
+
:uname => config[:template_uname],
|
87
|
+
:uid => config[:template_uid]
|
88
|
+
}
|
89
|
+
newvm.flavor = conn.flavors.get_by_filter filter
|
90
|
+
if !newvm.flavor.nil? and newvm.flavor.length > 1
|
91
|
+
raise 'More than one template found. Please restrict using template_uname'
|
92
|
+
end
|
93
|
+
newvm.flavor = newvm.flavor.first unless newvm.flavor.nil?
|
94
|
+
end
|
95
|
+
if newvm.flavor.nil?
|
96
|
+
raise "Could not find template to create VM."
|
97
|
+
end
|
98
|
+
newvm.name = config[:vm_hostname]
|
99
|
+
|
100
|
+
newvm.flavor.user_variables = {} if newvm.flavor.user_variables.nil? || newvm.flavor.user_variables.empty?
|
101
|
+
config[:user_variables].each do |key, val|
|
102
|
+
newvm.flavor.user_variables[key.to_s] = val
|
103
|
+
end
|
104
|
+
|
105
|
+
newvm.flavor.context = {} if newvm.flavor.context.nil? || newvm.flavor.context.empty?
|
106
|
+
newvm.flavor.context['SSH_PUBLIC_KEY'] = File.read(config[:public_key_path]).chomp
|
107
|
+
newvm.flavor.context['TEST_KITCHEN'] = "YES"
|
108
|
+
# Support for overriding context variables in the VM template
|
109
|
+
config[:context_variables].each do |key, val|
|
110
|
+
newvm.flavor.context[key.to_s] = val
|
111
|
+
end
|
112
|
+
newvm.flavor.memory = config[:memory]
|
113
|
+
|
114
|
+
# TODO: Set up NIC and disk if not specified in template
|
115
|
+
vm = newvm.save
|
116
|
+
vm.wait_for { ready? }
|
117
|
+
state[:vm_id] = vm.id
|
118
|
+
state[:hostname] = vm.ip
|
119
|
+
state[:username] = config[:username]
|
120
|
+
tcp_check(state)
|
121
|
+
passwordless_sudo_check(state)
|
122
|
+
info("OpenNebula instance #{instance.to_str} created.")
|
123
|
+
end
|
124
|
+
|
125
|
+
def tcp_check(state)
|
126
|
+
wait_for_sshd(state[:hostname]) unless config[:no_ssh_tcp_check]
|
127
|
+
sleep(config[:no_ssh_tcp_check_sleep]) if config[:no_ssh_tcp_check]
|
128
|
+
debug("SSH ready on #{instance.to_str}")
|
129
|
+
end
|
130
|
+
|
131
|
+
def passwordless_sudo_check(state)
|
132
|
+
wait_for_passwordless_sudo(state) unless config[:no_passwordless_sudo_check]
|
133
|
+
sleep(config[:no_passwordless_sudo_sleep]) if config[:no_passwordless_sudo_check]
|
134
|
+
debug("Passwordless sudo ready on #{instance.to_str}")
|
135
|
+
end
|
136
|
+
|
137
|
+
def wait_for_passwordless_sudo(state)
|
138
|
+
Kitchen::SSH.new(*build_ssh_args(state)) do |conn|
|
139
|
+
retries = config[:passwordless_sudo_timeout] || 300
|
140
|
+
retry_interval = config[:passwordless_sudo_retry_interval] || 10
|
141
|
+
begin
|
142
|
+
logger.info("Waiting #{retries.to_s} seconds for #{config[:username]} user to be granted passwordless sudo on #{state[:hostname]}...")
|
143
|
+
retries -= retry_interval
|
144
|
+
run_remote("sudo -n true", conn)
|
145
|
+
rescue ActionFailed => e
|
146
|
+
if (e.message.eql? "SSH exited (1) for command: [sudo -n true]") && (retries >= 0)
|
147
|
+
sleep retry_interval
|
148
|
+
retry
|
149
|
+
end
|
150
|
+
raise ActionFailed, e.message
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
def converge(state)
|
156
|
+
super
|
157
|
+
end
|
158
|
+
|
159
|
+
def verify(state)
|
160
|
+
super
|
161
|
+
end
|
162
|
+
|
163
|
+
def destroy(state)
|
164
|
+
conn = opennebula_connect
|
165
|
+
conn.servers.destroy(state[:vm_id])
|
166
|
+
end
|
167
|
+
|
168
|
+
protected
|
169
|
+
|
170
|
+
def opennebula_connect()
|
171
|
+
opennebula_creds = nil
|
172
|
+
if File.exists?(config[:oneauth_file])
|
173
|
+
opennebula_creds = File.read(config[:oneauth_file])
|
174
|
+
else
|
175
|
+
raise ActionFailed, "Could not find one_auth file #{config[:oneauth_file]}"
|
176
|
+
end
|
177
|
+
opennebula_username = opennebula_creds.split(':')[0]
|
178
|
+
opennebula_password = opennebula_creds.split(':')[1]
|
179
|
+
conn = Fog::Compute.new( {
|
180
|
+
:provider => 'OpenNebula',
|
181
|
+
:opennebula_username => opennebula_username,
|
182
|
+
:opennebula_password => opennebula_password,
|
183
|
+
:opennebula_endpoint => config[:opennebula_endpoint]
|
184
|
+
} )
|
185
|
+
conn
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Author:: Andrew Brown (<anbrown@blackberry.com>)
|
4
|
+
#
|
5
|
+
# Copyright (C) 2014, BlackBerry, Ltd.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
|
19
|
+
module Kitchen
|
20
|
+
|
21
|
+
module Driver
|
22
|
+
|
23
|
+
# Version string for Opennebula Kitchen driver
|
24
|
+
OPENNEBULA_VERSION = "0.1.1"
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: kitchen-opennebula
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew J. Brown
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: test-kitchen
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: fog
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.26'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.26'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: opennebula
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: cane
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: tailor
|
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
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: countloc
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: A Test Kitchen Driver for Opennebula
|
126
|
+
email:
|
127
|
+
- anbrown@blackberry.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- .gitignore
|
133
|
+
- CHANGELOG.md
|
134
|
+
- Gemfile
|
135
|
+
- LICENSE
|
136
|
+
- README.md
|
137
|
+
- Rakefile
|
138
|
+
- kitchen-opennebula.gemspec
|
139
|
+
- lib/kitchen/driver/opennebula.rb
|
140
|
+
- lib/kitchen/driver/opennebula_version.rb
|
141
|
+
homepage: ''
|
142
|
+
licenses:
|
143
|
+
- Apache 2.0
|
144
|
+
metadata: {}
|
145
|
+
post_install_message:
|
146
|
+
rdoc_options: []
|
147
|
+
require_paths:
|
148
|
+
- lib
|
149
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - '>='
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - '>='
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
requirements: []
|
160
|
+
rubyforge_project:
|
161
|
+
rubygems_version: 2.4.1
|
162
|
+
signing_key:
|
163
|
+
specification_version: 4
|
164
|
+
summary: A Test Kitchen Driver for Opennebula
|
165
|
+
test_files: []
|
166
|
+
has_rdoc:
|