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

Refs #36665 - Remove katello-agent end points #904

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

parthaa
Copy link
Contributor

@parthaa parthaa commented Aug 21, 2023

This PR removes all the katello-agent endpoint related hammer actions. Instead of saying no such command it tries to redirect the use to the right area.

$ hammer host package
Usage:
    hammer host package [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 install                       Not supported. Use the remote execution equivalent `hammer job-invocation create
                               --feature katello_package_install`.
 list                          List packages installed on the host
 remove                        Not supported. Use the remote execution equivalent `hammer job-invocation create
                               --feature katello_package_remove`.
 upgrade                       Not supported. Use the remote execution equivalent `hammer job-invocation create
                               --feature katello_package_update`.
 upgrade-all                   Not supported. Use the remote execution equivalent `hammer job-invocation create
                               --feature katello_package_update`.

Options:
 -h, --help                    Print help

$ hammer host package install --id=1000 
Not supported. Use the remote execution equivalent `hammer job-invocation create --feature katello_package_install`.:
  Error: Unrecognised option '--id'.
  
  See: 'hammer host package install --help'.

$ hammer host package install 
Not supported. Use the remote execution equivalent `hammer job-invocation create --feature katello_package_install`.

$ hammer host package install -h  
Not supported. Use the remote execution equivalent `hammer job-invocation create --feature katello_package_install`.

$ hammer host-collection
Usage:
    hammer host-collection [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
.....
 erratum                       Manage errata on your host collections. Note these command are no longer
                               available. Use the remote execution equivalent
 package                       Manage packages on your host collections. Note these command are no longer
                               available. Use the remote execution equivalent
 package-group                 Manage package-groups on your host collections. Note these command are no longer
                               available. Use the remote execution equivalent
....
Options:
 -h, --help                    Print help

$  hammer host-collection package --help
Usage:
    hammer host-collection package [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 install                       Not supported. Use the remote execution equivalent `hammer job-invocation create
                               --feature katello_package_install`. Specify the host collection with the
                               --search-query parameter, e.g. `--search-query "host_collection = MyCollection"`
                               or `--search-query "host_collection_id=6"`
 remove                        Not supported. Use the remote execution equivalent `hammer job-invocation create
                               --feature katello_package_remove`. Specify the host collection with the
                               --search-query parameter, e.g. `--search-query "host_collection = MyCollection"`
                               or `--search-query "host_collection_id=6"`
 update                        Not supported. Use the remote execution equivalent `hammer job-invocation create
                               --feature katello_package_update`. Specify the host collection with the
                               --search-query parameter, e.g. `--search-query "host_collection = MyCollection"`
                               or `--search-query "host_collection_id=6"`

Options:
 -h, --help                    Print help

$ hammer host-collection package install --help

Not supported. Use the remote execution equivalent `hammer job-invocation create --feature katello_package_install`. Specify the host collection with the --search-query parameter, e.g. `--search-query "host_collection = MyCollection"` or `--search-query "host_collection_id=6"`

@theforeman-bot
Copy link

Issues: #36665

Copy link
Member

@jeremylenz jeremylenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with this approach. 👍

APJ

@parthaa parthaa force-pushed the Remove-katello-agent branch 4 times, most recently from 249ae98 to 89cf066 Compare August 29, 2023 02:43
@@ -1,33 +1,17 @@
module HammerCLIKatello
class HostCollectionErratumCommand < HammerCLIKatello::Command
command_name "erratum"
desc _("Manipulate errata for a host collection")
desc "Manage errata on your host collections. "\
"Note these command are no longer available. "\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Note these command are no longer available. "\
"These commands are no longer available. "\

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for all other occurrences

Update lib/hammer_cli_katello/host_package_group.rb

Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>

Updated Tests

Refs #36665 - Remove agent related actions from host collection
@parthaa parthaa force-pushed the Remove-katello-agent branch from 89cf066 to 4297f59 Compare August 29, 2023 13:32
@parthaa parthaa merged commit ff7d5d7 into Katello:master Aug 29, 2023
3 checks passed
@parthaa parthaa deleted the Remove-katello-agent branch August 29, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants