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.
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
- Installation
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
- gem 'kitchen-rackspace'
20
+ ```ruby
21
+ gem 'kitchen-rackspace'
22
+ ```
27
23
 
28
24
  And then execute:
29
25
 
30
- $ bundle
26
+ ```shell
27
+ bundle
28
+ ```
31
29
 
32
30
  Or install it yourself as:
33
31
 
34
- $ gem install kitchen-rackspace
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
- 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']
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
- image_id: [SERVER IMAGE ID]
53
- flavor_id: [SERVER FLAVOR ID]
54
- server_name: [A FRIENDLY SERVER NAME]
55
- public_key_path: [PATH TO YOUR PUBLIC SSH KEY]
56
- rackspace_region: [A VALID RACKSPACE DC/REGION]
57
- wait_for: [NUM OF SECONDS TO WAIT BEFORE TIMING OUT, DEFAULT 600]
58
- no_ssh_tcp_check: [DEFAULTS TO false, SKIPS TCP CHECK WHEN true]
59
- no_ssh_tcp_check_sleep: [NUM OF SECONDS TO SLEEP IF no_ssh_tcp_check IS SET]
60
- networks: [LIST OF RACKSPACE NETWORK UUIDS, DEFAULT PUBLICNET AND SERVICE NET]
61
- rackconnect_wait: ['true' IF USING RACKCONNECT TO WAIT FOR IT TO COMPLETE]
62
- servicelevel_wait: ['true' IF USING MANAGED SERVICE LEVEL AUTOMATION TO WAIT FOR IT TO COMPLETE]
63
- no_passwd_lock: ['true' IF FOG LIBRARY SHOULD NOT LOCK ROOT ACCOUNT]
64
- servicenet: ['true' IF USING THE SERVICENET IP ADDRESS TO CONNECT]
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
- # Encoding: UTF-8
2
-
3
- require 'bundler/setup'
4
- require 'rubocop/rake_task'
5
- require 'rspec/core/rake_task'
6
-
7
- RuboCop::RakeTask.new
8
-
9
- RSpec::Core::RakeTask.new(:spec)
10
-
11
- task default: [:rubocop, :spec]
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": "ade87903-9d82-4584-9cc1-204870011de0",
3
- "arch-2015": "ade87903-9d82-4584-9cc1-204870011de0",
4
- "arch-2015.7": "ade87903-9d82-4584-9cc1-204870011de0",
5
- "centos": "c22f593a-4064-4a12-8229-e70a4b0ccc09",
6
- "centos-5": "f338b541-bf6a-4ceb-a795-730e05a601f6",
7
- "centos-5.11": "f338b541-bf6a-4ceb-a795-730e05a601f6",
8
- "centos-6": "c28d8b17-19b1-4d2f-8a8f-b548ebe7ba95",
9
- "centos-6.7": "c28d8b17-19b1-4d2f-8a8f-b548ebe7ba95",
10
- "centos-7": "c22f593a-4064-4a12-8229-e70a4b0ccc09",
11
- "centos-7.0": "c22f593a-4064-4a12-8229-e70a4b0ccc09",
12
- "coreos": "40155f16-21d4-4ac1-ad65-c409d94b8c7c",
13
- "coreos-0": "40155f16-21d4-4ac1-ad65-c409d94b8c7c",
14
- "coreos-alpha": "c61f3a04-a00e-44c1-9d96-0667cfc7e155",
15
- "coreos-beta": "6045cb80-52ed-4114-bf9a-7f15a36c65dc",
16
- "coreos-stable": "40155f16-21d4-4ac1-ad65-c409d94b8c7c",
17
- "debian": "cf16c435-7bed-4dc3-b76e-57b09987866d",
18
- "debian-7": "60c8b11a-a445-496c-84d9-5ec96eac233f",
19
- "debian-7.0": "60c8b11a-a445-496c-84d9-5ec96eac233f",
20
- "debian-8": "cf16c435-7bed-4dc3-b76e-57b09987866d",
21
- "debian-8.0": "cf16c435-7bed-4dc3-b76e-57b09987866d",
22
- "debian-testing": "f8ea0bd3-64de-4613-9df5-9606d211ab6d",
23
- "debian-unstable": "f9696ee0-cee2-40bc-a3c7-24709db972ed",
24
- "fedora": "779851de-9b1e-4500-839a-dc1d6e25cb25",
25
- "fedora-22": "779851de-9b1e-4500-839a-dc1d6e25cb25",
26
- "fedora-22.0": "779851de-9b1e-4500-839a-dc1d6e25cb25",
27
- "fedora-23": "9f05acc9-6436-4e95-aad9-eaeff74be602",
28
- "fedora-23.0": "9f05acc9-6436-4e95-aad9-eaeff74be602",
29
- "freebsd": "7a1cf8de-7721-4d56-900b-1e65def2ada5",
30
- "freebsd-10": "7a1cf8de-7721-4d56-900b-1e65def2ada5",
31
- "freebsd-10.1": "7a1cf8de-7721-4d56-900b-1e65def2ada5",
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": "ca46a780-072a-44bb-b2e9-6dd9af313848",
36
- "opensuse-13": "ca46a780-072a-44bb-b2e9-6dd9af313848",
37
- "opensuse-13.2": "ca46a780-072a-44bb-b2e9-6dd9af313848",
38
- "redhat": "61d460ae-3e29-4257-a300-007075456634",
39
- "redhat-5": "8cd602eb-2a80-4fb3-8def-7b81d4bbc51d",
40
- "redhat-5.11": "8cd602eb-2a80-4fb3-8def-7b81d4bbc51d",
41
- "redhat-6": "41616b04-1738-4990-9034-d8fa7fdd906b",
42
- "redhat-6.7": "41616b04-1738-4990-9034-d8fa7fdd906b",
43
- "redhat-7": "61d460ae-3e29-4257-a300-007075456634",
44
- "redhat-7.0": "61d460ae-3e29-4257-a300-007075456634",
45
- "scientific": "93c04a39-f919-40ec-8f60-8a034e610f2c",
46
- "scientific-6": "222eae90-9ed7-472f-b3fb-c43f8a021cbb",
47
- "scientific-6.7": "222eae90-9ed7-472f-b3fb-c43f8a021cbb",
48
- "scientific-7": "93c04a39-f919-40ec-8f60-8a034e610f2c",
49
- "scientific-7.2": "93c04a39-f919-40ec-8f60-8a034e610f2c",
50
- "ubuntu": "7a412a16-c9da-4c30-be5e-225633bde788",
51
- "ubuntu-12": "cd276808-5fac-4903-9940-68857095c844",
52
- "ubuntu-12.04": "cd276808-5fac-4903-9940-68857095c844",
53
- "ubuntu-14": "8e7bdecd-380a-43d7-af9a-ec4f4df51dbd",
54
- "ubuntu-14.04": "8e7bdecd-380a-43d7-af9a-ec4f4df51dbd",
55
- "ubuntu-15": "7a412a16-c9da-4c30-be5e-225633bde788",
56
- "ubuntu-15.10": "7a412a16-c9da-4c30-be5e-225633bde788",
57
- "ubuntu-16": "5cf469a9-c4f3-4455-ab1b-7f07ed2b9dec",
58
- "ubuntu-16.04": "5cf469a9-c4f3-4455-ab1b-7f07ed2b9dec",
59
- "vyatta": "65b7c683-19ef-4a24-a934-335c9eeef2d0",
60
- "vyatta-6": "65b7c683-19ef-4a24-a934-335c9eeef2d0",
61
- "vyatta-6.7": "65b7c683-19ef-4a24-a934-335c9eeef2d0",
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
  }
@@ -1,96 +1,86 @@
1
- #!/usr/bin/env ruby
2
- # Encoding: UTF-8
1
+ require "fog/rackspace"
2
+ require "json" unless defined?(JSON)
3
3
 
4
- require 'fog'
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
- 'Arch 2015.7 (PVHVM)' => %w(arch arch-2015 arch-2015.7),
13
- 'CentOS 7 (PVHVM)' => %w(centos centos-7),
14
- 'CentOS 6 (PVHVM)' => %w(centos-6),
15
- 'CentOS 5 (PV)' => %w(centos-5),
16
- 'CoreOS (Stable)' => %w(coreos coreos-stable),
17
- 'CoreOS (Beta)' => %w(coreos-beta),
18
- 'CoreOS (Alpha)' => %w(coreos-alpha),
19
- 'Debian 8 (Jessie) (PVHVM)' => %w(debian debian-8),
20
- 'Debian 7 (Wheezy) (PVHVM)' => %w(debian-7),
21
- 'Debian Testing (Stretch) (PVHVM)' => %w(debian-testing),
22
- 'Debian Unstable (Sid) (PVHVM)' => %w(debian-unstable),
23
- 'Fedora 22 (PVHVM)' => %w(fedora fedora-22),
24
- 'Fedora 23 (PVHVM)' => %w(fedora-23),
25
- 'FreeBSD 10 (PVHVM)' => %w(freebsd freebsd-10),
26
- 'Gentoo 15.3 (PVHVM)' => %w(gentoo gentoo-15 gentoo-15.3),
27
- 'OpenSUSE 13.2 (PVHVM)' => %w(opensuse opensuse-13 opensuse-13.2),
28
- 'Red Hat Enterprise Linux 7 (PVHVM)' => %w(redhat redhat-7),
29
- 'Red Hat Enterprise Linux 6 (PVHVM)' => %w(redhat-6),
30
- 'Red Hat Enterprise Linux 5 (PV)' => %w(redhat-5),
31
- 'Scientific Linux 7 (PVHVM)' => %w(scientific scientific-7),
32
- 'Scientific Linux 6 (PVHVM)' => %w(scientific-6),
33
- 'Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)' => %w(ubuntu-16 ubuntu-16.04),
34
- 'Ubuntu 15.10 (Wily Werewolf) (PVHVM)' => %w(ubuntu ubuntu-15 ubuntu-15.10),
35
- 'Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)' => %w(ubuntu-14 ubuntu-14.04),
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
- 'com.microsoft.server' => 'windows',
46
- 'org.fedoraproject' => 'fedora',
47
- 'org.archlinux' => 'arch',
48
- 'org.scientificlinux' => 'scientific'
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: 'Rackspace',
52
- rackspace_username: ENV['RACKSPACE_USERNAME'],
53
- rackspace_api_key: ENV['RACKSPACE_API_KEY'],
54
- rackspace_region: 'ORD')
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.keys.include?(i.name) }.each do |img|
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['org.openstack__1__os_distro'] &&
67
- image_metadata['org.openstack__1__os_version']
60
+ if image_metadata["org.openstack__1__os_distro"] &&
61
+ image_metadata["org.openstack__1__os_version"]
68
62
 
69
- distro_id = image_metadata['org.openstack__1__os_distro']
70
- version = image_metadata['org.openstack__1__os_version']
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('.').last
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 != '0' && version =~ /^\s*\d+\s*$/
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)
@@ -1,34 +1,25 @@
1
- # Encoding: UTF-8
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 'kitchen/driver/rackspace_version'
3
+ require "kitchen/driver/rackspace_version"
6
4
 
7
5
  Gem::Specification.new do |spec|
8
- spec.name = 'kitchen-rackspace'
6
+ spec.name = "kitchen-rackspace"
9
7
  spec.version = Kitchen::Driver::RACKSPACE_VERSION
10
- spec.authors = ['Jonathan Hartman']
11
- spec.email = %w(j@p4nt5.com)
12
- spec.description = 'A Test Kitchen Rackspace driver'
13
- spec.summary = 'A Test Kitchen Rackspace driver built on Fog'
14
- spec.homepage = 'https://github.com/test-kitchen/kitchen-rackspace'
15
- spec.license = 'Apache'
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(lib)
21
-
22
- spec.required_ruby_version = '>= 1.9.3'
18
+ spec.require_paths = %w{lib}
23
19
 
24
- spec.add_dependency 'test-kitchen', '~> 1.1'
25
- spec.add_dependency 'fog', '~> 1.18'
20
+ spec.required_ruby_version = ">= 3.1"
26
21
 
27
- spec.add_development_dependency 'bundler', '~> 1.0'
28
- spec.add_development_dependency 'rake', '~> 10.0'
29
- spec.add_development_dependency 'rubocop', '~> 0.29'
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