hammer_cli_katello 1.3.0 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70bd64a3e1a162fa1c50c097a5f6c60cff91f6764a91aa715f575387bc02406c
4
- data.tar.gz: 9b75290d2868faa302f15f23022bf310ca7f091ec819da5eba988abb17adda4d
3
+ metadata.gz: 9299bc667628d32e5cdabeb70fff4b381bd71664bb999abede682076e8b1b82a
4
+ data.tar.gz: 0b6db8c43b4a4994dd78063760bf57801c14cc1cc88fb727d6fffeb36085ed47
5
5
  SHA512:
6
- metadata.gz: 0b5ab6e3272b3336bb11ca0b0e200fab63654f90bdafc5c213807fb9928da84e377132a408f826a58b8b58d2d55d9fa5f8b142284ff8f0f310b74b72cfd18ec7
7
- data.tar.gz: a114e7f127f3418cadf0a7f9e06a728a6837013eac2245fe4ca49836441486cb7599146a027f22559376fa0ecaf3f44ecd1a5a587f97a9bc0e19b44e62bc8465
6
+ metadata.gz: 54ebe7f1d033e4d15a965d731947684e13fc52e74aa9838e5e4ed821ea76f724d02a0b8cf67b16198e563b2732b53ef2a75de0c20e4e69809de52b16994475d0
7
+ data.tar.gz: f53d1b937657cbcc786a868127d29a549a56bab4e76e484d141abd2aac0864b65dc76ca3b4cefb3ccd67ddca12e9f87f4318d537f6cd9f0ca3e0c9d879cea309
@@ -0,0 +1,66 @@
1
+ module HammerCLIKatello
2
+ class ContentUnitsCommand < HammerCLIKatello::Command
3
+ resource :generic_content_units
4
+
5
+ class ListCommand < HammerCLIKatello::ListCommand
6
+ extend RepositoryScopedToProduct
7
+
8
+ validate_repo_name_requires_product_options(:option_repository_name)
9
+
10
+ output do
11
+ field :id, _("Id")
12
+ field :name, _("Name")
13
+ field :version, _("Version")
14
+ field :filename, _("Filename"), Fields::Field, hide_blank: true
15
+ end
16
+
17
+ validate_options :before, 'IdResolution' do
18
+ organization_options = [:option_organization_id, :option_organization_name,
19
+ :option_organization_label]
20
+ if any(:option_product_name, :option_content_view_name).exist?
21
+ any(*organization_options).required
22
+ end
23
+ end
24
+
25
+ build_options do |o|
26
+ o.expand.including(:products, :organizations, :content_views)
27
+ end
28
+ end
29
+
30
+ class InfoCommand < HammerCLIKatello::InfoCommand
31
+ output do
32
+ field :id, _("Id")
33
+ field :name, _("Name")
34
+ field :version, _("Version")
35
+ field :filename, _("Filename"), Fields::Field, hide_blank: true
36
+ end
37
+
38
+ validate_options :before, 'IdResolution' do
39
+ organization_options = [:option_organization_id, :option_organization_name,
40
+ :option_organization_label]
41
+ product_options = [:option_product_id, :option_product_name]
42
+ repository_options = [:option_repository_id, :option_repository_name]
43
+ content_view_version_options = [:option_content_view_version_id,
44
+ :option_content_view_version_version]
45
+
46
+ if option(:option_product_name).exist?
47
+ any(*organization_options).required
48
+ end
49
+
50
+ if option(:option_repository_name).exist?
51
+ any(*product_options).required
52
+ end
53
+
54
+ if option(:option_name).exist?
55
+ any(*(repository_options + content_view_version_options)).required
56
+ end
57
+ end
58
+
59
+ build_options do |o|
60
+ o.expand.including(:products, :organizations, :content_views, :content_view_versions)
61
+ end
62
+ end
63
+
64
+ autoload_subcommands
65
+ end
66
+ end
@@ -110,7 +110,6 @@ module HammerCLIKatello
110
110
  field :docker_manifest_total, _("Container Image Manifests"), Fields::Field,
111
111
  :hide_blank => true
112
112
  field :docker_tag_total, _("Container Image Tags"), Fields::Field, :hide_blank => true
113
- field :ostree_branch_total, _("OSTree Branches"), Fields::Field, :hide_blank => true
114
113
  field :file_total, _("Files"), Fields::Field, :hide_blank => true
115
114
  field :module_stream_total, _("Module Streams"), Fields::Field, :hide_blank => true
116
115
  end
@@ -159,21 +158,11 @@ module HammerCLIKatello
159
158
  data["docker_manifest_list_total"] = content_counts["docker_manifest_list"]
160
159
  data["docker_manifest_total"] = content_counts["docker_manifest"]
161
160
  data["docker_tag_total"] = content_counts["docker_tag"]
162
- when "ostree"
163
- setup_ostree(data)
164
161
  when "file"
165
162
  data["file_total"] = content_counts["file"]
166
163
  end
167
164
  end
168
165
 
169
- def setup_ostree(data)
170
- content_counts = data["content_counts"]
171
- data["ostree_branch_total"] = content_counts["ostree_branch"]
172
- if data["ostree_upstream_sync_policy"] == "custom"
173
- data["_ostree_upstream_sync_depth"] = data["ostree_upstream_sync_depth"]
174
- end
175
- end
176
-
177
166
  def get_sync_status(state)
178
167
  sync_states = {
179
168
  "failed" => _("Failed"), "success" => _("Success"), "finished" => _("Finished"),
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('1.3.0')
3
+ @version ||= Gem::Version.new('1.3.1')
4
4
  end
5
5
  end
@@ -117,16 +117,16 @@ module HammerCLIKatello
117
117
  'hammer_cli_katello/erratum'
118
118
  )
119
119
 
120
- HammerCLI::MainCommand.lazy_subcommand("ostree-branch", _("Manipulate ostree branches"),
121
- 'HammerCLIKatello::OstreeBranchCommand',
122
- 'hammer_cli_katello/ostree_branch'
123
- )
124
-
125
120
  HammerCLI::MainCommand.lazy_subcommand("file", _("Manipulate files"),
126
121
  'HammerCLIKatello::FileCommand',
127
122
  'hammer_cli_katello/file'
128
123
  )
129
124
 
125
+ HammerCLI::MainCommand.lazy_subcommand("content-units", _("Manipulate content units"),
126
+ 'HammerCLIKatello::ContentUnitsCommand',
127
+ 'hammer_cli_katello/content_units'
128
+ )
129
+
130
130
  HammerCLI::MainCommand.lazy_subcommand("content-export",
131
131
  _("Prepare content for export to a disconnected Katello"),
132
132
  'HammerCLIKatello::ContentExport',