simp-beaker-helpers 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +6 -5
  3. data/lib/simp/beaker_helpers.rb +12 -10
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjU0OTNiZTBhZDljMGNmYjU5ZWY1NjZmODA1NzY1MzhiMmJlZDdhMQ==
4
+ Mjc4ZGE2NjViYjJiOTgxOGQzNmMyMWFhM2E4MmY3NzFiM2FmZjUxYg==
5
5
  data.tar.gz: !binary |-
6
- OGRhN2E4YWRkODg3NTgyOGIwMGI4YjExZjk2NjA0Y2RlOTlhYmI3Mg==
6
+ MGZkNzRhYzdmZDNlMmE5NjJiNzYwYWJjYWU0NmE1MmE0MWJjYjlhZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDE3YmY3NDliNDM5YmQ1MzlkMWEwMDA5ODhjNWJkYmE4MTk4NjdkNDMxMzE0
10
- YzFiNmY5ZDUwYWJiOTlkOWVhZWIyZDQwZTEyMmY5OWJkNzZlYzg1N2RjMWRj
11
- ODcxZTQyYjllMzM2OWMzZTYyY2UyZTk5MjAwYmQ2N2ZlYzNkNWQ=
9
+ MmZhZmM1MjNiYjY1NTc5N2FjN2EyZjBmNDY5Zjg2MDEyNjA3YjM1NTUzYTY5
10
+ MDdiNmY5NDdhN2FhODVhODRlNzk2MTRiMzcyYjg4MTk2ZGNmY2Q3NDg1Zjky
11
+ NmI4OTAyYjFkOTk2NmMxNjIzMTFiZDk0MmMwYzcyYmRmMTI4MTY=
12
12
  data.tar.gz: !binary |-
13
- MjZlNzU1YzI4ZTkwYWYzNmI3N2IyYTNmYjIwYjcyNDIzOGU5MWEwYWIwMzNm
14
- OWUzYjEzMGQ2ZGVmOTI1YWNmOGMxOGI3NGFmNGRlYzI1ZWFiNGQ5MzQ3Y2Fi
15
- Y2Y5ZDBiMWFjOWQyYWE5YmI3OTJiZTAwMjgzMGQ2MzM4YmE5Y2M=
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
- HOST_PKI_DIR/
81
- cacerts/cacerts.pem
82
- public/fdqn.pub
83
- private/fdqn.pem
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, sut_pki_dir = '/etc/pki/simp-testing')`
88
+ `copy_pki_to(sut, local_pki_dir, sut_base_dir = '/etc/pki/simp-testing')`
88
89
 
89
90
 
90
91
  #### `copy_keydist_to`
@@ -1,7 +1,7 @@
1
1
  module Simp; end
2
2
 
3
3
  module Simp::BeakerHelpers
4
- VERSION = '1.0.3'
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
- # HOST_PKI_DIR/
179
- # cacerts/cacerts.pem
180
- # public/fdqn.pub
181
- # private/fdqn.pem
182
- def copy_pki_to(sut, local_pki_dir, sut_pki_dir = '/etc/pki/simp-testing')
183
- fqdn = fact_on(sut, 'fqdn')
184
- local_host_pki_tree = File.join(local_pki_dir,'pki','keydist',fqdn)
185
- ###local_cacert_pki_tree = File.join(local_pki_dir,'pki','keydist','cacerts')
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
- ###scp_to(sut, local_cacert_pki_tree, sut_pki_dir)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-beaker-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer