kitchen-rackspace 0.21.0 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/CODEOWNERS +1 -0
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/linters.yml +9 -0
- data/.github/workflows/publish.yaml +32 -0
- data/.markdownlint.yaml +6 -0
- data/.release-please-manifest.json +3 -0
- data/.rubocop.yml +10 -8
- data/CHANGELOG.md +86 -74
- data/Gemfile +11 -4
- data/LICENSE +202 -0
- data/README.md +48 -40
- data/Rakefile +15 -11
- data/data/images.json +58 -66
- data/helpers/dump_image_list.rb +45 -55
- data/kitchen-rackspace.gemspec +14 -23
- data/lib/kitchen/driver/rackspace.rb +42 -57
- data/lib/kitchen/driver/rackspace_version.rb +1 -22
- data/release-please-config.json +12 -0
- data/renovate.json +8 -0
- data/spec/kitchen/driver/rackspace_spec.rb +231 -229
- data/spec/spec_helper.rb +10 -16
- metadata +39 -106
- data/.travis.yml +0 -14
- data/LICENSE.txt +0 -15
data/README.md
CHANGED
@@ -1,82 +1,90 @@
|
|
1
|
+
# Kitchen::Rackspace
|
2
|
+
|
1
3
|
[![Gem Version](https://img.shields.io/gem/v/kitchen-rackspace.svg)][gem]
|
2
|
-
[![Build Status](https://img.shields.io/travis/test-kitchen/kitchen-rackspace.svg)][travis]
|
3
|
-
[![Code Climate](https://img.shields.io/codeclimate/github/test-kitchen/kitchen-rackspace.svg)][codeclimate]
|
4
|
-
[![Coverage Status](https://img.shields.io/coveralls/test-kitchen/kitchen-rackspace.svg)][coveralls]
|
5
|
-
[![Dependency Status](https://img.shields.io/gemnasium/test-kitchen/kitchen-rackspace.svg)][gemnasium]
|
6
4
|
|
7
5
|
[gem]: https://rubygems.org/gems/kitchen-rackspace
|
8
|
-
[travis]: https://travis-ci.org/test-kitchen/kitchen-rackspace
|
9
|
-
[codeclimate]: https://codeclimate.com/github/test-kitchen/kitchen-rackspace
|
10
|
-
[coveralls]: https://coveralls.io/r/test-kitchen/kitchen-rackspace
|
11
|
-
[gemnasium]: https://gemnasium.com/test-kitchen/kitchen-rackspace
|
12
|
-
|
13
|
-
Kitchen::Rackspace
|
14
|
-
==================
|
15
6
|
|
16
7
|
A Rackspace Cloud Servers driver for Test Kitchen!
|
17
8
|
|
18
9
|
Shamelessly copied from [Fletcher Nichol](https://github.com/fnichol)'s
|
19
10
|
awesome work on an [EC2 driver](https://github.com/opscode/kitchen-ec2).
|
20
11
|
|
21
|
-
|
22
|
-
|
12
|
+
## Status
|
13
|
+
|
14
|
+
This software project is no longer under active development as it has no active maintainers. The software may continue to work for some or all use cases, but issues filed in GitHub will most likely not be triaged. If a new maintainer is interested in working on this project please come chat with us in #test-kitchen on Chef Community Slack.
|
15
|
+
|
16
|
+
## Installation
|
23
17
|
|
24
18
|
Add this line to your application's Gemfile:
|
25
19
|
|
26
|
-
|
20
|
+
```ruby
|
21
|
+
gem 'kitchen-rackspace'
|
22
|
+
```
|
27
23
|
|
28
24
|
And then execute:
|
29
25
|
|
30
|
-
|
26
|
+
```shell
|
27
|
+
bundle
|
28
|
+
```
|
31
29
|
|
32
30
|
Or install it yourself as:
|
33
31
|
|
34
|
-
|
32
|
+
```shell
|
33
|
+
gem install kitchen-rackspace
|
34
|
+
```
|
35
35
|
|
36
|
-
Usage
|
37
|
-
-----
|
36
|
+
## Usage
|
38
37
|
|
39
38
|
Provide, at a minimum, the required driver options in your `.kitchen.yml` file:
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
40
|
+
```yaml
|
41
|
+
driver:
|
42
|
+
name: rackspace
|
43
|
+
rackspace_username: [YOUR RACKSPACE CLOUD USERNAME]
|
44
|
+
rackspace_api_key: [YOUR RACKSPACE CLOUD API KEY]
|
45
|
+
require_chef_omnibus: [e.g. 'true' or a version number if you need Chef]
|
46
|
+
platforms:
|
47
|
+
- name: [A PLATFORM NAME, e.g. 'centos-6']
|
48
|
+
```
|
48
49
|
|
49
50
|
By default, the driver will spawn a 1GB Performance server on the base image
|
50
51
|
for your specified platform. Additional, optional overrides can be provided:
|
51
52
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
53
|
+
```yaml
|
54
|
+
image_id: [SERVER IMAGE ID]
|
55
|
+
flavor_id: [SERVER FLAVOR ID]
|
56
|
+
server_name: [A FRIENDLY SERVER NAME]
|
57
|
+
public_key_path: [PATH TO YOUR PUBLIC SSH KEY]
|
58
|
+
rackspace_region: [A VALID RACKSPACE DC/REGION]
|
59
|
+
wait_for: [NUM OF SECONDS TO WAIT BEFORE TIMING OUT, DEFAULT 600]
|
60
|
+
no_ssh_tcp_check: [DEFAULTS TO false, SKIPS TCP CHECK WHEN true]
|
61
|
+
no_ssh_tcp_check_sleep: [NUM OF SECONDS TO SLEEP IF no_ssh_tcp_check IS SET]
|
62
|
+
networks: [LIST OF RACKSPACE NETWORK UUIDS, DEFAULT PUBLICNET AND SERVICE NET]
|
63
|
+
rackconnect_wait: ['true' IF USING RACKCONNECT TO WAIT FOR IT TO COMPLETE]
|
64
|
+
servicelevel_wait: ['true' IF USING MANAGED SERVICE LEVEL AUTOMATION TO WAIT FOR IT TO COMPLETE]
|
65
|
+
no_passwd_lock: ['true' IF FOG LIBRARY SHOULD NOT LOCK ROOT ACCOUNT]
|
66
|
+
servicenet: ['true' IF USING THE SERVICENET IP ADDRESS TO CONNECT]
|
67
|
+
config_drive: [DEFAULTS TO true, ENABLES READ-ONLY METADATA DRIVE]
|
68
|
+
user_data: [EXTRA CONFIGURATION DATA FOR THE SERVER]
|
69
|
+
```
|
65
70
|
|
66
71
|
You also have the option of providing some configs via environment variables:
|
67
72
|
|
73
|
+
```shell
|
68
74
|
export RACKSPACE_USERNAME="user" # (or OS_USERNAME)
|
69
75
|
export RACKSPACE_API_KEY="api_key" # (or OS_PASSWORD)
|
76
|
+
export RACKSPACE_REGION="dfw" # (or OS_REGION_NAME)
|
77
|
+
```
|
70
78
|
|
71
79
|
Some configs are also derived based on your .ssh directory, specifically the
|
72
80
|
`public_key_path` setting is derived by searching for:
|
81
|
+
|
73
82
|
- `~/.ssh/id_rsa.pub`
|
74
83
|
- `~/.ssh/id_dsa.pub`
|
75
84
|
- `~/.ssh/identity.pub`
|
76
85
|
- `~/.ssh/id_ecdsa.pub`
|
77
86
|
|
78
|
-
Contributing
|
79
|
-
------------
|
87
|
+
## Contributing
|
80
88
|
|
81
89
|
1. Fork it
|
82
90
|
2. `bundle install`
|
data/Rakefile
CHANGED
@@ -1,11 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
require
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
# Create the spec task.
|
4
|
+
require "rspec/core/rake_task"
|
5
|
+
RSpec::Core::RakeTask.new(:test, :tag) do |t, args|
|
6
|
+
t.rspec_opts = [].tap do |a|
|
7
|
+
a << "--color"
|
8
|
+
a << "--format #{ENV["CI"] ? "documentation" : "progress"}"
|
9
|
+
a << "--backtrace" if ENV["VERBOSE"] || ENV["DEBUG"]
|
10
|
+
a << "--seed #{ENV["SEED"]}" if ENV["SEED"]
|
11
|
+
a << "--tag #{args[:tag]}" if args[:tag]
|
12
|
+
a << "--default-path test"
|
13
|
+
a << "-I test/spec"
|
14
|
+
end.join(" ")
|
15
|
+
end
|
data/data/images.json
CHANGED
@@ -1,71 +1,63 @@
|
|
1
1
|
{
|
2
|
-
"arch": "
|
3
|
-
"arch-
|
4
|
-
"arch-
|
5
|
-
"
|
6
|
-
"centos
|
7
|
-
"centos-
|
8
|
-
"centos-6": "
|
9
|
-
"centos-
|
10
|
-
"centos-7": "
|
11
|
-
"
|
12
|
-
"coreos": "
|
13
|
-
"coreos-
|
14
|
-
"coreos-
|
15
|
-
"coreos-
|
16
|
-
"
|
17
|
-
"debian": "
|
18
|
-
"debian-7": "
|
19
|
-
"debian-
|
20
|
-
"debian-8": "
|
21
|
-
"debian-
|
22
|
-
"debian-
|
23
|
-
"
|
24
|
-
"fedora": "
|
25
|
-
"fedora-
|
26
|
-
"fedora-
|
27
|
-
"fedora-
|
28
|
-
"
|
29
|
-
"freebsd": "
|
30
|
-
"freebsd-10": "
|
31
|
-
"freebsd-
|
2
|
+
"arch": "b21af3ef-1a1e-46b5-98ef-bb0c81b25292",
|
3
|
+
"arch-0": "b21af3ef-1a1e-46b5-98ef-bb0c81b25292",
|
4
|
+
"arch-2016": "b21af3ef-1a1e-46b5-98ef-bb0c81b25292",
|
5
|
+
"arch-2016.8": "b21af3ef-1a1e-46b5-98ef-bb0c81b25292",
|
6
|
+
"centos": "1a79f262-33d2-428c-924b-9852a6c15ea8",
|
7
|
+
"centos-6": "7d791876-4c8f-44a2-8d4b-e84bfb0b1c8c",
|
8
|
+
"centos-6.8": "7d791876-4c8f-44a2-8d4b-e84bfb0b1c8c",
|
9
|
+
"centos-7": "1a79f262-33d2-428c-924b-9852a6c15ea8",
|
10
|
+
"centos-7.0": "1a79f262-33d2-428c-924b-9852a6c15ea8",
|
11
|
+
"coreos": "3eba4fbb-51da-4233-b699-8a4030561add",
|
12
|
+
"coreos-0": "b2da5e7e-8c0f-43c5-9e53-99560e4be8d2",
|
13
|
+
"coreos-alpha": "5d954038-4f3a-4d5a-8026-47ce408f23e4",
|
14
|
+
"coreos-beta": "b2da5e7e-8c0f-43c5-9e53-99560e4be8d2",
|
15
|
+
"coreos-stable": "3eba4fbb-51da-4233-b699-8a4030561add",
|
16
|
+
"debian": "451834c1-7e16-413c-8886-b508f5509198",
|
17
|
+
"debian-7": "e3247c46-261b-4015-b4b0-a28ee46218c1",
|
18
|
+
"debian-7.0": "e3247c46-261b-4015-b4b0-a28ee46218c1",
|
19
|
+
"debian-8": "fa296984-fb57-46ac-a726-f9a989b11b2c",
|
20
|
+
"debian-8.0": "fa296984-fb57-46ac-a726-f9a989b11b2c",
|
21
|
+
"debian-testing": "fa296984-fb57-46ac-a726-f9a989b11b2c",
|
22
|
+
"debian-unstable": "92a25d4d-e197-466a-9832-eaff04b27a62",
|
23
|
+
"fedora": "c4ba1b7d-67b8-460a-80e5-8e4e79ba60a9",
|
24
|
+
"fedora-24": "8a75d9b5-08e0-4ee1-80bf-91ab7b41758e",
|
25
|
+
"fedora-24.0": "8a75d9b5-08e0-4ee1-80bf-91ab7b41758e",
|
26
|
+
"fedora-25": "c4ba1b7d-67b8-460a-80e5-8e4e79ba60a9",
|
27
|
+
"fedora-25.0": "c4ba1b7d-67b8-460a-80e5-8e4e79ba60a9",
|
28
|
+
"freebsd": "c656f3c8-12ff-4b2e-9333-9a857c553292",
|
29
|
+
"freebsd-10": "1125dfad-61cf-40e4-890c-afdef535dad4",
|
30
|
+
"freebsd-10.3": "1125dfad-61cf-40e4-890c-afdef535dad4",
|
31
|
+
"freebsd-11": "c656f3c8-12ff-4b2e-9333-9a857c553292",
|
32
|
+
"freebsd-11.0": "c656f3c8-12ff-4b2e-9333-9a857c553292",
|
32
33
|
"gentoo": "c6693b8d-1e99-4112-b2a0-ceefd18a55ca",
|
33
34
|
"gentoo-15": "c6693b8d-1e99-4112-b2a0-ceefd18a55ca",
|
34
35
|
"gentoo-15.3": "c6693b8d-1e99-4112-b2a0-ceefd18a55ca",
|
35
|
-
"opensuse": "
|
36
|
-
"opensuse-
|
37
|
-
"opensuse-
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
50
|
-
"
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"vyatta-6.7R11": "65b7c683-19ef-4a24-a934-335c9eeef2d0",
|
63
|
-
"windows": "8bfada8f-9917-46dd-aa82-be533d5279fa",
|
64
|
-
"windows-2008": "91602a7d-4267-4efc-93f2-75281444de31",
|
65
|
-
"windows-2008.2": "91602a7d-4267-4efc-93f2-75281444de31",
|
66
|
-
"windows-2008R2": "91602a7d-4267-4efc-93f2-75281444de31",
|
67
|
-
"windows-2008R2SP1": "91602a7d-4267-4efc-93f2-75281444de31",
|
68
|
-
"windows-2012": "8bfada8f-9917-46dd-aa82-be533d5279fa",
|
69
|
-
"windows-2012.2": "8bfada8f-9917-46dd-aa82-be533d5279fa",
|
70
|
-
"windows-2012R2": "8bfada8f-9917-46dd-aa82-be533d5279fa"
|
36
|
+
"opensuse": "abe0d447-42ea-41ed-aadf-03828639570d",
|
37
|
+
"opensuse-42": "abe0d447-42ea-41ed-aadf-03828639570d",
|
38
|
+
"opensuse-42.1": "abe0d447-42ea-41ed-aadf-03828639570d",
|
39
|
+
"scientific": "6c0551dd-798d-4b56-b847-de58165dbffa",
|
40
|
+
"scientific-6": "51706a83-20cb-42dd-92a8-d704f5a7a1bf",
|
41
|
+
"scientific-6.7": "51706a83-20cb-42dd-92a8-d704f5a7a1bf",
|
42
|
+
"scientific-7": "6c0551dd-798d-4b56-b847-de58165dbffa",
|
43
|
+
"scientific-7.2": "6c0551dd-798d-4b56-b847-de58165dbffa",
|
44
|
+
"ubuntu": "9b3ae961-0ba0-4d5a-973f-2e79043f0ddd",
|
45
|
+
"ubuntu-12": "f2d30a56-bc2b-4906-8027-92f8a45bbb10",
|
46
|
+
"ubuntu-12.04": "f2d30a56-bc2b-4906-8027-92f8a45bbb10",
|
47
|
+
"ubuntu-14": "e6baca58-c5f4-48d3-901a-abdeb0cfe907",
|
48
|
+
"ubuntu-14.04": "e6baca58-c5f4-48d3-901a-abdeb0cfe907",
|
49
|
+
"ubuntu-16": "9b3ae961-0ba0-4d5a-973f-2e79043f0ddd",
|
50
|
+
"ubuntu-16.04": "9b3ae961-0ba0-4d5a-973f-2e79043f0ddd",
|
51
|
+
"vyatta": "20043d02-ff2f-4a6f-850a-6c6ae20edefd",
|
52
|
+
"vyatta-6": "20043d02-ff2f-4a6f-850a-6c6ae20edefd",
|
53
|
+
"vyatta-6.7": "20043d02-ff2f-4a6f-850a-6c6ae20edefd",
|
54
|
+
"vyatta-6.7R12": "20043d02-ff2f-4a6f-850a-6c6ae20edefd",
|
55
|
+
"windows": "306af7e1-669c-4a97-82be-71e35bf68f23",
|
56
|
+
"windows-2008": "304c13b4-6baa-4507-b411-3c9d5e992951",
|
57
|
+
"windows-2008.2": "304c13b4-6baa-4507-b411-3c9d5e992951",
|
58
|
+
"windows-2008R2": "304c13b4-6baa-4507-b411-3c9d5e992951",
|
59
|
+
"windows-2008R2SP1": "304c13b4-6baa-4507-b411-3c9d5e992951",
|
60
|
+
"windows-2012": "306af7e1-669c-4a97-82be-71e35bf68f23",
|
61
|
+
"windows-2012.2": "306af7e1-669c-4a97-82be-71e35bf68f23",
|
62
|
+
"windows-2012R2": "306af7e1-669c-4a97-82be-71e35bf68f23"
|
71
63
|
}
|
data/helpers/dump_image_list.rb
CHANGED
@@ -1,96 +1,86 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require "fog/rackspace"
|
2
|
+
require "json" unless defined?(JSON)
|
3
3
|
|
4
|
-
|
5
|
-
require 'json'
|
6
|
-
|
7
|
-
def whole?(x)
|
4
|
+
def whole?(x) # rubocop:disable Naming/UncommunicativeMethodParamName
|
8
5
|
(x - x.floor) < 1e-6
|
9
6
|
end
|
10
7
|
|
11
8
|
i_care_about = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
'Ubuntu 12.04 LTS (Precise Pangolin) (PVHVM)' => %w(ubuntu-12 ubuntu-12.04),
|
37
|
-
'Vyatta Network OS 6.7R11' => %w(vyatta vyatta-6 vyatta-6.7 vyatta-6.7R11),
|
38
|
-
'Windows Server 2012 R2' => %w(windows windows-2012 windows-2012R2),
|
39
|
-
'Windows Server 2008 R2 SP1' => %w(windows-2008
|
9
|
+
"Arch Linux (PVHVM)" => %w{arch arch-2016 arch-2016.8},
|
10
|
+
"CentOS 7 (PVHVM)" => %w{centos centos-7},
|
11
|
+
"CentOS 6 (PVHVM)" => %w{centos-6},
|
12
|
+
"CoreOS (Stable)" => %w{coreos coreos-stable},
|
13
|
+
"CoreOS (Beta)" => %w{coreos-beta},
|
14
|
+
"CoreOS (Alpha)" => %w{coreos-alpha},
|
15
|
+
"Debian 8 (Jessie) (PVHVM)" => %w{debian debian-8},
|
16
|
+
"Debian 7 (Wheezy) (PVHVM)" => %w{debian-7},
|
17
|
+
"Debian Testing (Stretch) (PVHVM)" => %w{debian-testing},
|
18
|
+
"Debian Unstable (Sid) (PVHVM)" => %w{debian-unstable},
|
19
|
+
"Fedora 25 (PVHVM)" => %w{fedora fedora-25},
|
20
|
+
"Fedora 24 (PVHVM)" => %w{fedora-24},
|
21
|
+
"FreeBSD 11 (PVHVM)" => %w{freebsd freebsd-11},
|
22
|
+
"FreeBSD 10 (PVHVM)" => %w{freebsd-10},
|
23
|
+
"Gentoo 15.3 (PVHVM)" => %w{gentoo gentoo-15 gentoo-15.3},
|
24
|
+
"OpenSUSE Leap 42 (PVHVM)" => %w{opensuse opensuse-42},
|
25
|
+
"Scientific Linux 7 (PVHVM)" => %w{scientific scientific-7},
|
26
|
+
"Scientific Linux 6 (PVHVM)" => %w{scientific-6},
|
27
|
+
"Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)" => %w{ubuntu ubuntu-16 ubuntu-16.04},
|
28
|
+
"Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)" => %w{ubuntu-14 ubuntu-14.04},
|
29
|
+
"Ubuntu 12.04 LTS (Precise Pangolin) (PVHVM)" => %w{ubuntu-12 ubuntu-12.04},
|
30
|
+
"Vyatta Network OS 6.7R12" => %w{vyatta vyatta-6 vyatta-6.7 vyatta-6.7R12},
|
31
|
+
"Windows Server 2012 R2" => %w{windows windows-2012 windows-2012R2},
|
32
|
+
"Windows Server 2008 R2 SP1" => %w{windows-2008
|
40
33
|
windows-2008R2
|
41
|
-
windows-2008R2SP1
|
34
|
+
windows-2008R2SP1},
|
42
35
|
}
|
43
36
|
|
44
37
|
names_to_clean = {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
38
|
+
"com.microsoft.server" => "windows",
|
39
|
+
"org.fedoraproject" => "fedora",
|
40
|
+
"org.archlinux" => "arch",
|
41
|
+
"org.scientificlinux" => "scientific",
|
49
42
|
}
|
50
43
|
|
51
|
-
compute = Fog::Compute.new(provider:
|
52
|
-
rackspace_username: ENV[
|
53
|
-
rackspace_api_key: ENV[
|
54
|
-
rackspace_region:
|
44
|
+
compute = Fog::Compute.new(provider: "Rackspace",
|
45
|
+
rackspace_username: ENV["RACKSPACE_USERNAME"],
|
46
|
+
rackspace_api_key: ENV["RACKSPACE_API_KEY"],
|
47
|
+
rackspace_region: "ORD")
|
55
48
|
|
56
49
|
aliases = i_care_about.values.flatten
|
57
50
|
res = aliases.each_with_object({}) do |a, hsh|
|
58
51
|
raise "Alias '#{a}' was listed twice" if hsh.include?(a)
|
52
|
+
|
59
53
|
hsh[a] = nil
|
60
54
|
hsh
|
61
55
|
end
|
62
56
|
|
63
|
-
compute.images.select { |i| i_care_about.
|
57
|
+
compute.images.select { |i| i_care_about.key?(i.name) }.each do |img|
|
64
58
|
image_metadata = img.metadata
|
65
59
|
|
66
|
-
if image_metadata[
|
67
|
-
|
60
|
+
if image_metadata["org.openstack__1__os_distro"] &&
|
61
|
+
image_metadata["org.openstack__1__os_version"]
|
68
62
|
|
69
|
-
distro_id = image_metadata[
|
70
|
-
version = image_metadata[
|
63
|
+
distro_id = image_metadata["org.openstack__1__os_distro"]
|
64
|
+
version = image_metadata["org.openstack__1__os_version"]
|
71
65
|
|
72
66
|
distro = if names_to_clean.include?(distro_id)
|
73
67
|
names_to_clean[distro_id]
|
74
68
|
else
|
75
|
-
distro_id.split(
|
69
|
+
distro_id.split(".").last
|
76
70
|
end
|
77
71
|
|
78
72
|
res["#{distro}-#{version}"] = img.id
|
79
73
|
|
80
74
|
# if it's a whole number non-zero version, also add
|
81
75
|
# a dot-zero (centos-7 vs centos-7.0)
|
82
|
-
if version !=
|
83
|
-
res["#{distro}-#{version}.0"] = img.id
|
84
|
-
end
|
76
|
+
res["#{distro}-#{version}.0"] = img.id if version != "0" && version =~ /^\s*\d+\s*$/
|
85
77
|
end
|
86
78
|
|
87
79
|
i_care_about[img.name].each { |a| res[a] = img.id }
|
88
80
|
i_care_about.delete(img.name)
|
89
81
|
end
|
90
82
|
|
91
|
-
unless i_care_about.empty?
|
92
|
-
raise "Couldn't find some images we expected: #{i_care_about.keys}"
|
93
|
-
end
|
83
|
+
raise "Couldn't find some images we expected: #{i_care_about.keys}" unless i_care_about.empty?
|
94
84
|
|
95
85
|
# sort these to make them pretty
|
96
86
|
puts JSON.pretty_generate(res.sort.to_h)
|
data/kitchen-rackspace.gemspec
CHANGED
@@ -1,34 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require
|
3
|
+
require "kitchen/driver/rackspace_version"
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name =
|
6
|
+
spec.name = "kitchen-rackspace"
|
9
7
|
spec.version = Kitchen::Driver::RACKSPACE_VERSION
|
10
|
-
spec.authors = [
|
11
|
-
spec.email = %w
|
12
|
-
spec.description =
|
13
|
-
spec.summary =
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
8
|
+
spec.authors = ["Jonathan Hartman"]
|
9
|
+
spec.email = %w{j@p4nt5.com}
|
10
|
+
spec.description = "A Test Kitchen Rackspace driver"
|
11
|
+
spec.summary = "A Test Kitchen Rackspace driver built on Fog"
|
12
|
+
spec.homepage = "https://github.com/test-kitchen/kitchen-rackspace"
|
13
|
+
spec.license = "Apache"
|
16
14
|
|
17
15
|
spec.files = `git ls-files -z`.split("\x0")
|
18
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
-
spec.require_paths = %w
|
21
|
-
|
22
|
-
spec.required_ruby_version = '>= 1.9.3'
|
18
|
+
spec.require_paths = %w{lib}
|
23
19
|
|
24
|
-
spec.
|
25
|
-
spec.add_dependency 'fog', '~> 1.18'
|
20
|
+
spec.required_ruby_version = ">= 3.1"
|
26
21
|
|
27
|
-
spec.
|
28
|
-
spec.
|
29
|
-
spec.
|
30
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
31
|
-
spec.add_development_dependency 'simplecov', '~> 0.9'
|
32
|
-
spec.add_development_dependency 'simplecov-console', '~> 0.2'
|
33
|
-
spec.add_development_dependency 'coveralls', '~> 0.8'
|
22
|
+
spec.add_dependency "fog-rackspace", "~> 0.1.6"
|
23
|
+
spec.add_dependency "fog-core", ">= 1.35" ,"< 2.1.1"
|
24
|
+
spec.add_dependency "test-kitchen", ">= 1.1", "< 4.0"
|
34
25
|
end
|