beaker-abs 1.1.0 → 1.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db7f2bf4afb44988411438cf873a24f69d45065ff3a2113fc06ce3d3f2642377
4
- data.tar.gz: 64d423895137167696e7b7ef56c7c8c7d41d34cae9fcd0a8160b53c0060d42ca
3
+ metadata.gz: f8435e87c6355cd2a8ae1f61b6bbdf65fddfc9f6c58e112e4aee1f9524e37a1f
4
+ data.tar.gz: de010987d68324aae08368c0a048016e924bfd3daa9121dfa6aea6ca4fcff0f1
5
5
  SHA512:
6
- metadata.gz: 805801c7d805112f89288e09fa3a5589db49f4a828bc307b5e4b918e581e851bbfb8e3068006eb79f62ad289983a9210f5d3136be5f0d6e8e5f510845a88b2b4
7
- data.tar.gz: ab8665e8543fcd9fca7847c0883deaa69e038f8b1043505da8b674111ef59d58d1a100f27e2b27bafc6560371fb826a67109e9f4b2a6a65b5a1654782bd324b4
6
+ metadata.gz: 793b31558dd6c9a2a1056c3804ceeff526edf0f1c0e1921aa99b3164aea6fb4de339732f95c4816859f77545f1c2cd82b58595139f6345bf3449d2e467366a71
7
+ data.tar.gz: 23112d30fa46e9c2ccd34d131b3e00b391d96d26f9e90381467e916e8fa4ad89c3175aa16e937f5c1905f992462b86770287952e5e2e5d7de3d5214db798795b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.0](https://github.com/puppetlabs/beaker-abs/tree/1.2.0) (2026-08-03)
4
+
5
+ [Full Changelog](https://github.com/puppetlabs/beaker-abs/compare/1.1.0...1.2.0)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - \(PA-8450\) Fix beaker destroy when ABS\_RESOURCE\_HOSTS is unset [\#49](https://github.com/puppetlabs/beaker-abs/pull/49) ([joshcooper](https://github.com/joshcooper))
10
+
11
+ **Merged pull requests:**
12
+
13
+ - \(PA-9008\) Allow beaker 7 [\#51](https://github.com/puppetlabs/beaker-abs/pull/51) ([shubhamshinde360](https://github.com/shubhamshinde360))
14
+
3
15
  ## [1.1.0](https://github.com/puppetlabs/beaker-abs/tree/1.1.0) (2024-05-28)
4
16
 
5
17
  [Full Changelog](https://github.com/puppetlabs/beaker-abs/compare/1.0.0...1.1.0)
@@ -105,7 +117,7 @@
105
117
 
106
118
  **Merged pull requests:**
107
119
 
108
- - \(QENG-6081\) Remove beaker dependency [\#10](https://github.com/puppetlabs/beaker-abs/pull/10) ([smcelmurry](https://github.com/smcelmurry))
120
+ - \(QENG-6081\) Remove beaker dependency [\#10](https://github.com/puppetlabs/beaker-abs/pull/10) ([junebug-spencer](https://github.com/junebug-spencer))
109
121
 
110
122
  ## [0.3.0](https://github.com/puppetlabs/beaker-abs/tree/0.3.0) (2017-08-14)
111
123
 
data/Gemfile CHANGED
@@ -14,5 +14,5 @@ def location_for(place, fake_version = nil)
14
14
  end
15
15
 
16
16
  group :testing do
17
- gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 5.0', '< 7')
17
+ gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 5.0', '< 8')
18
18
  end
data/beaker-abs.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "beaker", ">= 5.0", "< 7"
21
+ spec.add_dependency "beaker", ">= 5.0", "< 8"
22
22
  spec.add_dependency "vmfloaty", ">= 1.0", "< 2"
23
23
  # accept more keys, for smallstep integration
24
24
  spec.add_dependency 'ed25519', ">= 1.2", "< 2.0"
@@ -39,9 +39,7 @@ module Beaker
39
39
  @abs_service_name = ENV['ABS_SERVICE_NAME'] || @options[:abs_service_name] || "abs"
40
40
  @abs_service_priority = ENV['ABS_SERVICE_PRIORITY'] || @options[:abs_service_priority] || "1"
41
41
 
42
- raise ArgumentError.new("ABS_RESOURCE_HOSTS must be specified when using the Beaker::Abs hypervisor when provisioning") if resource_hosts.nil? && !options[:provision]
43
- resource_hosts = provision_vms(hosts).to_json if resource_hosts.nil?
44
- @resource_hosts = JSON.parse(resource_hosts)
42
+ @resource_hosts = resource_hosts ? JSON.parse(resource_hosts) : []
45
43
  end
46
44
 
47
45
  def connection_preference(host)
@@ -65,6 +63,11 @@ module Beaker
65
63
  end
66
64
 
67
65
  def provision
66
+ if @resource_hosts.empty? && !@hosts.empty?
67
+ raise ArgumentError, "ABS_RESOURCE_HOSTS must be specified when using the Beaker::Abs hypervisor" unless @options[:provision]
68
+ @resource_hosts = JSON.parse(provision_vms(@hosts).to_json)
69
+ end
70
+
68
71
  type2hosts = {}
69
72
 
70
73
  # Each resource_host is of the form:
@@ -104,7 +107,22 @@ module Beaker
104
107
  end
105
108
 
106
109
  def cleanup
107
- # nothing to do
110
+ return if ENV['ABS_RESOURCE_HOSTS'] || @options[:abs_resource_hosts]
111
+
112
+ hostnames = @hosts.map(&:hostname)
113
+ return if hostnames.empty?
114
+
115
+ verbose = false
116
+ config = Conf.read_config
117
+ cli = Clifloaty.new(@abs_service_name, @abs_service_priority)
118
+ abs_service = Service.new(cli, config)
119
+ abs_service.delete(verbose, hostnames).each_pair do |hostname, result|
120
+ if result['ok']
121
+ @logger.info("Destroyed #{hostname}")
122
+ else
123
+ @logger.warn("Failed to destroy #{hostname}")
124
+ end
125
+ end
108
126
  end
109
127
 
110
128
  def provision_vms(hosts)
@@ -1,5 +1,5 @@
1
1
  module BeakerAbs
2
2
  module Version
3
- STRING = '1.1.0'
3
+ STRING = '1.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-abs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Cooper
8
8
  - Rick Bradley
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2024-05-28 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: beaker
@@ -20,7 +19,7 @@ dependencies:
20
19
  version: '5.0'
21
20
  - - "<"
22
21
  - !ruby/object:Gem::Version
23
- version: '7'
22
+ version: '8'
24
23
  type: :runtime
25
24
  prerelease: false
26
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +29,7 @@ dependencies:
30
29
  version: '5.0'
31
30
  - - "<"
32
31
  - !ruby/object:Gem::Version
33
- version: '7'
32
+ version: '8'
34
33
  - !ruby/object:Gem::Dependency
35
34
  name: vmfloaty
36
35
  requirement: !ruby/object:Gem::Requirement
@@ -167,7 +166,6 @@ homepage: https://github.com/puppetlabs/beaker-abs
167
166
  licenses:
168
167
  - Apache-2.0
169
168
  metadata: {}
170
- post_install_message:
171
169
  rdoc_options: []
172
170
  require_paths:
173
171
  - lib
@@ -182,8 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
180
  - !ruby/object:Gem::Version
183
181
  version: '0'
184
182
  requirements: []
185
- rubygems_version: 3.3.27
186
- signing_key:
183
+ rubygems_version: 4.0.16
187
184
  specification_version: 4
188
185
  summary: Let's test Puppet, using hosts provisioned by Always Be Scheduling service.
189
186
  test_files: []