Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37894 - Add content-view-environment list command #959

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/hammer_cli_katello.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def self.exception_handler_class
'hammer_cli_katello/lifecycle_environment'
)

HammerCLI::MainCommand.lazy_subcommand("content-view-environment",
_("Manipulate content view environments"),
'HammerCLIKatello::ContentViewEnvironment',
'hammer_cli_katello/content_view_environment'
)

HammerCLI::MainCommand.lazy_subcommand("product", _("Manipulate products"),
'HammerCLIKatello::Product',
'hammer_cli_katello/product'
Expand Down
27 changes: 27 additions & 0 deletions lib/hammer_cli_katello/content_view_environment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module HammerCLIKatello
class ContentViewEnvironment < HammerCLIKatello::Command
resource :content_view_environments

class ListCommand < HammerCLIKatello::ListCommand
output do
field :id, _("Id")
field :label, _("Label")
from :environment do
field :name, _("Lifecycle Environment")
end
from :content_view do
field :name, _("Content View")
end
field :default, _("Default")
field :hosts_count, _("Hosts Count")
from :organization do
field :name, _("Organization")
end
end

build_options
end

autoload_subcommands
end
end