Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

14 spacecmd Reference

14.1 Introduction

The following section will help you become more familiar with the spacecmd command-line interface. This interface is available for SUSE Manager, Satellite and Spacewalk servers. spacecmd is written in Python and uses the XML-RPC API provided by the server.

What can spacecmd do for me?
  • Manage almost all aspects of SUSE Manager from the command line with spacecmd

  • Tab completion is available for all commands

  • Single commands can be passed to spacecmd without entering the interactive shell (excellent for shell scripts)

  • May also be accessed and used as an interactive shell

  • Advanced search methods are available for finding specific systems, thus removing the need to create system groups (nevertheless groups are still recommended)

  • Complete functionality through the Spacewalk API. Almost all commands that can be executed from the WebUI can be performed via the spacecmd command-line

14.2 Configuring spacecmd

The following section provides configuration tips for spacecmd.

14.2.1 Setup Spacecmd Credentials

Normally spacecmd prompts you for a username and password each time you attempt to login to the interactive shell. Alternatively you can configure spacecmd with a credentials file to avoid this requirement.

Procedure: Creating a spacecmd Credentials File
  1. Create a hidden spacecmd directory in your home directory and set permissions:

    mkdir ~/.spacecmd
    chmod 700 ~/.spacecmd
  2. Create a config file in ~/.spacecmd/ and provide proper permissions:

    touch ~/.spacecmd/config
    chmod 600 ~/.spacecmd/config
  3. Edit the config file and add the following configuration lines. (You can use either localhost or the FQDN of your SUSE Manager server):

    [spacecmd]
    
    server=FQDN-here
    
    username=username-here
    password=password-here
  4. Check connectivity by entering spacecmd as root:

    # spacecmd

14.2.2 spacecmd Quiet Mode

By default spacecmd prints server status messages during connection attempts. These messages can cause a lot of clutter when parsing system lists. The following alias will force spacecmd to use quiet mode thus preventing this behavior. Add the following line to your ~/.bashrc file:

alias spacecmd='spacecmd -q'

14.2.3 spacecmd Help

spacecmd help can be access by typing spacecmd -h --help

Usage: spacecmd [options] [command]

Options:
  -u USERNAME, --username=USERNAME
                        use this username to connect to the server
  -p PASSWORD, --password=PASSWORD
                        use this password to connect to the server
  -s SERVER, --server=SERVER
                        connect to this server [default: local hostname]
  --nossl               use HTTP instead of HTTPS
  --nohistory           do not store command history
  -y, --yes             answer yes for all questions
  -q, --quiet           print only error messages
  -d, --debug           print debug messages (can be passed multiple times)
  -h, --help            show this help message and exit

As root you can access available functions without entering the spacecmd shell:

# spacecmd -- help

        Documented commands (type help <topic>):
========================================
activationkey_addchildchannels         org_trustdetails
activationkey_addconfigchannels        package_details
activationkey_addentitlements          package_listdependencies
activationkey_addgroups                package_listerrata
activationkey_addpackages              package_listinstalledsystems
activationkey_clone                    package_listorphans
activationkey_create                   package_remove
activationkey_delete                   package_removeorphans
activationkey_details                  package_search
activationkey_diff                     repo_addfilters
activationkey_disable                  repo_clearfilters
activationkey_disableconfigdeployment  repo_create

...

14.3 Troubleshooting

This section provides troubleshooting solutions when working with spacecmd

14.3.1 Creating a Distribution With spacecmd Sets Localhost Instead of FQDN

The support article associated with this issue may be located at:https://www.suse.com/support/kb/doc/?id=7018627

Situation

When creating a distribution with spacecmd it will automatically set localhost as the server name instead of the FQDN of SUSE Manager. This will result in the following kernel option being written:

install=http://localhost/ks/dist/<distributionname>
Resolution

Set the FQDN in $HOME/.spacecmd/config like the following:

test:~/.spacecmd # cat config
[spacecmd]
server=test.mytest.env
username=admin
password=password
nossl=0
Cause

This problem may be experienced if $HOME/.spacecmd/config has been created and the server name option was set to localhost.

14.3.2 Spacecmd not Accepting Commands or Options

When running spacecmd non-interactively, you must escape arguments passed to the command. Always put -- before arguments, to avoid them being treated as global arguments. Additionally, make sure you escape any quotes that you pass to the functions so that they are not interpreted. An example of a well-formed spacecmd command:

spacecmd -s server1 -- softwarechannel_create -n \'My Channel\' -l channel1 -a x86_64

14.3.3 Spacecmd caching problems

The spacecmd command keeps a cache of the various systems and packages that you have installed. Sometimes, this can result in a mismatch between the system name and the system ID. To clear the spacecmd cache, use this command:

spacecmd clear_caches

14.4 spacecmd Functions

The following sections provide descriptions for all documented spacecmd commands. Each command is grouped by the function prefix. Keep in mind that all commands may also be called using scripts and passed to spacecmd as stand-alone commands.

14.4.1 activationkey_

The following spacecmd commands are available for use with activation keys.

activationkey_addchildchannels

Add child channels to an activation key.

usage: activationkey_addchildchannels KEY <CHANNEL ...>
activationkey_addconfigchannels

Add configuration channels to an activation key.

usage: activationkey_addconfigchannels KEY <CHANNEL ...> [options]

options:
  -t add channels to the top of the list
  -b add channels to the bottom of the list
activationkey_addentitlements

Add available entitlements to an activation key.

Note
Note: WebUI Name Change

In the WebUI entitlements are known as System Types. Nevertheless the spacecmd backend still utilizes the entitlements term. Therefore any scripts you may be using can remain unchanged.

usage: activationkey_addentitlements KEY <ENTITLEMENT ...>
activationkey_addgroups

Add existing groups to an activation key.

usage: activationkey_addgroups KEY <GROUP ...>
activationkey_addpackages

Add packages to an activation key.

usage: activationkey_addpackages KEY <PACKAGE ...>
activationkey_clone

Clone an existing activation key.

usage examples:
                 activationkey_clone foo_key -c bar_key
                 activationkey_clone foo_key1 foo_key2 -c prefix
                 activationkey_clone foo_key -x "s/foo/bar"
                 activationkey_clone foo_key1 foo_key2 -x "s/foo/bar"

options:
  -c CLONE_NAME  : Name of the resulting key, treated as a prefix for multiple
                   keys
  -x "s/foo/bar" : Optional regex replacement, replaces foo with bar in the
                   clone description, base-channel label, child-channel
                   labels, config-channel names
activationkey_create

Create a new activation key.

usage: activationkey_create [options]

options:
  -n NAME
  -d DESCRIPTION
  -b BASE_CHANNEL
  -u set key as universal default
  -e [enterprise_entitled,virtualization_host]
activationkey_delete

Delete an existing activation key.

usage: activationkey_delete KEY
activationkey_details

Show details of an existing activation key.

usage: activationkey_details KEY ...
activationkey_diff

Check the difference between two activation keys.

usage: activationkey_diff SOURCE_ACTIVATIONKEY TARGET_ACTIVATIONKEY
activationkey_disable

Disable an existing activation key.

usage: activationkey_disable KEY [KEY ...]
activationkey_disableconfigdeployment

Disable configuration channel deployment for an existing activation key.

usage: activationkey_disableconfigdeployment KEY
activationkey_enable

Enable an existing activation key.

usage: activationkey_enable KEY [KEY ...]
activationkey_enableconfigdeployment

Enable configuration channel deployment for an existing activation key.

usage: activationkey_enableconfigdeployment KEY
activationkey_export

Export activation key(s) to a JSON formatted file.

usage: activationkey_export [options] [<KEY> ...]

options:
    -f outfile.json : specify an output filename, defaults to <KEY>.json
                      if exporting a single key, akeys.json for multiple keys,
                      or akey_all.json if no KEY specified (export ALL)

Note : KEY list is optional, default is to export ALL keys
activationkey_import

Import activation key(s) from JSON file(s)

usage: activationkey_import <JSONFILE ...>
activationkey_list

List all existing activation keys.

usage: activationkey_list
activationkey_listbasechannel

List the base channel associated with an activation key.

usage: activationkey_listbasechannel KEY
activationkey_listchildchannels

List child channels associated with an activation key.

usage: activationkey_listchildchannels KEY
activationkey_listconfigchannels

List configuration channels associated with an activation key.

usage: activationkey_listconfigchannels KEY
activationkey_listentitlements

List entitlements associated with an activation key.

usage: activationkey_listentitlements KEY
activationkey_listgroups

List groups associated with an activation key

usage: activationkey_listgroups KEY
activationkey_listpackages

List packages associated with an activation key.

usage: activationkey_listpackages KEY
activationkey_listsystems

List systems registered with an activation key.

usage: activationkey_listsystems KEY
activationkey_removechildchannels

Remove child channels from an activation key.

usage: activationkey_removechildchannels KEY <CHANNEL ...>
activationkey_removeconfigchannels

Remove configuration channels from an activation key.

usage: activationkey_removeconfigchannels KEY <CHANNEL ...>
activationkey_removeentitlements

Remove entitlements from an activation key.

usage: activationkey_removeentitlements KEY <ENTITLEMENT ...>
activationkey_removegroups

Remove groups from an activation key.

usage: activationkey_removegroups KEY <GROUP ...>
activationkey_removepackages

Remove packages from an activation key.

usage: activationkey_removepackages KEY <PACKAGE ...>
activationkey_setbasechannel

Set the base channel for an activation key.

usage: activationkey_setbasechannel KEY CHANNEL
activationkey_setconfigchannelorder

Set the ranked order of configuration channels.

usage: activationkey_setconfigchannelorder KEY
activationkey_setcontactmethod

Set the contact method to use for systems registered with a specific key. (Use the XML-RPC API to access the latest contact methods.) The following contact methods are available for use with traditional spacecmd: ['default', 'ssh-push', 'ssh-push-tunnel']

usage: activationkey_setcontactmethod KEY CONTACT_METHOD
activationkey_setdescription

Add a description for an activation key.

usage: activationkey_setdescription KEY DESCRIPTION
activationkey_setuniversaldefault

Set a specific key as the universal default.

usage: activationkey_setuniversaldefault KEY
Warning
Warning: Universal Default Key

Using a universal default key is not a Best Practice recommendation.

activationkey_setusagelimit

Set the usage limit of an activation key, can be a number or "unlimited".

usage: activationkey_setbasechannel KEY <usage limit>
usage: activationkey_setbasechannel KEY unlimited
Tip
Tip: Usage Limits

Usage limits are only applicable to traditionally managed systems. Currently usage limits do not apply to Salt or foreign managed systems.

14.4.2 api

The following API command and its options are available for calling the XML-RPC API directly. Calling the API directly allows you to use the latest features in SUSE Manager from the command-line using spacecmd as a wrapper for stand-alone commands or used from within scripts.

Note
Note: Use the api Command for Access to Latest Features

spacecmd is the traditional tool for spacewalk. It functions out of the box with SUSE Manager but you should know that latest features (for example, Salt) are often excluded from traditional spacecmd command-line tool. To gain access to the latest feature additions call api api.getApiCallList from within spacecmd to list all currently available API commands formatted in json. You can then call these commands directly.

api

Call XML-RPC API with arguments directly.

usage: api [options] API_STRING

options:
  -A, --args  Arguments for the API other than session id in comma separated
              strings or JSON expression
  -F, --format   Output format
  -o, --output   Output file

examples:
  api api.getApiCallList
  api --args "sysgroup_A" systemgroup.listSystems
  api -A "rhel-i386-server-5,2011-04-01,2011-05-01" -F "%(name)s" \
      channel.software.listAllPackages

14.4.3 clear

Clears the terminal screen

14.4.4 clear_caches

Clear the internal caches kept for systems and packages

usage: clear_caches

14.4.5 configchannel_

The following spacecmd commands are available for use with configuration channels.

configchannel_addfile

Creates a configuration file.

usage: configchannel_addfile [CHANNEL] [options]

options:
  -c CHANNEL
  -p PATH
  -r REVISION
  -o OWNER [default: root]
  -g GROUP [default: root]
  -m MODE [defualt: 0644]
  -x SELINUX_CONTEXT
  -d path is a directory
  -s path is a symlink
  -b path is a binary (or other file which needs base64 encoding)
  -t SYMLINK_TARGET
  -f local path to file contents

  Note re binary/base64: Some text files, notably those containing trailing
  newlines, those containing ASCII escape characters (or other charaters not
  allowed in XML) need to be sent as binary (-b).  Some effort is made to auto-
  detect files which require this, but you may need to explicitly specify.
configchannel_backup

Backup a configuration channel.

usage: configchannel_backup CHANNEL [OUTDIR]

OUTDIR defaults to $HOME/spacecmd-backup/configchannel/YYYY-MM-DD/CHANNEL
configchannel_clone

Clone configuration channel(s).

usage examples:
                 configchannel_clone foo_label -c bar_label
                 configchannel_clone foo_label1 foo_label2 -c prefix
                 configchannel_clone foo_label -x "s/foo/bar"
                 configchannel_clone foo_label1 foo_label2 -x "s/foo/bar"

options:
  -c CLONE_LABEL : name/label of the resulting cc (note does not update
                   description, see -x option), treated as a prefix if
                   multiple keys are passed
  -x "s/foo/bar" : Optional regex replacement, replaces foo with bar in the
                   clone name, label and description
  Note : If no -c or -x option is specified, interactive is assumed
configchannel_create

Create a configuration channel.

usage: configchannel_create [options]

options:
  -n NAME
  -l LABEL
  -d DESCRIPTION
configchannel_delete

Delete a configuration channel.

usage: configchannel_delete CHANNEL ...
configchannel_details

Show the details of a configuration channel.

usage: configchannel_details CHANNEL ...
configchannel_diff

Find differences between configuration channels.

usage: configchannel_diff SOURCE_CHANNEL TARGET_CHANNEL
configchannel_export

Export configuration channel(s) to a json formatted file.

usage: configchannel_export <CHANNEL>... [options]
options:
    -f outfile.json : specify an output filename, defaults to <CHANNEL>.json
                      if exporting a single channel, ccs.json for multiple
                      channels, or cc_all.json if no CHANNEL specified
                      e.g (export ALL)

Note : CHANNEL list is optional, default is to export ALL
configchannel_filedetails

Show the details of a file in a configuration channel.

usage: configchannel_filedetails CHANNEL FILE [REVISION]
configchannel_forcedeploy

Forces a redeployment of files within a channel on all subscribed systems.

usage: configchannel_forcedeploy CHANNEL
configchannel_import

Import configuration channel(s) from a json file.

usage: configchannel_import <JSONFILES...>
configchannel_list

List all configuration channels.

usage: configchannel_list
configchannel_listfiles

List all files in a configuration channel.

usage: configchannel_listfiles CHANNEL ...
configchannel_listsystems

List all systems subscribed to a configuration channel.

usage: configchannel_listsystems CHANNEL
configchannel_removefiles

Remove configuration files.

usage: configchannel_removefile CHANNEL <FILE ...>
configchannel_sync

Sync configuration files between two configuration channels.

usage: configchannel_sync SOURCE_CHANNEL TARGET_CHANNEL
configchannel_updatefile

Update a configuration file.

usage: configchannel_updatefile CHANNEL FILE
configchannel_verifyfile

Verify a configuration file.

usage: configchannel_verifyfile CHANNEL FILE <SYSTEMS>

<SYSTEMS> may be substituted with any of the following targets:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL

14.4.6 cryptokey_

The following spacecmd commands are available for use with cryptographic keys.

cryptokey_create

Create a cryptographic key.

usage: cryptokey_create [options]

options:
  -t GPG or SSL
  -d DESCRIPTION
  -f KEY_FILE
cryptokey_delete

Delete a cryptographic key.

usage: cryptokey_delete NAME
cryptokey_details

Show the contents of a cryptographic key.

usage: cryptokey_details KEY ...
cryptokey_list

List all cryptographic keys (SSL, GPG).

usage: cryptokey_list

14.4.7 custominfo_

The following spacecmd commands are available for working with custom keys.

custominfo_createkey

Create a custom key.

usage: custominfo_createkey [NAME] [DESCRIPTION]
custominfo_deletekey

Delete a custom key.

usage: custominfo_deletekey KEY ...
custominfo_details

Show the details of a custom key.

usage: custominfo_details KEY ...
custominfo_listkeys

List all custom keys.

usage: custominfo_listkeys
custominfo_updatekey

Update a custom key.

usage: custominfo_updatekey [NAME] [DESCRIPTION]

14.4.8 distribution_

The following spacecmd commands are available for working with kickstart distributions.

distribution_create

Create a Kickstart tree.

usage: distribution_create [options]

options:
  -n NAME
  -p path to tree
  -b base channel to associate with
  -t install type [fedora|rhel_4/5/6|suse|generic_rpm]
distribution_delete

Delete a Kickstart tree.

usage: distribution_delete LABEL
distribution_details

Show the details of a Kickstart tree.

usage: distribution_details LABEL
distribution_list

List the available autoinstall trees.

usage: distribution_list
distribution_rename

Rename a Kickstart tree.

usage: distribution_rename OLDNAME NEWNAME
distribution_update

Update the path of a Kickstart tree.

usage: distribution_update NAME [options]

options:
  -p path to tree
  -b base channel to associate with
  -t install type [fedora|rhel_4/5/6|suse|generic_rpm]

14.4.9 errata_

The following spacecmd commands are available for use with errata data.

errata_apply

Apply an patch to all affected systems.

usage: errata_apply ERRATA|search:XXX ...
errata_delete

Delete an patch.

usage: errata_delete ERRATA|search:XXX ...
errata_details

Show the details of an patch.

usage: errata_details ERRATA|search:XXX ...
errata_findbycve

List errata addressing a CVE.

usage: errata_findbycve CVE-YYYY-NNNN ...
errata_list

List all patches.

usage: errata_list
errata_listaffectedsystems

List of systems affected by an patch.

usage: errata_listaffectedsystems ERRATA|search:XXX ...
errata_listcves

List of CVEs addressed by an patch.

usage: errata_listcves ERRATA|search:XXX ...
errata_publish

Publish an patch to a channel.

usage: errata_publish ERRATA|search:XXX <CHANNEL ...>
errata_search

List patches that meet user provided criteria

usage: errata_search CVE|RHSA|RHBA|RHEA|CLA ...

Example:
> errata_search CVE-2009:1674
> errata_search RHSA-2009:1674
errata_summary

Print a summary of all errata.

usage: errata_summary

14.4.10 filepreservation_

The following spacecmd commands are available for working with kickstart file preservation lists.

filepreservation_create

Create a file preservation list.

usage: filepreservation_create [NAME] [FILE ...]
filepreservation_delete

Delete a file preservation list.

filepreservation_delete NAME
filepreservation_details

Show the details of a file preservation list.

usage: filepreservation_details NAME
filepreservation_list

List all file preservations.

usage: filepreservation_list

14.4.11 get_

get_apiversion

Display the API version of the server.

usage: get_apiversion
get_certificateexpiration

Print the expiration date of the server’s entitlement certificate.

usage: get_certificateexpiration
get_serverversion

Display SUSE Manager server version.

usage: get_serverversion
get_session

Show the current session string.

usage: get_session

14.4.12 group_

group_addsystems

Add systems to a group.

usage: group_addsystems GROUP <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
group_backup

Backup a system group.

usage: group_backup NAME [OUTDIR]

OUTDIR defaults to $HOME/spacecmd-backup/group/YYYY-MM-DD/NAME
group_create

Create a system group.

usage: group_create [NAME] [DESCRIPTION]
group_delete

Delete a system group.

usage: group_delete NAME ...
group_details

Show the details of a system group.

usage: group_details GROUP ...
group_list

List available system groups.

usage: group_list
group_listsystems

List the members of a group.

usage: group_listsystems GROUP
group_removesystems

Remove systems from a group.

usage: group_removesystems GROUP <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
group_restore

Restore a system group.

usage: group_backup INPUTDIR [NAME] ...

14.4.13 help

List all available spacecmd commands with the help function. Check for additional help on a specific function by calling for example:user_create --help.

Documented commands (type help <topic>):
========================================
activationkey_addchildchannels         org_trustdetails
activationkey_addconfigchannels        package_details
activationkey_addentitlements          package_listdependencies
activationkey_addgroups                package_listerrata
activationkey_addpackages              package_listinstalledsystems
activationkey_clone                    package_listorphans
activationkey_create                   package_remove
activationkey_delete                   package_removeorphans
activationkey_details                  package_search
activationkey_diff                     repo_addfilters
activationkey_disable                  repo_clearfilters
activationkey_disableconfigdeployment  repo_create
activationkey_enable                   repo_delete
activationkey_enableconfigdeployment   repo_details
activationkey_export                   repo_list
activationkey_import                   repo_listfilters
activationkey_list                     repo_removefilters
activationkey_listbasechannel          repo_rename
activationkey_listchildchannels        repo_setfilters
activationkey_listconfigchannels       repo_updatessl
activationkey_listentitlements         repo_updateurl
activationkey_listgroups               report_duplicates
activationkey_listpackages             report_errata
activationkey_listsystems              report_inactivesystems
activationkey_removechildchannels      report_ipaddresses
activationkey_removeconfigchannels     report_kernels
activationkey_removeentitlements       report_outofdatesystems
activationkey_removegroups             report_ungroupedsystems
activationkey_removepackages           scap_getxccdfscandetails
activationkey_setbasechannel           scap_getxccdfscanruleresults
activationkey_setconfigchannelorder    scap_listxccdfscans
activationkey_setcontactmethod         scap_schedulexccdfscan
activationkey_setdescription           schedule_cancel
activationkey_setuniversaldefault      schedule_details
activationkey_setusagelimit            schedule_getoutput
api                                    schedule_list
clear                                  schedule_listarchived
clear_caches                           schedule_listcompleted
configchannel_addfile                  schedule_listfailed
configchannel_backup                   schedule_listpending
configchannel_clone                    schedule_reschedule
configchannel_create                   snippet_create
configchannel_delete                   snippet_delete
configchannel_details                  snippet_details
configchannel_diff                     snippet_list
configchannel_export                   snippet_update
configchannel_filedetails              softwarechannel_adderrata
configchannel_forcedeploy              softwarechannel_adderratabydate
configchannel_import                   softwarechannel_addpackages
configchannel_list                     softwarechannel_addrepo
configchannel_listfiles                softwarechannel_clone
configchannel_listsystems              softwarechannel_clonetree
configchannel_removefiles              softwarechannel_create
configchannel_sync                     softwarechannel_delete
configchannel_updatefile               softwarechannel_details
configchannel_verifyfile               softwarechannel_diff
cryptokey_create                       softwarechannel_errata_diff
cryptokey_delete                       softwarechannel_errata_sync
cryptokey_details                      softwarechannel_getorgaccess
cryptokey_list                         softwarechannel_list
custominfo_createkey                   softwarechannel_listallpackages
custominfo_deletekey                   softwarechannel_listbasechannels
custominfo_details                     softwarechannel_listchildchannels
custominfo_listkeys                    softwarechannel_listerrata
custominfo_updatekey                   softwarechannel_listerratabydate
distribution_create                    softwarechannel_listlatestpackages
distribution_delete                    softwarechannel_listpackages
distribution_details                   softwarechannel_listrepos
distribution_list                      softwarechannel_listsyncschedule
distribution_rename                    softwarechannel_listsystems
distribution_update                    softwarechannel_mirrorpackages
errata_apply                           softwarechannel_regenerateneededcache
errata_delete                          softwarechannel_regenerateyumcache
errata_details                         softwarechannel_removeerrata
errata_findbycve                       softwarechannel_removepackages
errata_list                            softwarechannel_removerepo
errata_listaffectedsystems             softwarechannel_removesyncschedule
errata_listcves                        softwarechannel_setorgaccess
errata_publish                         softwarechannel_setsyncschedule
errata_search                          softwarechannel_sync
errata_summary                         softwarechannel_syncrepos
filepreservation_create                ssm_add
filepreservation_delete                ssm_clear
filepreservation_details               ssm_intersect
filepreservation_list                  ssm_list
get_apiversion                         ssm_remove
get_certificateexpiration              system_addchildchannels
get_serverversion                      system_addconfigchannels
get_session                            system_addconfigfile
group_addsystems                       system_addcustomvalue
group_backup                           system_addentitlements
group_create                           system_addnote
group_delete                           system_applyerrata
group_details                          system_comparepackageprofile
group_list                             system_comparepackages
group_listsystems                      system_comparewithchannel
group_removesystems                    system_createpackageprofile
group_restore                          system_delete
help                                   system_deletecrashes
history                                system_deletenotes
kickstart_addactivationkeys            system_deletepackageprofile
kickstart_addchildchannels             system_deployconfigfiles
kickstart_addcryptokeys                system_details
kickstart_addfilepreservations         system_getcrashfiles
kickstart_addoption                    system_installpackage
kickstart_addpackages                  system_list
kickstart_addscript                    system_listbasechannel
kickstart_addvariable                  system_listchildchannels
kickstart_clone                        system_listconfigchannels
kickstart_create                       system_listconfigfiles
kickstart_delete                       system_listcrashedsystems
kickstart_details                      system_listcrashesbysystem
kickstart_diff                         system_listcustomvalues
kickstart_disableconfigmanagement      system_listentitlements
kickstart_disableremotecommands        system_listerrata
kickstart_enableconfigmanagement       system_listevents
kickstart_enablelogging                system_listhardware
kickstart_enableremotecommands         system_listinstalledpackages
kickstart_export                       system_listnotes
kickstart_getcontents                  system_listpackageprofiles
kickstart_getsoftwaredetails           system_listupgrades
kickstart_getupdatetype                system_lock
kickstart_import                       system_reboot
kickstart_import_raw                   system_removechildchannels
kickstart_importjson                   system_removeconfigchannels
kickstart_list                         system_removecustomvalues
kickstart_listactivationkeys           system_removeentitlement
kickstart_listchildchannels            system_removepackage
kickstart_listcryptokeys               system_rename
kickstart_listcustomoptions            system_runscript
kickstart_listoptions                  system_schedulehardwarerefresh
kickstart_listpackages                 system_schedulepackagerefresh
kickstart_listscripts                  system_search
kickstart_listvariables                system_setbasechannel
kickstart_removeactivationkeys         system_setconfigchannelorder
kickstart_removechildchannels          system_setcontactmethod
kickstart_removecryptokeys             system_show_packageversion
kickstart_removefilepreservations      system_syncpackages
kickstart_removeoptions                system_unlock
kickstart_removepackages               system_updatecustomvalue
kickstart_removescript                 system_upgradepackage
kickstart_removevariables              toggle_confirmations
kickstart_rename                       user_adddefaultgroup
kickstart_setcustomoptions             user_addgroup
kickstart_setdistribution              user_addrole
kickstart_setlocale                    user_create
kickstart_setpartitions                user_delete
kickstart_setselinux                   user_details
kickstartsetupdatetype                user_disable
kickstart_updatevariable               user_enable
list_proxies                           user_list
login                                  user_listavailableroles
logout                                 user_removedefaultgroup
org_addtrust                           user_removegroup
org_create                             user_removerole
org_delete                             user_setemail
org_details                            user_setfirstname
org_list                               user_setlastname
org_listtrusts                         user_setpassword
org_listusers                          user_setprefix
org_removetrust                        whoami
org_rename                             whoamitalkingto


Miscellaneous help topics:
==========================
time  systems  ssm

14.4.14 history

List recent commands using the history command.

spacecmd {SSM:0}> history
   1  help
   2  api
   3  exit
   4  help
   5  time --help
   6  quit
   7  clear
spacecmd {SSM:0}>

14.4.15 kickstart_

The following spacecmd functions are available for use with kickstart.

kickstart_addactivationkeys

Add activation keys to a Kickstart profile.

usage: kickstart_addactivationkeys PROFILE <KEY ...>
kickstart_addchildchannels

Add a child channels to a Kickstart profile.

usage: kickstart_addchildchannels PROFILE <CHANNEL ...>
kickstart_addcryptokeys

Add cryptography keys to a Kickstart profile.

usage: kickstart_addcryptokeys PROFILE <KEY ...>
kickstart_addfilepreservations

Add file preservations to a Kickstart profile.

usage: kickstart_addfilepreservations PROFILE <FILELIST ...>
kickstart_addoption

Set an option for a Kickstart profile.

usage: kickstart_addoption PROFILE KEY [VALUE]
kickstart_addpackages

Add packages to a Kickstart profile.

usage: kickstart_addpackages PROFILE <PACKAGE ...>
kickstart_addscript

Add a script to a Kickstart profile.

usage: kickstart_addscript PROFILE [options]

options:
  -p PROFILE
  -e EXECUTION_TIME ['pre', 'post']
  -i INTERPRETER
  -f FILE
  -c execute in a chroot environment
  -t ENABLING_TEMPLATING
kickstart_addvariable

Add a variable to a Kickstart profile.

usage: kickstart_addvariable PROFILE KEY VALUE
kickstart_clone

Clone a Kickstart profile.

usage: kickstart_clone [options]

options:
  -n NAME
  -c CLONE_NAME
kickstart_create

Create a Kickstart profile.

usage: kickstart_create [options]

options:
  -n NAME
  -d DISTRIBUTION
  -p ROOT_PASSWORD
  -v VIRT_TYPE ['none', 'para_host', 'qemu', 'xenfv', 'xenpv']
kickstart_delete

Delete kickstart profile(s).

usage: kickstart_delete PROFILE
usage: kickstart_delete PROFILE1 PROFILE2
usage: kickstart_delete "PROF*"
kickstart_details

Show the details of a Kickstart profile.

usage: kickstart_details PROFILE
kickstart_diff

List differences between two kickstart files.

usage: kickstart_diff SOURCE_CHANNEL TARGET_CHANNEL
kickstart_disableconfigmanagement

Disable configuration management on a Kickstart profile.

usage: kickstart_disableconfigmanagement PROFILE
kickstart_disableremotecommands

Disable remote commands on a Kickstart profile.

usage: kickstart_disableremotecommands PROFILE
kickstart_enableconfigmanagement

Enable configuration management on a Kickstart profile.

usage: kickstart_enableconfigmanagement PROFILE
kickstart_enablelogging

Enable logging for a Kickstart profile.

usage: kickstart_enablelogging PROFILE
kickstart_enableremotecommands

Enable remote commands on a Kickstart profile.

usage: kickstart_enableremotecommands PROFILE
kickstart_export

Export kickstart profile(s) to json formatted file.

usage: kickstart_export <KSPROFILE>... [options]
options:
    -f outfile.json : specify an output filename, defaults to <KSPROFILE>.json
                      if exporting a single kickstart, profiles.json for multiple
                      kickstarts, or ks_all.json if no KSPROFILE specified
                      e.g (export ALL)

Note : KSPROFILE list is optional, default is to export ALL
kickstart_getcontents

Show the contents of a Kickstart profile as they would be presented to a client.

usage: kickstart_getcontents LABEL
kickstart_getsoftwaredetails

Gets kickstart profile software details.

usage: kickstart_getsoftwaredetails KS_LABEL
usage: kickstart_getsoftwaredetails KS_LABEL KS_LABEL2 ...
kickstart_getupdatetype

Get the update type for a kickstart profile(s).

usage: kickstart_getupdatetype PROFILE
usage: kickstart_getupdatetype PROFILE1 PROFILE2
usage: kickstart_getupdatetype "PROF*"
kickstart_import

Import a Kickstart profile from a file.

usage: kickstart_import [options]

options:
  -f FILE
  -n NAME
  -d DISTRIBUTION
  -v VIRT_TYPE ['none', 'para_host', 'qemu', 'xenfv', 'xenpv']
kickstart_import_raw

Import a raw Kickstart or autoyast profile from a file.

usage: kickstart_import_raw [options]

options:
  -f FILE
  -n NAME
  -d DISTRIBUTION
  -v VIRT_TYPE ['none', 'para_host', 'qemu', 'xenfv', 'xenpv']
kickstart_importjson

Import kickstart profile(s) from json file.

usage: kickstart_import <JSONFILES...>
kickstart_list

List the available Kickstart profiles.

usage: kickstart_list
kickstart_listactivationkeys

List the activation keys associated with a Kickstart profile.

usage: kickstart_listactivationkeys PROFILE
kickstart_listchildchannels

List the child channels of a Kickstart profile.

usage: kickstart_listchildchannels PROFILE
kickstart_listcryptokeys

List the crypto keys associated with a Kickstart profile.

usage: kickstart_listcryptokeys PROFILE
kickstart_listcustomoptions

List the custom options of a Kickstart profile.

usage: kickstart_listcustomoptions PROFILE
kickstart_listoptions

List the options of a Kickstart profile.

usage: kickstart_listoptions PROFILE
kickstart_listpackages

List the packages for a Kickstart profile.

usage: kickstart_listpackages PROFILE
kickstart_listscripts

List the scripts for a Kickstart profile.

usage: kickstart_listscripts PROFILE
kickstart_listvariables

List the variables of a Kickstart profile.

usage: kickstart_listvariables PROFILE
kickstart_removeactivationkeys

Remove activation keys from a Kickstart profile.

usage: kickstart_removeactivationkeys PROFILE <KEY ...>
kickstart_removechildchannels

Remove child channels from a Kickstart profile.

usage: kickstart_removechildchannels PROFILE <CHANNEL ...>
kickstart_removecryptokeys

Remove crypto keys from a Kickstart profile.

usage: kickstart_removecryptokeys PROFILE <KEY ...>
kickstart_removefilepreservations

Remove file preservations from a Kickstart profile.

usage: kickstart_removefilepreservations PROFILE <FILE ...>
kickstart_removeoptions

Remove options from a Kickstart profile.

usage: kickstart_removeoptions PROFILE <OPTION ...>
kickstart_removepackages

Remove packages from a Kickstart profile.

usage: kickstart_removepackages PROFILE <PACKAGE ...>
kickstart_removescript

Add a script to a Kickstart profile.

usage: kickstart_removescript PROFILE [ID]
kickstart_removevariables

Remove variables from a Kickstart profile.

usage: kickstart_removevariables PROFILE <KEY ...>
kickstart_rename

Rename a Kickstart profile

usage: kickstart_rename OLDNAME NEWNAME
kickstart_setcustomoptions

Set custom options for a Kickstart profile.

usage: kickstart_setcustomoptions PROFILE
kickstart_setdistribution

Set the distribution for a Kickstart profile.

usage: kickstart_setdistribution PROFILE DISTRIBUTION
kickstart_setlocale

Set the locale for a Kickstart profile.

usage: kickstart_setlocale PROFILE LOCALE
kickstart_setpartitions

Set the partitioning scheme for a Kickstart profile.

usage: kickstart_setpartitions PROFILE
kickstart_setselinux

Set the SELinux mode for a Kickstart profile.

usage: kickstart_setselinux PROFILE MODE
kickstartsetupdatetype

Set the update type for a kickstart profile(s).

usage: kickstartsetupdatetype [options] KS_LABEL

options:
    -u UPDATE_TYPE ['red_hat', 'all', 'none']
kickstart_updatevariable

Update a variable in a Kickstart profile.

usage: kickstart_updatevariable PROFILE KEY VALUE

14.4.16 list_proxies

The following spacecmd function is available for listing proxies.

list_proxies

List the proxies within the user’s organization.

usage: list_proxies

14.4.17 login

Connect as a specific user to the SUSE manager server.

# spacecmd -- login <USERNAME>

14.4.18 logout

Logout from server as the current user.

# spacecmd -- logout

14.4.19 org_

The following spacecmd functions are available for use with organizations.

org_addtrust

Add a trust between two organizations

usage: org_addtrust YOUR_ORG ORG_TO_TRUST
org_create

Create an organization.

usage: org_create [options]

options:
  -n ORG_NAME
  -u USERNAME
  -P PREFIX (Dr., Mr., Miss, Mrs., Ms.)
  -f FIRST_NAME
  -l LAST_NAME
  -e EMAIL
  -p PASSWORD
  --pam enable PAM authentication
org_delete

Delete an organization.

usage: org_delete NAME
org_details

Show the details of an organization.

usage: org_details NAME
org_list

List all organizations.

usage: org_list
org_listtrusts

List an organization’s trusts.

org_listtrusts NAME
org_listusers

List an organization’s users.

org_listusers NAME
org_removetrust

Remove a trust between two organizations.

usage: org_removetrust YOUR_ORG TRUSTED_ORG
org_rename

Rename an organization.

usage: org_rename OLDNAME NEWNAME
org_trustdetails

Show the details of an organizational trust.

usage: org_trustdetails TRUSTED_ORG

14.4.20 package_

The following spacecmd functions are available for working with packages.

package_details

Show the details of a software package.

usage: package_details PACKAGE ...
package_listdependencies

List the dependencies for a package.

usage: package_listdependencies PACKAGE
package_listerrata

List the errata that provide this package.

usage: package_listerrata PACKAGE ...
package_listinstalledsystems

List the systems with a package installed.

usage: package_listinstalledsystems PACKAGE ...
package_listorphans

List packages that are not in a channel.

usage: package_listorphans
package_remove

Remove a package from SUSE Manager/Satellite

usage: package_remove PACKAGE ...
package_removeorphans

Remove packages that are not in a channel.

usage: package_removeorphans
package_search

Find packages that meet the given criteria.

usage: package_search NAME|QUERY

Example: package_search kernel

Advanced Search:
Available Fields: name, epoch, version, release, arch, description, summary
Example: name:kernel AND version:2.6.18 AND -description:devel

14.4.21 repo_

The following spacecmd functions are available for working with repositories.

repo_addfilters

Add filters for a user repository.

usage: repo_addfilters repo <filter ...>
repo_clearfilters

Clears the filters for a user repository.

usage: repo_clearfilters repo
repo_create

Create a user repository.

usage: repo_create <options>

options:
  -n, --name   name of repository
  -u, --url    url of repository

  --ca         SSL CA certificate (not required)
  --cert       SSL Client certificate (not required)
  --key        SSL Client key (not required)
repo_delete

Delete a user repository.

usage: repo_delete <repo ...>
repo_details

Show the details of a user repository.

usage: repo_details <repo ...>
repo_list

List all available user repository.

usage: repo_list
repo_listfilters

Show the filters for a user repository.

usage: repo_listfilters repo
repo_removefilters

Remove filters from a user repository.

usage: repo_removefilters repo <filter ...>
repo_rename

Rename a user repository.

usage: repo_rename OLDNAME NEWNAME
repo_setfilters

Set the filters for a user repo.

usage: repo_setfilters repo <filter ...>
repo_updatessl

Change the SSL certificates of a user repository.

usage: repo_updatessl <options>
options:
  --ca         SSL CA certificate (not required)
  --cert       SSL Client certificate (not required)
  --key        SSL Client key (not required)
repo_updateurl

Change the URL of a user repository.

usage: repo_updateurl <repo> <url>

14.4.22 report_

The following spacecmd functions are available for working with reports.

report_duplicates

List duplicate system profiles.

usage: report_duplicates
report_errata

List all errata and how many systems they affect.

usage: report_errata [ERRATA|search:XXX ...]
report_inactivesystems

List all inactive systems.

usage: report_inactivesystems [DAYS]
report_ipaddresses

List the hostname and IP of each system.

usage: report_network [<SYSTEMS>]

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
report_kernels

List the running kernel of each system.

usage: report_kernels [<SYSTEMS>]

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
report_outofdatesystems

List all out-of-date systems.

usage: report_outofdatesystems
report_ungroupedsystems

List all ungrouped systems.

usage: report_ungroupedsystems

14.4.23 scap_

The following spacecmd functions are available for working with OpenSCAP.

scap_getxccdfscandetails

Get details of given OpenSCAP XCCDF scan.

usage: scap_getxccdfscandetails <XID>
scap_getxccdfscanruleresults

Return a full list of RuleResults for given OpenSCAP XCCDF scan.

usage: scap_getxccdfscanruleresults <XID>
scap_listxccdfscans

Return a list of finished OpenSCAP scans for given systems.

usage: scap_listxccdfscans <SYSTEMS>
scap_schedulexccdfscan

Schedule Scap XCCDF scan.

usage: scap_schedulexccdfscan PATH_TO_XCCDF_FILE XCCDF_OPTIONS SYSTEMS

Example:
> scap_schedulexccdfscan '/usr/share/openscap/scap-security-xccdf.xml' 'profile Web-Default' \
system-scap.example.com

14.4.24 schedule_

The following spacecmd functions are available for working with scheduling.

schedule_cancel

Cancel a scheduled action.

usage: schedule_cancel ID|* ...
schedule_details

Show the details of a scheduled action.

usage: schedule_details ID
schedule_getoutput

Show the output from an action.

usage: schedule_getoutput ID
schedule_list

List all actions.

usage: schedule_list [BEGINDATE] [ENDDATE]

Dates can be any of the following:
Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format.  The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.

Deltas:
Dates can be expressed as delta values.  For example, '2h' would
mean 2 hours in the future.  You can also use negative values to
express times in the past (e.g., -7d would be one week ago).

Units:
s -> seconds
m -> minutes
h -> hours
d -> days
schedule_listarchived

List archived actions.

usage: schedule_listarchived [BEGINDATE] [ENDDATE]

Dates can be any of the following:
Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format.  The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.

Deltas:
Dates can be expressed as delta values.  For example, '2h' would
mean 2 hours in the future.  You can also use negative values to
express times in the past (e.g., -7d would be one week ago).

Units:
s -> seconds
m -> minutes
h -> hours
d -> days
schedule_listcompleted

List completed actions.

Dates can be any of the following:
Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format.  The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.

Deltas:
Dates can be expressed as delta values.  For example, '2h' would
mean 2 hours in the future.  You can also use negative values to
express times in the past (e.g., -7d would be one week ago).

Units:
s -> seconds
m -> minutes
h -> hours
d -> days
schedule_listfailed

List failed actions.

usage: schedule_listfailed [BEGINDATE] [ENDDATE]

Dates can be any of the following:
Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format.  The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.

Deltas:
Dates can be expressed as delta values.  For example, '2h' would
mean 2 hours in the future.  You can also use negative values to
express times in the past (e.g., -7d would be one week ago).

Units:
s -> seconds
m -> minutes
h -> hours
d -> days
schedule_listpending

List pending actions.

usage: schedule_listpending [BEGINDATE] [ENDDATE]

Dates can be any of the following:
Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format.  The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.

Deltas:
Dates can be expressed as delta values.  For example, '2h' would
mean 2 hours in the future.  You can also use negative values to
express times in the past (e.g., -7d would be one week ago).

Units:
s -> seconds
m -> minutes
h -> hours
d -> days
schedule_reschedule

Reschedule failed actions.

usage: schedule_reschedule ID|* ...

14.4.25 snippet_

The following spacecmd functions are available for working with Kickstart snippets.

snippet_create

Create a Kickstart snippet

usage: snippet_create [options]

options:
  -n NAME
  -f FILE
snippet_delete

Delete a Kickstart snippet.

usage: snippet_removefile NAME
snippet_details

Show the contents of a snippet.

usage: snippet_details SNIPPET ...
snippet_list

List the available Kickstart snippets.

usage: snippet_list
snippet_update

Update a Kickstart snippet.

usage: snippet_update NAME

14.4.26 softwarechannel_

The following spacecmd functions are available for working with software channels.

softwarechannel_adderrata

Add patches from one channel into another channel.

usage: softwarechannel_adderrata SOURCE DEST <ERRATA|search:XXX ...>
Options:
    -q/--quick : Don't display list of packages (slightly faster)
    -s/--skip :  Skip errata which appear to exist already in DEST
softwarechannel_adderratabydate

Add errata from one channel into another channel based on a date range.

usage: softwarechannel_adderratabydate [options] SOURCE DEST BEGINDATE ENDDATE
Date format : YYYYMMDD
Options:
        -p/--publish : Publish errata to the channel (don't clone)
softwarechannel_addpackages

Add packages to a software channel.

usage: softwarechannel_addpackages CHANNEL <PACKAGE ...>
softwarechannel_addrepo

Add a repo to a software channel.

usage: softwarechannel_addrepo CHANNEL REPO
softwarechannel_clone

Clone a software channel.

usage: softwarechannel_clone [options]

options:
  -s SOURCE_CHANNEL
  -n NAME
  -l LABEL
  -p PARENT_CHANNEL
  --gpg-copy/-g (copy SOURCE_CHANNEL GPG details)
  --gpg-url GPG_URL
  --gpg-id GPG_ID
  --gpg-fingerprint GPG_FINGERPRINT
  -o do not clone any patches
  --regex/-x "s/foo/bar" : Optional regex replacement,
        replaces foo with bar in the clone name and label
softwarechannel_clonetree

Clone a software channel and its child channels.

usage: softwarechannel_clonetree [options]A
             e.g    softwarechannel_clonetree foobasechannel -p "my_"
                    softwarechannel_clonetree foobasechannel -x "s/foo/bar"
                    softwarechannel_clonetree foobasechannel -x "s/^/my_"

options:
  -s/--source-channel SOURCE_CHANNEL
  -p/--prefix PREFIX (is prepended to the label and name of all channels)
  --gpg-copy/-g (copy GPG details for correspondoing source channel))
  --gpg-url GPG_URL (applied to all channels)
  --gpg-id GPG_ID (applied to all channels)
  --gpg-fingerprint GPG_FINGERPRINT (applied to all channels)
  -o do not clone any errata
  --regex/-x "s/foo/bar" : Optional regex replacement,
        replaces foo with bar in the clone name, label and description
softwarechannel_create

Create a software channel.

usage: softwarechannel_create [options]

options:
  -n NAME
  -l LABEL
  -p PARENT_CHANNEL
  -a ARCHITECTURE ['ia32', 'ia64', 'x86_64', 'ppc',
                  'i386-sun-solaris', 'sparc-sun-solaris']
  -c CHECKSUM ['sha1', 'sha256', 'sha384', 'sha512']
  -u GPG_URL
  -i GPG_ID
  -f GPG_FINGERPRINT
softwarechannel_delete

Delete a software channel.

usage: softwarechannel_delete <CHANNEL ...>
softwarechannel_details

Show the details of a software channel.

usage: softwarechannel_details <CHANNEL ...>
softwarechannel_diff

Check the difference between software channels.

usage: softwarechannel_diff SOURCE_CHANNEL TARGET_CHANNEL
softwarechannel_errata_diff

Check the difference between software channel files.

usage: softwarechannel_errata_diff SOURCE_CHANNEL TARGET_CHANNEL
softwarechannel_errata_sync

Sync errata of two software channels.

usage: softwarechannel_errata_sync SOURCE_CHANNEL TARGET_CHANNEL
softwarechannel_getorgaccess

Get the org-access for the software channel.

usage : softwarechannel_getorgaccess : get org access for all channels
usage : softwarechannel_getorgaccess <channel_label(s)> : get org access for specific channel(s)
softwarechannel_list

List all available software channels.

usage: softwarechannel_list [options]'
options:
  -v verbose (display label and summary)
  -t tree view (pretty-print child-channels)
softwarechannel_listallpackages

List all packages in a channel.

usage: softwarechannel_listallpackages CHANNEL
softwarechannel_listbasechannels

List all base software channels.

usage: softwarechannel_listbasechannels [options]
options:
  -v verbose (display label and summary)
softwarechannel_listchildchannels

List child software channels.

usage:
softwarechannel_listchildchannels [options]
softwarechannel_listchildchannels : List all child channels
softwarechannel_listchildchannels CHANNEL : List children for a specific base channel
options:
 -v verbose (display label and summary)
softwarechannel_listerrata

List the errata associated with a software channel.

usage: softwarechannel_listerrata <CHANNEL ...> [from=yyyymmdd [to=yyyymmdd]]
softwarechannel_listerratabydate

List errata from channelbased on a date range.

usage: softwarechannel_listerratabydate CHANNEL BEGINDATE ENDDATE
Date format : YYYYMMDD
softwarechannel_listlatestpackages

List the newest version of all packages in a channel.

usage: softwarechannel_listlatestpackages CHANNEL
softwarechannel_listpackages

List the most recent packages available from a software channel.

usage: softwarechannel_listpackages CHANNEL
softwarechannel_listrepos

List the repos for a software channel.

usage: softwarechannel_listrepos CHANNEL
softwarechannel_listsyncschedule

List sync schedules for all software channels.

usage: softwarechannel_listsyncschedule : List all channels
softwarechannel_listsystems

List all systems subscribed to a software channel.

usage: softwarechannel_listsystems CHANNEL
softwarechannel_mirrorpackages

Download packages of a given channel.

usage: softwarechannel_mirrorpackages CHANNEL
Options:
    -l/--latest : Only mirror latest package version
softwarechannel_regenerateneededcache

Regenerate the needed errata and package cache for all systems.

usage: softwarechannel_regenerateneededcache
softwarechannel_regenerateyumcache

Regenerate the YUM cache for a software channel.

usage: softwarechannel_regenerateyumcache <CHANNEL ...>
softwarechannel_removeerrata

Remove patches from a software channel.

usage: softwarechannel_removeerrata CHANNEL <ERRATA:search:XXX ...>
softwarechannel_removepackages

Remove packages from a software channel.

usage: softwarechannel_removepackages CHANNEL <PACKAGE ...>
softwarechannel_removerepo

Remove a repo from a software channel.

usage: softwarechannel_removerepo CHANNEL REPO
softwarechannel_removesyncschedule

Removes the repo sync schedule for a software channel.

usage: softwarechannel_setsyncschedule <CHANNEL>
softwarechannel_setorgaccess

Set the org-access for the software channel.

usage : softwarechannel_setorgaccess <channel_label> [options]
-d,--disable : disable org access (private, no org sharing)
-e,--enable : enable org access (public access to all trusted orgs)
softwarechannel_setsyncschedule

Sets the repo sync schedule for a software channel.

usage: softwarechannel_setsyncschedule <CHANNEL> <SCHEDULE>

The schedule is specified in Quartz CronTrigger format without enclosing quotes.
For example, to set a schedule of every day at 1am, <SCHEDULE> would be 0 0 1 * * ?
softwarechannel_sync

Sync the packages of two software channels.

usage: softwarechannel_sync SOURCE_CHANNEL TARGET_CHANNEL
softwarechannel_syncrepos

Sync users repos for a software channel.

usage: softwarechannel_syncrepos <CHANNEL ...>

14.4.27 ssm_

The following spacecmd functions are available for use with System Set Manager.

ssm_add

Add systems to the SSM.

usage: ssm_add <SYSTEMS>

see 'help ssm' for more details

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
ssm_clear

Remove all systems from the SSM.

usage: ssm_clear
ssm_intersect

Replace the current SSM with the intersection of the current list of systems and the list of systems passed as arguments.

usage: ssm_intersect <SYSTEMS>

see 'help ssm' for more details

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNE
ssm_list

List the systems currently in the SSM.

usage: ssm_list

see 'help ssm' for more details
ssm_remove

Remove systems from the SSM.

usage: ssm_remove <SYSTEMS>

see 'help ssm' for more details

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL

14.4.28 system_

The following spacecmd functions are available for use with systems.

system_addchildchannels

Add child channels to a system.

usage: system_addchildchannels <SYSTEMS> <CHANNEL ...>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_addconfigchannels

Add config channels to a system.

usage: system_addconfigchannels <SYSTEMS> <CHANNEL ...> [options]

options:
  -t add channels to the top of the list
  -b add channels to the bottom of the list

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_addconfigfile

Create a configuration file.

Note this is only for system sandbox or locally-managed files
Centrally managed files should be created via configchannel_addfile
usage: system_addconfigfile [SYSTEM] [options]

options:
  -S/--sandbox : list only system-sandbox files
  -L/--local   : list only locally managed files
  -p PATH
  -r REVISION
  -o OWNER [default: root]
  -g GROUP [default: root]
  -m MODE [defualt: 0644]
  -x SELINUX_CONTEXT
  -d path is a directory
  -s path is a symlink
  -b path is a binary (or other file which needs base64 encoding)
  -t SYMLINK_TARGET
  -f local path to file contents

  Note re binary/base64: Some text files, notably those containing trailing
  newlines, those containing ASCII escape characters (or other charaters not
  allowed in XML) need to be sent as binary (-b).  Some effort is made to auto-
  detect files which require this, but you may need to explicitly specify.
system_addcustomvalue

Set a custom value for a system.

usage: system_addcustomvalue KEY VALUE <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_addentitlements

Add entitlements to a system.

usage: system_addentitlements <SYSTEMS> ENTITLEMENT

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_addnote

Set a note for a system.

usage: system_addnote <SYSTEM> [options]

options:
  -s SUBJECT
  -b BODY

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_applyerrata

Apply errata to a system.

usage: system_applyerrata <SYSTEMS> [ERRATA|search:XXX ...]

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_comparepackageprofile

Compare a system against a package profile.

usage: system_comparepackageprofile <SYSTEMS> PROFILE

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_comparepackages

Compare the packages between two systems.

usage: system_comparepackages SOME_SYSTEM ANOTHER_SYSTEM
system_comparewithchannel

Compare the installed packages on a system with those in the channels it is registered to, or optionally some other channel.

usage: system_comparewithchannel <SYSTEMS> [options]
options:
         -c/--channel : Specific channel to compare against,
                        default is those subscribed to, including
                        child channels

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_createpackageprofile

Create a package profile.

usage: system_createpackageprofile SYSTEM [options]

options:
  -n NAME
  -d DESCRIPTION
system_delete

Delete a system profile.

usage: system_delete <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_deletecrashes

Delete crashes reported by spacewalk-abrt.

usage: Delete all crashes for all systems    : system_deletecrashes [--verbose]
usage: Delete all crashes for a single system: system_deletecrashes -i sys_id [--verbose]
usage: Delete a single crash record          : system_deletecrashes -c crash_id [--verbose]
system_deletenotes

Delete notes from a system.

usage: system_deletenotes <SYSTEM> <ID|*>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_deletepackageprofile

Delete a package profile.

usage: system_deletepackageprofile PROFILE
system_deployconfigfiles

Deploy all configuration files for a system.

usage: system_deployconfigfiles <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_details

Show the details of a system profile.

usage: system_details <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_getcrashfiles

Download all files for a crash record.

usage: system_getcrashfiles -c crash_id [--verbose]
usage: system_getcrashfiles -c crash_id [--dest_folder=/tmp/crash_files] [--verbose]
system_installpackage

Install a package on a system.

usage: system_installpackage <SYSTEMS> <PACKAGE ...>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_list

List all system profiles.

usage: system_list
system_listbasechannel

List the base channel for a system.

usage: system_listbasechannel <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listchildchannels

List the child channels for a system.

usage: system_listchildchannels <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listconfigchannels

List the config channels of a system.

usage: system_listconfigchannels <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listconfigfiles

List the managed config files of a system.

usage: system_listconfigfiles <SYSTEMS>'
options:
  -s/--sandbox : list only system-sandbox files
  -l/--local   : list only locally managed files
  -c/--central : list only centrally managed files
  -q/--quiet   : quiet mode (omits the header)

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listcrashedsystems

List all systems that have experienced a crash and reported by spacewalk-abrt.

usage: system_listcrashedsystems
system_listcrashesbysystem

List all reported crashes for a system.

usage: system_listcrashesbysystem -i sys_id
system_listcustomvalues

List the custom values for a system.

usage: system_listcustomvalues <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listentitlements

List the entitlements for a system.

usage: system_listentitlements <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listerrata

List available errata for a system.

usage: system_listerrata <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listevents

List the event history for a system.

usage: system_listevents <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listhardware

List the hardware details of a system.

usage: system_listhardware <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listinstalledpackages

List the installed packages on a system.

usage: system_listinstalledpackages <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listnotes

List the available notes for a system.

usage: system_listnotes <SYSTEM>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_listpackageprofiles

List all package profiles.

usage: system_listpackageprofiles
system_listupgrades

List the available upgrades for a system.

usage: system_listupgrades <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_lock

Lock a system.

usage: system_lock <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_reboot

Reboot a system.

usage: system_reboot <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_removechildchannels

Remove child channels from a system.

usage: system_removechildchannels <SYSTEMS> <CHANNEL ...>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_removeconfigchannels

Remove config channels from a system.

usage: system_removeconfigchannels <SYSTEMS> <CHANNEL ...>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_removecustomvalues

Remove a custom value for a system.

usage: system_removecustomvalues <SYSTEMS> <KEY ...>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_removeentitlement

Remove an entitlement from a system.

usage: system_removeentitlement <SYSTEMS> ENTITLEMENT

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_removepackage

Remove a package from a system.

usage: system_removepackage <SYSTEMS> <PACKAGE ...>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_rename

Rename a system profile.

usage: system_rename OLDNAME NEWNAME
system_runscript

Schedule a script to run on the list of systems provided.

usage: system_runscript <SYSTEMS> [options]

options:
  -u USER
  -g GROUP
  -t TIMEOUT
  -s START_TIME
  -l LABEL
  -f FILE

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL


Dates can be any of the following:
Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format.  The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.

Deltas:
Dates can be expressed as delta values.  For example, '2h' would
mean 2 hours in the future.  You can also use negative values to
express times in the past (e.g., -7d would be one week ago).

Units:
s -> seconds
m -> minutes
h -> hours
d -> days
system_schedulehardwarerefresh

Schedule a hardware refresh for a system.

usage: system_schedulehardwarerefresh <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_schedulepackagerefresh

Schedule a software package refresh for a system.

usage: system_schedulepackagerefresh <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_search

List systems that match the given criteria.

usage: system_search QUERY

Available Fields:
id
name
ip
hostname
device
vendor
driver
uuid

Examples:
> system_search device:vmware
> system_search ip:192.168.82
system_setbasechannel

Set a system’s base software channel.

usage: system_setbasechannel <SYSTEMS> CHANNEL

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_setconfigchannelorder

Set the ranked order of configuration channels.

usage: system_setconfigchannelorder <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_setcontactmethod

Set the contact method for given system(s).

Available contact methods: ['default', 'ssh-push', 'ssh-push-tunnel']
usage: system_setcontactmethod <SYSTEMS> <CONTACT_METHOD>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_show_packageversion

Shows version of installed package on given system(s).

usage: system_show_packageversion <SYSTEM> <PACKAGE>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_syncpackages

Sync packages between two systems.

usage: system_syncpackages SOURCE TARGET
system_unlock

Unlock a system.

usage: system_unlock <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_updatecustomvalue

Update a custom value for a system.

usage: system_updatecustomvalue KEY VALUE <SYSTEMS>

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
system_upgradepackage

Upgrade a package on a system.

usage: system_upgradepackage <SYSTEMS> <PACKAGE ...>|*

<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL

14.4.29 toggle_

toggle_confirmations

Toggle confirmation messages on/off.

usage: toggle_confirmations

14.4.30 user_

user_adddefaultgroup

Add a default group to an user account.

usage: user_adddefaultgroup USER <GROUP ...>
user_addgroup

Add a group to an user account.

usage: user_addgroup USER <GROUP ...>
user_addrole

Add a role to an user account.

usage: user_addrole USER ROLE
user_create

Create an user.

usage: user_create [options]

options:
  -u USERNAME
  -f FIRST_NAME
  -l LAST_NAME
  -e EMAIL
  -p PASSWORD
  --pam enable PAM authentication
user_delete

Delete an user.

usage: user_delete NAME
user_details

Show the details of an user.

usage: user_details USER ...
user_disable

Disable an user account.

usage: user_disable NAME
user_enable

Enable an user account.

usage: user_enable NAME
user_list

List all users.

usage: user_list
user_listavailableroles

List all available roles for users.

usage: user_listavailableroles
user_removedefaultgroup

Remove a default group from an user account.

usage: user_removedefaultgroup USER <GROUP ...>
user_removegroup

Remove a group to an user account.

usage: user_removegroup USER <GROUP ...>
user_removerole

Remove a role from an user account.

usage: user_removerole USER ROLE
user_setemail

Set an user accounts email field.

usage: user_setemail USER EMAIL
user_setfirstname

Set an user accounts first name field.

usage: user_setfirstname USER FIRST_NAME
user_setlastname

Set an user accounts last name field.

usage: user_setlastname USER LAST_NAME
user_setpassword

Set an user accounts name prefix field.

usage: user_setpassword USER PASSWORD
user_setprefix

Set an user accounts name prefix field.

usage: user_setprefix USER PREFIX

14.4.31 whoami

The following command is available for returning the currently logged spacecmd username.

whoami

Print the currently logged spacecmd user.

spacecmd {SSM:0}> whoami
admin

14.4.32 whoamitalkingto

The following spacecmd function is available for returning the server hostname.

whoamitalkingto

Return the server hostname that spacecmd is connected with.

spacecmd {SSM:0}> whoamitalkingto
MGR_SERVER_HOSTNAME

14.4.33 Miscellaneous Help Topics

The following help topics are printed with all functions requiring the relevant information.

time

Dates can be any of the following:

Explicit Dates:
Dates can be expressed as explicit date strings in the YYYYMMDD[HHMM]
format.  The year, month and day are required, while the hours and
minutes are not; the hours and minutes will default to 0000 if no
values are provided.

Deltas:
Dates can be expressed as delta values.  For example, '2h' would
mean 2 hours in the future.  You can also use negative values to
express times in the past (e.g., -7d would be one week ago).

Units:
s -> seconds
m -> minutes
h -> hours
d -> days
systems

<SYSTEMS> can be any of the following:

name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL
ssm

The System Set Manager (SSM) is a group of systems that you

can perform tasks on as a group.

Adding Systems:
> ssm_add group:rhel5-x86_64
> ssm_add channel:rhel-x86_64-server-5
> ssm_add search:device:vmware
> ssm_add host.example.com

Intersections:
> ssm_add group:rhel5-x86_64
> ssm_intersect group:web-servers

Using the SSM:
> system_installpackage ssm zsh
> system_runscript ssm
Print this page