foreman_scc_manager 1.8.1 → 1.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09a32f8e4e63e7db95e16152e955a5b3e361529312345b10499fcf0503113c93'
4
- data.tar.gz: dceb4ab2c290b98e1fd76525880c1a6a37555152c900e23b80bf15cf9ae7d773
3
+ metadata.gz: fb848728ea3961f30b44e6a02f43b84e73555ff703b0e0c3456e772e66132536
4
+ data.tar.gz: e7ca63acbe79ac2def4f203a0f10c269230652a35efd53e08d7fec4c536f2a18
5
5
  SHA512:
6
- metadata.gz: 8f7c83c275080208924404819315b1f0c261b80a606204b906d9bf38d128aadc8286e222d57faa940c97d1799d6f2a9ad71dd98cbabd53bde6099990799ec6f1
7
- data.tar.gz: '092749ae41aed39acabdd28f02532ffd2d45581b073ac4fc57a9f7b4515f27a6c4f8b48b1b15ffaa62bd955ba296464b8f678b9ea63f2fe1e709249aaac806e5'
6
+ metadata.gz: 215eaa829b2d7e544d818e421850763f4d78bc2b3e62d38d397980c10d0d066bea28e6a9d1fcacfdcb93486a683c0350fdaa0ea80451aebb99f6a7761cda62cc
7
+ data.tar.gz: a93f9a77bcc06abff4e22e78268363f5ae2a71be7d64debd8184ecfdeed412586f9e92bd8a5d7ef11d6308c7149950e7fd0114ef806c6d9717766cc838ed131c
@@ -1,12 +1,15 @@
1
1
  module Actions
2
2
  module SccManager
3
3
  class SyncProducts < Actions::EntryAction
4
+ include EncryptValue
5
+
4
6
  def plan(scc_account)
5
7
  action_subject(scc_account)
8
+ password = encrypt_field(scc_account.password)
6
9
  plan_self(id: scc_account.id,
7
10
  base_url: scc_account.base_url,
8
11
  login: scc_account.login,
9
- password: scc_account.password)
12
+ password: password)
10
13
  end
11
14
 
12
15
  def run
@@ -15,7 +18,7 @@ module Actions
15
18
  products = ::SccManager.get_scc_data(input.fetch(:base_url),
16
19
  '/connect/organizations/products',
17
20
  input.fetch(:login),
18
- input.fetch(:password))
21
+ decrypt_field(input.fetch(:password)))
19
22
  output[:data] = ::SccManager.sanitize_products(products).values
20
23
  rescue StandardError
21
24
  output[:status] = 'FAILURE'
@@ -34,10 +37,6 @@ module Actions
34
37
  _('Sync SUSE subscriptions (Products)')
35
38
  end
36
39
 
37
- def humanized_input
38
- input.dup.update(password: '***')
39
- end
40
-
41
40
  def humanized_output
42
41
  output.dup.update(data: 'Trimmed')
43
42
  end
@@ -1,11 +1,14 @@
1
1
  module Actions
2
2
  module SccManager
3
3
  class SyncRepositories < Actions::EntryAction
4
+ include EncryptValue
5
+
4
6
  def plan(scc_account)
5
7
  action_subject(scc_account)
8
+ password = encrypt_field(scc_account.password)
6
9
  plan_self(base_url: scc_account.base_url,
7
10
  login: scc_account.login,
8
- password: scc_account.password)
11
+ password: password)
9
12
  end
10
13
 
11
14
  def run
@@ -14,7 +17,7 @@ module Actions
14
17
  output[:data] = ::SccManager.get_scc_data(input[:base_url],
15
18
  '/connect/organizations/repositories',
16
19
  input[:login],
17
- input[:password])
20
+ decrypt_field(input[:password]))
18
21
  output[:status] = 'SUCCESS'
19
22
  rescue StandardError
20
23
  output[:status] = 'FAILURE'
@@ -33,10 +36,6 @@ module Actions
33
36
  _('Sync SUSE subscriptions (Repositories)')
34
37
  end
35
38
 
36
- def humanized_input
37
- input.dup.update(password: '***')
38
- end
39
-
40
39
  def humanized_output
41
40
  output.dup.update(data: "Trimmed (got #{output[:data]&.length} repositories")
42
41
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanSccManager
2
- VERSION = '1.8.1'.freeze
2
+ VERSION = '1.8.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_scc_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ATIX AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-16 00:00:00.000000000 Z
11
+ date: 2020-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -200,8 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  requirements: []
203
- rubyforge_project:
204
- rubygems_version: 2.7.9
203
+ rubygems_version: 3.0.6
205
204
  signing_key:
206
205
  specification_version: 4
207
206
  summary: Suse Customer Center plugin for Foreman