Bug 1122578

Summary: Templates - commands for building PXE default is missing
Product: Red Hat Satellite Reporter: Dominic Cleal <dcleal>
Component: HammerAssignee: Tomas Strachota <tstrachota>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.4CC: abradshaw, bbuckingham, bkearney, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/3968
Whiteboard: Verified in Upstream
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:39:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122832    

Description Dominic Cleal 2014-07-23 14:23:14 UTC
There's no equivalent for this UI action in hammer CLI.

Comment 1 Dominic Cleal 2014-07-23 14:23:15 UTC
Created from redmine issue http://projects.theforeman.org/issues/3968

Comment 4 Bryan Kearney 2015-07-09 12:01:31 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/3968 has been closed
-------------
Anonymous
Applied in changeset commit:hammer-cli-foreman|446d00898c3db8be209fbcc7dc98c87a1b5e6168.

Comment 5 Sachin Ghai 2015-08-31 11:22:22 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-0.3.0-1.201508241205git42d6111.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

build-pxe-default cmd is updated below:

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

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

Subcommands:
 add-operatingsystem           Associate an operating system
 build-pxe-default             Update the default PXE menu on all configured TFTP servers
 create                        Create a provisioning template
 delete                        Delete a provisioning template
 dump                          View config template content.
 info                          Show provisioning template details
 kinds                         List available config template kinds.
 list                          List provisioning templates
 remove-operatingsystem        Disassociate an operating system
 update                        Update a provisioning template



[root@cloud-qe-4 ~]# hammer -u admin -p changeme template build-pxe-default
PXE Default file has been deployed to all Smart Proxies
[root@cloud-qe-4 ~]# 


[root@cloud-qe-4 tftpboot]# cd pxelinux.cfg/
[root@cloud-qe-4 pxelinux.cfg]# ll
total 4
-rw-r--r--. 1 foreman-proxy foreman-proxy 537 Aug 31 07:18 default
[root@cloud-qe-4 pxelinux.cfg]# rm -rf default 
[root@cloud-qe-4 pxelinux.cfg]# hammer -u admin -p changeme template build-pxe-default
PXE Default file has been deployed to all Smart Proxies
[root@cloud-qe-4 pxelinux.cfg]# ll
total 4
-rw-r--r--. 1 foreman-proxy foreman-proxy 537 Aug 31 07:21 default
[root@cloud-qe-4 pxelinux.cfg]# pwd
/var/lib/tftpboot/pxelinux.cfg
[root@cloud-qe-4 pxelinux.cfg]#

Comment 6 Sachin Ghai 2015-09-01 06:06:06 UTC
Verified as per comment 5

Comment 9 Bryan Kearney 2016-07-27 11:39:52 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