hammer_cli_katello 1.16.1 → 1.17.1
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 +4 -4
- data/lib/hammer_cli_katello/activation_key.rb +1 -0
- data/lib/hammer_cli_katello/capsule.rb +1 -0
- data/lib/hammer_cli_katello/content_view.rb +4 -0
- data/lib/hammer_cli_katello/host_extensions.rb +26 -7
- data/lib/hammer_cli_katello/repository.rb +1 -0
- data/lib/hammer_cli_katello/subscription.rb +1 -0
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/test/functional/content_view/list_test.rb +6 -6
- data/test/functional/repository/list_test.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccd3f88de4919470d99fe785ad514ec780fef1e0b3754b378e496a52844bcd6c
|
4
|
+
data.tar.gz: 7a9c219ff668ff1b6bffb465c1f4bc236f7f4022160e04b4292bf698aeffa156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03dc9e68f5676e8cf61b3d219501d3bd64f25b6d2950728fa03f1175d1ca582d6af1a45fb3c1196c96a551b8e6ecf10b105a33dacbb1f7cc15efacab18323f81
|
7
|
+
data.tar.gz: ca04025daa063fccc7aaf21f88d4932253af4b3ada5836b9de4a81a2fe16be9536bdfae0be11829b04a646b0f32b7b7bb7f50101de18142ca5974cd58b70775f
|
@@ -70,6 +70,7 @@ module HammerCLIKatello
|
|
70
70
|
field :content_view_version, _("Version")
|
71
71
|
field :content_view_version_id, _("Content View version Id")
|
72
72
|
field :composite, _("Composite"), Fields::Boolean
|
73
|
+
field :rolling, _("Rolling"), Fields::Boolean
|
73
74
|
field :content_view_environment_id, _("Content View Environment id"), Fields::Field
|
74
75
|
end
|
75
76
|
end
|
@@ -205,6 +205,7 @@ module HammerCLIKatello
|
|
205
205
|
collection :content_views, _("Content Views") do
|
206
206
|
field nil, _("Name"), Fields::Reference
|
207
207
|
field :composite, _('Composite'), Fields::Boolean
|
208
|
+
field :rolling, _('Rolling'), Fields::Boolean
|
208
209
|
field :last_published, _('Last Published'), Fields::Date
|
209
210
|
collection :repositories, _('Repositories') do
|
210
211
|
field :id, _("Repository ID")
|
@@ -15,6 +15,7 @@ module HammerCLIKatello
|
|
15
15
|
field :name, _("Name")
|
16
16
|
field :label, _("Label")
|
17
17
|
field :composite, _("Composite"), Fields::Boolean
|
18
|
+
field :rolling, _("Rolling"), Fields::Boolean
|
18
19
|
field :last_published, _("Last Published"), Fields::Date, :hide_blank => true
|
19
20
|
field :repository_ids, _("Repository IDs"), Fields::List, :max_width => 300
|
20
21
|
end
|
@@ -32,6 +33,7 @@ module HammerCLIKatello
|
|
32
33
|
field :name, _("Name")
|
33
34
|
field :label, _("Label")
|
34
35
|
field :composite, _("Composite"), Fields::Boolean
|
36
|
+
field :rolling, _("Rolling"), Fields::Boolean
|
35
37
|
field :description, _("Description")
|
36
38
|
field :content_host_count, _("Content Host Count")
|
37
39
|
field :solve_dependencies, _("Solve Dependencies"), Fields::Boolean
|
@@ -142,11 +144,13 @@ module HammerCLIKatello
|
|
142
144
|
failure_message _("Could not create the content view")
|
143
145
|
|
144
146
|
option ["--composite"], :flag, _("Create a composite content view")
|
147
|
+
option ["--rolling"], :flag, _("Create a rolling content view")
|
145
148
|
option ["--import-only"], :flag, _("Designate this Content View for "\
|
146
149
|
"importing from upstream servers only.")
|
147
150
|
def request_params
|
148
151
|
super.tap do |opts|
|
149
152
|
opts['composite'] = option_composite? || false
|
153
|
+
opts['rolling'] = option_rolling? || false
|
150
154
|
opts['import_only'] = option_import_only? || false
|
151
155
|
end
|
152
156
|
end
|
@@ -6,6 +6,7 @@ require 'hammer_cli_katello/host_package_group'
|
|
6
6
|
require 'hammer_cli_katello/host_traces'
|
7
7
|
require 'hammer_cli_katello/host_bootc'
|
8
8
|
|
9
|
+
# rubocop:disable Metrics/ModuleLength
|
9
10
|
module HammerCLIKatello
|
10
11
|
module HostExtensions
|
11
12
|
::HammerCLIForeman::Host::CreateCommand.instance_eval do
|
@@ -57,17 +58,34 @@ module HammerCLIKatello
|
|
57
58
|
_("Content View Environment Labels"), Fields::Field
|
58
59
|
collection :content_view_environments, _('Content View Environments') do
|
59
60
|
from :content_view do
|
60
|
-
label
|
61
|
-
|
62
|
-
field :
|
63
|
-
|
61
|
+
# Deprecated label. To be removed in future versions.
|
62
|
+
label _("Content view"), :sets => ['ALL'] do
|
63
|
+
field :id, _("Id"), Fields::Field,
|
64
|
+
:replaced_by => [_('Content Information'), _('Content View Environments'), _('CV Id')].join('/')
|
65
|
+
field :name, _("Name"), Fields::Field,
|
66
|
+
:replaced_by => [_('Content Information'), _('Content View Environments'), _('CV Name')].join('/')
|
67
|
+
field :composite, _("Composite"), Fields::Boolean,
|
68
|
+
:replaced_by => [_('Content Information'), _('Content View Environments'), _('Composite CV')].join('/')
|
69
|
+
field :rolling, _("Rolling"), Fields::Boolean,
|
70
|
+
:replaced_by => [_('Content Information'), _('Content View Environments'), _('Rolling CV')].join('/')
|
64
71
|
end
|
72
|
+
|
73
|
+
field :id, _("CV Id")
|
74
|
+
field :name, _("CV Name")
|
75
|
+
field :composite, _("Composite CV"), Fields::Boolean
|
76
|
+
field :rolling, _("Rolling CV"), Fields::Boolean
|
65
77
|
end
|
66
78
|
from :lifecycle_environment do
|
67
|
-
label
|
68
|
-
|
69
|
-
field :
|
79
|
+
# Deprecated label. To be removed in future versions.
|
80
|
+
label _("Lifecycle environment"), :sets => ['ALL'] do
|
81
|
+
field :id, _("Id"), Fields::Field,
|
82
|
+
:replaced_by => [_('Content Information'), _('Content View Environments'), _('LE Id')].join('/')
|
83
|
+
field :name, _("Name"), Fields::Field,
|
84
|
+
:replaced_by => [_('Content Information'), _('Content View Environments'), _('LE Name')].join('/')
|
70
85
|
end
|
86
|
+
|
87
|
+
field :id, _("LE Id")
|
88
|
+
field :name, _("LE Name")
|
71
89
|
end
|
72
90
|
field :label, _("Label")
|
73
91
|
end
|
@@ -137,3 +155,4 @@ module HammerCLIKatello
|
|
137
155
|
end
|
138
156
|
end
|
139
157
|
end
|
158
|
+
# rubocop:enable Metrics/ModuleLength
|
@@ -33,6 +33,7 @@ module HammerCLIKatello
|
|
33
33
|
field :content_type, _("Content Type")
|
34
34
|
field :content_label, _("Content Label")
|
35
35
|
field :url, _("Url")
|
36
|
+
field :docker_upstream_name, _('Upstream Repository Name'), nil, :sets => ['ALL']
|
36
37
|
end
|
37
38
|
|
38
39
|
content_type_msg = _("Limit the repository type to return." \
|
@@ -36,9 +36,9 @@ describe 'listing content-views' do
|
|
36
36
|
|
37
37
|
ex.returns(empty_response)
|
38
38
|
expected_result = success_result(
|
39
|
-
"
|
40
|
-
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS
|
41
|
-
|
39
|
+
"----------------|------|-------|-----------|---------|----------------|---------------
|
40
|
+
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | ROLLING | LAST PUBLISHED | REPOSITORY IDS
|
41
|
+
----------------|------|-------|-----------|---------|----------------|---------------
|
42
42
|
")
|
43
43
|
|
44
44
|
result = run_cmd(@cmd + params)
|
@@ -57,9 +57,9 @@ CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS
|
|
57
57
|
|
58
58
|
ex.returns(empty_response)
|
59
59
|
expected_result = success_result(
|
60
|
-
"
|
61
|
-
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS
|
62
|
-
|
60
|
+
"----------------|------|-------|-----------|---------|----------------|---------------
|
61
|
+
CONTENT VIEW ID | NAME | LABEL | COMPOSITE | ROLLING | LAST PUBLISHED | REPOSITORY IDS
|
62
|
+
----------------|------|-------|-----------|---------|----------------|---------------
|
63
63
|
")
|
64
64
|
|
65
65
|
result = run_cmd(@cmd + params)
|
@@ -98,6 +98,25 @@ ID | NAME | PRODUCT | CONTENT TYPE | CONTENT LABEL | URL
|
|
98
98
|
expected = CommandExpectation.new("---|------|---------|--------------|---------------|----
|
99
99
|
ID | NAME | PRODUCT | CONTENT TYPE | CONTENT LABEL | URL
|
100
100
|
---|------|---------|--------------|---------------|----
|
101
|
+
")
|
102
|
+
|
103
|
+
result = run_cmd(@cmd + params)
|
104
|
+
assert_cmd(expected, result)
|
105
|
+
end
|
106
|
+
|
107
|
+
it "lists the repositories with container upstream name" do
|
108
|
+
params = ['--organization-id=1', '--fields=ALL']
|
109
|
+
|
110
|
+
ex = api_expects(:repositories, :index, 'repositories list with upstream container name') do |par|
|
111
|
+
par['organization_id'] == org_id && par['page'] == 1 &&
|
112
|
+
par['per_page'] == 1000
|
113
|
+
end
|
114
|
+
|
115
|
+
ex.returns(empty_response)
|
116
|
+
|
117
|
+
expected = CommandExpectation.new("---|------|---------|--------------|---------------|-----|-------------------------
|
118
|
+
ID | NAME | PRODUCT | CONTENT TYPE | CONTENT LABEL | URL | UPSTREAM REPOSITORY NAME
|
119
|
+
---|------|---------|--------------|---------------|-----|-------------------------
|
101
120
|
")
|
102
121
|
|
103
122
|
result = run_cmd(@cmd + params)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Price
|
@@ -37,7 +37,7 @@ authors:
|
|
37
37
|
autorequire:
|
38
38
|
bindir: bin
|
39
39
|
cert_chain: []
|
40
|
-
date: 2025-
|
40
|
+
date: 2025-05-29 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: csv
|