simp-beaker-helpers 1.0.3 → 1.0.4
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 +8 -8
- data/README.md +6 -5
- data/lib/simp/beaker_helpers.rb +12 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Mjc4ZGE2NjViYjJiOTgxOGQzNmMyMWFhM2E4MmY3NzFiM2FmZjUxYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGZkNzRhYzdmZDNlMmE5NjJiNzYwYWJjYWU0NmE1MmE0MWJjYjlhZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmZhZmM1MjNiYjY1NTc5N2FjN2EyZjBmNDY5Zjg2MDEyNjA3YjM1NTUzYTY5
|
10
|
+
MDdiNmY5NDdhN2FhODVhODRlNzk2MTRiMzcyYjg4MTk2ZGNmY2Q3NDg1Zjky
|
11
|
+
NmI4OTAyYjFkOTk2NmMxNjIzMTFiZDk0MmMwYzcyYmRmMTI4MTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTE4ZTdhMjg4NjJhNTQwYzQ1ZGNiYTAzNGRiZWRiMmIwNzBlOTNiYzFlMzM0
|
14
|
+
ZTQ2YTBhM2RiM2IzOWU2Zjg5YzVmZDg4YTFmMmQyNjI5YTk4YjM4OWI2OTc0
|
15
|
+
YzU5OTIwOGZjNTg0ZGQ1NjllZTlkMWFhZDc0ZTdiZTU1YWRmOGI=
|
data/README.md
CHANGED
@@ -77,14 +77,15 @@ Copy a single SUT's PKI certs (with cacerts) onto an SUT. This simulates the re
|
|
77
77
|
|
78
78
|
The directory structure copied to the SUT is:
|
79
79
|
```
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
80
|
+
SUT_BASE_DIR/
|
81
|
+
pki/
|
82
|
+
cacerts/cacerts.pem
|
83
|
+
public/fdqn.pub
|
84
|
+
private/fdqn.pem
|
84
85
|
|
85
86
|
```
|
86
87
|
|
87
|
-
`copy_pki_to(sut, local_pki_dir,
|
88
|
+
`copy_pki_to(sut, local_pki_dir, sut_base_dir = '/etc/pki/simp-testing')`
|
88
89
|
|
89
90
|
|
90
91
|
#### `copy_keydist_to`
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Simp; end
|
2
2
|
|
3
3
|
module Simp::BeakerHelpers
|
4
|
-
VERSION = '1.0.
|
4
|
+
VERSION = '1.0.4'
|
5
5
|
|
6
6
|
# Locates .fixture.yml in or above this directory.
|
7
7
|
def fixtures_yml_path
|
@@ -175,19 +175,21 @@ DEFAULT_KERNEL_TITLE=`/sbin/grubby --info=\\\${DEFAULT_KERNEL_INFO} | grep -m1 t
|
|
175
175
|
#
|
176
176
|
# The directory structure is:
|
177
177
|
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
178
|
+
# SUT_BASE_DIR/
|
179
|
+
# pki/
|
180
|
+
# cacerts/cacerts.pem
|
181
|
+
# public/fdqn.pub
|
182
|
+
# private/fdqn.pem
|
183
|
+
def copy_pki_to(sut, local_pki_dir, sut_base_dir = '/etc/pki/simp-testing')
|
184
|
+
fqdn = fact_on(sut, 'fqdn')
|
185
|
+
sut_pki_dir = File.join( sut_base_dir, 'pki' )
|
186
|
+
local_host_pki_tree = File.join(local_pki_dir,'pki','keydist',fqdn)
|
186
187
|
local_cacert = File.join(local_pki_dir,'pki','demoCA','cacert.pem')
|
188
|
+
|
187
189
|
on sut, %Q(mkdir -p "#{sut_pki_dir}/public" "#{sut_pki_dir}/private" "#{sut_pki_dir}/cacerts")
|
188
190
|
scp_to(sut, "#{local_host_pki_tree}/#{fqdn}.pem", "#{sut_pki_dir}/private/")
|
189
191
|
scp_to(sut, "#{local_host_pki_tree}/#{fqdn}.pub", "#{sut_pki_dir}/public/")
|
190
|
-
|
192
|
+
|
191
193
|
# NOTE: to match pki::copy, 'cacert.pem' is renamed to 'cacerts.pem'
|
192
194
|
scp_to(sut, local_cacert, "#{sut_pki_dir}/cacerts/cacerts.pem")
|
193
195
|
end
|