hammer_cli_katello 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hammer_cli_katello/repository.rb +27 -2
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/test/data/4.4/foreman_api.json +1 -0
- data/test/functional/organization/cdn_configuration_test.rb +5 -2
- data/test/functional/repository/info_test.rb +6 -0
- data/test/functional/repository/reclaim_space_test.rb +105 -0
- data/test/test_helper.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1ff46aa39c3547dea6343f671d10d5ae603ecee1d4e2c416ddea5b1884de3e0
|
4
|
+
data.tar.gz: 5c3a848bcf07dba7d725a882a8a5e667841327f08ec738c100375c910466bfef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fe7eddfe5ec1ebb616afeadd16c57ccba45100997b00dd69912284c27fc94467d22bc2d0023685237e7c744f3eb257a2c8d92d31a5589eb520a3f2e5fb2c484
|
7
|
+
data.tar.gz: 615ed4f84b86117d9b78543c1d8b5a09b9e21240d4f2fa9d5c2899c5a0d229e4ea1da2d008b03095473c90f9ea5cb43a024d122168a0b29a3578affd0d62b040
|
@@ -86,7 +86,7 @@ module HammerCLIKatello
|
|
86
86
|
end
|
87
87
|
|
88
88
|
label _("GPG Key") do
|
89
|
-
from :
|
89
|
+
from :content_credential do
|
90
90
|
field :id, _("Id"), Fields::Field, :hide_blank => true
|
91
91
|
field :name, _("Name"), Fields::Field, :hide_blank => true
|
92
92
|
end
|
@@ -530,7 +530,6 @@ module HammerCLIKatello
|
|
530
530
|
end
|
531
531
|
end
|
532
532
|
end
|
533
|
-
# rubocop:enable ClassLength
|
534
533
|
|
535
534
|
class RemoveContentCommand < HammerCLIKatello::SingleResourceCommand
|
536
535
|
extend RepositoryScopedToProduct
|
@@ -558,6 +557,32 @@ module HammerCLIKatello
|
|
558
557
|
end
|
559
558
|
end
|
560
559
|
|
560
|
+
class ReclaimSpaceCommand < HammerCLIKatello::SingleResourceCommand
|
561
|
+
extend RepositoryScopedToProduct
|
562
|
+
include HammerCLIForemanTasks::Async
|
563
|
+
include OrganizationOptions
|
564
|
+
validate_repo_name_requires_product_options
|
565
|
+
action :reclaim_space
|
566
|
+
command_name "reclaim-space"
|
567
|
+
desc _("Reclaim space from an On Demand repository")
|
568
|
+
|
569
|
+
success_message _("Repository space reclaimed.")
|
570
|
+
failure_message _("Could not reclaim the repository")
|
571
|
+
|
572
|
+
validate_options :before, 'IdResolution' do
|
573
|
+
organization_options = [:option_organization_id, :option_organization_name, \
|
574
|
+
:option_organization_label]
|
575
|
+
|
576
|
+
if option(:option_product_name).exist?
|
577
|
+
any(*organization_options).required
|
578
|
+
end
|
579
|
+
end
|
580
|
+
|
581
|
+
build_options do |o|
|
582
|
+
o.expand.including(:products)
|
583
|
+
end
|
584
|
+
end
|
585
|
+
# rubocop:enable ClassLength
|
561
586
|
autoload_subcommands
|
562
587
|
end
|
563
588
|
end
|