Bug 1165245 - [RFE] Add commands for Settings
Summary: [RFE] Add commands for Settings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard: Verified in Upstream
: 1289864 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-18 15:47 UTC by Bryan Kearney
Modified: 2019-12-16 04:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:34:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bryan Kearney 2014-11-18 15:47:54 UTC

Comment 1 Bryan Kearney 2014-11-18 15:47:56 UTC
Created from redmine issue http://projects.theforeman.org/issues/2918

Comment 3 Bryan Kearney 2015-03-03 15:04:32 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/2918 has been closed
-------------
Arnold Bechtoldt
+1

Please provide management of Foreman settings.

I plan to extend my SaltStack Formula (https://github.com/bechtoldt/foreman-formula) to manage Foreman settings after Foreman installation.
-------------
Jan Ivar Beddari
Just as a note, this is very easy to do if you know a little Ruby, e.g take a look at https://github.com/huit/astapor/blob/master/bin/seeds.rb

Still a means to do this from hammer would be appreciated.
-------------
Anonymous
Applied in changeset commit:hammer-cli-foreman|f4f5a139869df0340ed323e8efffc815e4b84afa.

Comment 4 Sachin Ghai 2015-09-01 03:08:26 UTC
Verified with upstream build:

foreman-proxy-1.10.0-0.develop.201508250705gitb446e0c.el6.noarch
rubygem-smart_proxy_discovery-1.0.2-1.el6.noarch
foreman-1.10.0-0.develop.201508241946git8658fa3.el6.noarch
foreman-release-1.10.0-0.develop.201508241946git8658fa3.el6.noarch
ruby193-rubygem-hammer_cli_import-0.10.21-3.el6.noarch
ruby193-rubygem-hammer_cli_foreman_docker-0.0.3-3.el6.noarch
ruby193-rubygem-hammer_cli-0.3.0-1.201508241209git174f507.el6.noarch
ruby193-rubygem-hammer_cli_foreman_tasks-0.0.7-2.el6.noarch
ruby193-rubygem-hammer_cli_foreman_bootdisk-0.1.3-2.el6.noarch
ruby193-rubygem-hammer_cli_katello-0.0.17-1.el6.noarch

[root@cloud-qe-4 ~]# hammer -u admin -p password settings
Usage:
    hammer settings [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 list                          List all settings
 set                           Update a setting

Options:
 -h, --help                    print help


---
[root@cloud-qe-4 ~]# hammer -u admin -p changeme settings list
-------------------------------------------------------|-------------------------------------------------|---------------------------------------------------------------------------------
NAME                                                   | VALUE                                           | DESCRIPTION                                                                     
-------------------------------------------------------|-------------------------------------------------|---------------------------------------------------------------------------------
administrator                                          | root.eng.bos.redhat.com               | The default administrator email address                                         
authorize_login_delegation                             | false                                           | Authorize login delegation with REMOTE_USER environment variable                
authorize_login_delegation_api                         | false                                           | Authorize login delegation with REMOTE_USER environment variable for API call...
authorize_login_delegation_auth_source_user_autocreate |                                                 | Name of the external auth source where unknown externally authentication user...
bootdisk_cache_media                                   | true                                            | Installation media files will be cached for full host images                    
bootdisk_generic_host_template                         | Boot disk iPXE - generic host                   | iPXE template to use for generic host boot disks                                
bootdisk_host_templat
<snip>
-----

Comment 5 Sachin Ghai 2015-09-01 03:09:38 UTC
setting the discovery_auto value

[root@cloud-qe-4 ~]# hammer -u admin -p changeme settings set --name discovery_auto --value true
Setting [discovery_auto] updated to [true]
[root@cloud-qe-4 ~]# hammer -u admin -p changeme settings set --name discovery_auto --value false
Setting [discovery_auto] updated to []


[root@cloud-qe-4 ~]# hammer -u admin -p changeme settings list | grep discovery
discovery_auto                                         | false                                           | Automatically provision newly discovered hosts, according to the provisioning...
discovery_fact                                         | discovery_bootif                                | Fact name to use for primary interface detection and hostname

Comment 6 Sachin Ghai 2015-09-01 06:03:22 UTC
Moving this to verified as per comment 4 and comment 5.

Comment 7 Bryan Kearney 2016-01-08 16:38:27 UTC
*** Bug 1289864 has been marked as a duplicate of this bug. ***

Comment 11 Bryan Kearney 2016-07-27 11:34:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501


Note You need to log in before you can comment on or make changes to this bug.