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.
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
The following section provides configuration tips for spacecmd.
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.
Create a hidden spacecmd directory in your home directory and set permissions:
mkdir ~/.spacecmd chmod 700 ~/.spacecmd
Create a config file in ~/.spacecmd/ and provide proper permissions:
touch ~/.spacecmd/config chmod 600 ~/.spacecmd/config
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
Check connectivity by entering spacecmd as root:
# spacecmd
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'
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 exitAs 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
...This section provides troubleshooting solutions when working with spacecmd
The support article associated with this issue may be located at:https://www.suse.com/support/kb/doc/?id=7018627
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>
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
This problem may be experienced if $HOME/.spacecmd/config
has been created and the server name option was set to localhost.
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
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.
The following spacecmd commands are available for use with activation keys.
Add child channels to an activation key.
usage: activationkey_addchildchannels KEY <CHANNEL ...>
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
Add available entitlements to an activation key.
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 ...>
Add existing groups to an activation key.
usage: activationkey_addgroups KEY <GROUP ...>
Add packages to an activation key.
usage: activationkey_addpackages KEY <PACKAGE ...>
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 namesCreate 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]
Delete an existing activation key.
usage: activationkey_delete KEY
Show details of an existing activation key.
usage: activationkey_details KEY ...
Check the difference between two activation keys.
usage: activationkey_diff SOURCE_ACTIVATIONKEY TARGET_ACTIVATIONKEY
Disable an existing activation key.
usage: activationkey_disable KEY [KEY ...]
Disable configuration channel deployment for an existing activation key.
usage: activationkey_disableconfigdeployment KEY
Enable an existing activation key.
usage: activationkey_enable KEY [KEY ...]
Enable configuration channel deployment for an existing activation key.
usage: activationkey_enableconfigdeployment KEY
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 keysImport activation key(s) from JSON file(s)
usage: activationkey_import <JSONFILE ...>
List all existing activation keys.
usage: activationkey_list
List the base channel associated with an activation key.
usage: activationkey_listbasechannel KEY
List child channels associated with an activation key.
usage: activationkey_listchildchannels KEY
List configuration channels associated with an activation key.
usage: activationkey_listconfigchannels KEY
List entitlements associated with an activation key.
usage: activationkey_listentitlements KEY
List groups associated with an activation key
usage: activationkey_listgroups KEY
List packages associated with an activation key.
usage: activationkey_listpackages KEY
List systems registered with an activation key.
usage: activationkey_listsystems KEY
Remove child channels from an activation key.
usage: activationkey_removechildchannels KEY <CHANNEL ...>
Remove configuration channels from an activation key.
usage: activationkey_removeconfigchannels KEY <CHANNEL ...>
Remove entitlements from an activation key.
usage: activationkey_removeentitlements KEY <ENTITLEMENT ...>
Remove groups from an activation key.
usage: activationkey_removegroups KEY <GROUP ...>
Remove packages from an activation key.
usage: activationkey_removepackages KEY <PACKAGE ...>
Set the base channel for an activation key.
usage: activationkey_setbasechannel KEY CHANNEL
Set the ranked order of configuration channels.
usage: activationkey_setconfigchannelorder KEY
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
Add a description for an activation key.
usage: activationkey_setdescription KEY DESCRIPTION
Set a specific key as the universal default.
usage: activationkey_setuniversaldefault KEY
Using a universal default key is not a Best Practice recommendation.
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
Usage limits are only applicable to traditionally managed systems. Currently usage limits do not apply to Salt or foreign managed systems.
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.
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.
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.listAllPackagesClears the terminal screen
The following spacecmd commands are available for use with configuration channels.
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.
Backup a configuration channel.
usage: configchannel_backup CHANNEL [OUTDIR] OUTDIR defaults to $HOME/spacecmd-backup/configchannel/YYYY-MM-DD/CHANNEL
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 assumedCreate a configuration channel.
usage: configchannel_create [options] options: -n NAME -l LABEL -d DESCRIPTION
Delete a configuration channel.
usage: configchannel_delete CHANNEL ...
Show the details of a configuration channel.
usage: configchannel_details CHANNEL ...
Find differences between configuration channels.
usage: configchannel_diff SOURCE_CHANNEL TARGET_CHANNEL
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 ALLShow the details of a file in a configuration channel.
usage: configchannel_filedetails CHANNEL FILE [REVISION]
Forces a redeployment of files within a channel on all subscribed systems.
usage: configchannel_forcedeploy CHANNEL
Import configuration channel(s) from a json file.
usage: configchannel_import <JSONFILES...>
List all configuration channels.
usage: configchannel_list
List all files in a configuration channel.
usage: configchannel_listfiles CHANNEL ...
List all systems subscribed to a configuration channel.
usage: configchannel_listsystems CHANNEL
Remove configuration files.
usage: configchannel_removefile CHANNEL <FILE ...>
Sync configuration files between two configuration channels.
usage: configchannel_sync SOURCE_CHANNEL TARGET_CHANNEL
Update a configuration file.
usage: configchannel_updatefile CHANNEL FILE
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
The following spacecmd commands are available for use with cryptographic keys.
Create a cryptographic key.
usage: cryptokey_create [options] options: -t GPG or SSL -d DESCRIPTION -f KEY_FILE
Delete a cryptographic key.
usage: cryptokey_delete NAME
Show the contents of a cryptographic key.
usage: cryptokey_details KEY ...
List all cryptographic keys (SSL, GPG).
usage: cryptokey_list
The following spacecmd commands are available for working with custom keys.
Create a custom key.
usage: custominfo_createkey [NAME] [DESCRIPTION]
Delete a custom key.
usage: custominfo_deletekey KEY ...
Show the details of a custom key.
usage: custominfo_details KEY ...
List all custom keys.
usage: custominfo_listkeys
Update a custom key.
usage: custominfo_updatekey [NAME] [DESCRIPTION]
The following spacecmd commands are available for working with kickstart distributions.
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]
Delete a Kickstart tree.
usage: distribution_delete LABEL
Show the details of a Kickstart tree.
usage: distribution_details LABEL
List the available autoinstall trees.
usage: distribution_list
Rename a Kickstart tree.
usage: distribution_rename OLDNAME NEWNAME
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]
The following spacecmd commands are available for use with errata data.
Apply an patch to all affected systems.
usage: errata_apply ERRATA|search:XXX ...
Delete an patch.
usage: errata_delete ERRATA|search:XXX ...
Show the details of an patch.
usage: errata_details ERRATA|search:XXX ...
List errata addressing a CVE.
usage: errata_findbycve CVE-YYYY-NNNN ...
List all patches.
usage: errata_list
List of systems affected by an patch.
usage: errata_listaffectedsystems ERRATA|search:XXX ...
List of CVEs addressed by an patch.
usage: errata_listcves ERRATA|search:XXX ...
Publish an patch to a channel.
usage: errata_publish ERRATA|search:XXX <CHANNEL ...>
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
Print a summary of all errata.
usage: errata_summary
The following spacecmd commands are available for working with kickstart file preservation lists.
Create a file preservation list.
usage: filepreservation_create [NAME] [FILE ...]
Delete a file preservation list.
filepreservation_delete NAME
Show the details of a file preservation list.
usage: filepreservation_details NAME
List all file preservations.
usage: filepreservation_list
Display the API version of the server.
usage: get_apiversion
Print the expiration date of the server’s entitlement certificate.
usage: get_certificateexpiration
Display SUSE Manager server version.
usage: get_serverversion
Show the current session string.
usage: get_session
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
Backup a system group.
usage: group_backup NAME [OUTDIR] OUTDIR defaults to $HOME/spacecmd-backup/group/YYYY-MM-DD/NAME
Create a system group.
usage: group_create [NAME] [DESCRIPTION]
Delete a system group.
usage: group_delete NAME ...
Show the details of a system group.
usage: group_details GROUP ...
List available system groups.
usage: group_list
List the members of a group.
usage: group_listsystems GROUP
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
Restore a system group.
usage: group_backup INPUTDIR [NAME] ...
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
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}>The following spacecmd functions are available for use with kickstart.
Add activation keys to a Kickstart profile.
usage: kickstart_addactivationkeys PROFILE <KEY ...>
Add a child channels to a Kickstart profile.
usage: kickstart_addchildchannels PROFILE <CHANNEL ...>
Add cryptography keys to a Kickstart profile.
usage: kickstart_addcryptokeys PROFILE <KEY ...>
Add file preservations to a Kickstart profile.
usage: kickstart_addfilepreservations PROFILE <FILELIST ...>
Set an option for a Kickstart profile.
usage: kickstart_addoption PROFILE KEY [VALUE]
Add packages to a Kickstart profile.
usage: kickstart_addpackages PROFILE <PACKAGE ...>
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
Add a variable to a Kickstart profile.
usage: kickstart_addvariable PROFILE KEY VALUE
Clone a Kickstart profile.
usage: kickstart_clone [options] options: -n NAME -c CLONE_NAME
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']
Delete kickstart profile(s).
usage: kickstart_delete PROFILE usage: kickstart_delete PROFILE1 PROFILE2 usage: kickstart_delete "PROF*"
Show the details of a Kickstart profile.
usage: kickstart_details PROFILE
List differences between two kickstart files.
usage: kickstart_diff SOURCE_CHANNEL TARGET_CHANNEL
Disable configuration management on a Kickstart profile.
usage: kickstart_disableconfigmanagement PROFILE
Disable remote commands on a Kickstart profile.
usage: kickstart_disableremotecommands PROFILE
Enable configuration management on a Kickstart profile.
usage: kickstart_enableconfigmanagement PROFILE
Enable logging for a Kickstart profile.
usage: kickstart_enablelogging PROFILE
Enable remote commands on a Kickstart profile.
usage: kickstart_enableremotecommands PROFILE
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 ALLShow the contents of a Kickstart profile as they would be presented to a client.
usage: kickstart_getcontents LABEL
Gets kickstart profile software details.
usage: kickstart_getsoftwaredetails KS_LABEL usage: kickstart_getsoftwaredetails KS_LABEL KS_LABEL2 ...
Get the update type for a kickstart profile(s).
usage: kickstart_getupdatetype PROFILE usage: kickstart_getupdatetype PROFILE1 PROFILE2 usage: kickstart_getupdatetype "PROF*"
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']
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']
Import kickstart profile(s) from json file.
usage: kickstart_import <JSONFILES...>
List the available Kickstart profiles.
usage: kickstart_list
List the activation keys associated with a Kickstart profile.
usage: kickstart_listactivationkeys PROFILE
List the child channels of a Kickstart profile.
usage: kickstart_listchildchannels PROFILE
List the crypto keys associated with a Kickstart profile.
usage: kickstart_listcryptokeys PROFILE
List the custom options of a Kickstart profile.
usage: kickstart_listcustomoptions PROFILE
List the options of a Kickstart profile.
usage: kickstart_listoptions PROFILE
List the packages for a Kickstart profile.
usage: kickstart_listpackages PROFILE
List the scripts for a Kickstart profile.
usage: kickstart_listscripts PROFILE
List the variables of a Kickstart profile.
usage: kickstart_listvariables PROFILE
Remove activation keys from a Kickstart profile.
usage: kickstart_removeactivationkeys PROFILE <KEY ...>
Remove child channels from a Kickstart profile.
usage: kickstart_removechildchannels PROFILE <CHANNEL ...>
Remove crypto keys from a Kickstart profile.
usage: kickstart_removecryptokeys PROFILE <KEY ...>
Remove file preservations from a Kickstart profile.
usage: kickstart_removefilepreservations PROFILE <FILE ...>
Remove options from a Kickstart profile.
usage: kickstart_removeoptions PROFILE <OPTION ...>
Remove packages from a Kickstart profile.
usage: kickstart_removepackages PROFILE <PACKAGE ...>
Add a script to a Kickstart profile.
usage: kickstart_removescript PROFILE [ID]
Remove variables from a Kickstart profile.
usage: kickstart_removevariables PROFILE <KEY ...>
Rename a Kickstart profile
usage: kickstart_rename OLDNAME NEWNAME
Set custom options for a Kickstart profile.
usage: kickstart_setcustomoptions PROFILE
Set the distribution for a Kickstart profile.
usage: kickstart_setdistribution PROFILE DISTRIBUTION
Set the locale for a Kickstart profile.
usage: kickstart_setlocale PROFILE LOCALE
Set the partitioning scheme for a Kickstart profile.
usage: kickstart_setpartitions PROFILE
Set the SELinux mode for a Kickstart profile.
usage: kickstart_setselinux PROFILE MODE
Set the update type for a kickstart profile(s).
usage: kickstartsetupdatetype [options] KS_LABEL
options:
-u UPDATE_TYPE ['red_hat', 'all', 'none']Update a variable in a Kickstart profile.
usage: kickstart_updatevariable PROFILE KEY VALUE
The following spacecmd function is available for listing proxies.
List the proxies within the user’s organization.
usage: list_proxies
The following spacecmd functions are available for use with organizations.
Add a trust between two organizations
usage: org_addtrust YOUR_ORG ORG_TO_TRUST
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
Delete an organization.
usage: org_delete NAME
Show the details of an organization.
usage: org_details NAME
List all organizations.
usage: org_list
List an organization’s trusts.
org_listtrusts NAME
List an organization’s users.
org_listusers NAME
Remove a trust between two organizations.
usage: org_removetrust YOUR_ORG TRUSTED_ORG
Rename an organization.
usage: org_rename OLDNAME NEWNAME
Show the details of an organizational trust.
usage: org_trustdetails TRUSTED_ORG
The following spacecmd functions are available for working with packages.
Show the details of a software package.
usage: package_details PACKAGE ...
List the dependencies for a package.
usage: package_listdependencies PACKAGE
List the errata that provide this package.
usage: package_listerrata PACKAGE ...
List the systems with a package installed.
usage: package_listinstalledsystems PACKAGE ...
List packages that are not in a channel.
usage: package_listorphans
Remove a package from SUSE Manager/Satellite
usage: package_remove PACKAGE ...
Remove packages that are not in a channel.
usage: package_removeorphans
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
The following spacecmd functions are available for working with repositories.
Add filters for a user repository.
usage: repo_addfilters repo <filter ...>
Clears the filters for a user repository.
usage: repo_clearfilters repo
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)
Delete a user repository.
usage: repo_delete <repo ...>
Show the details of a user repository.
usage: repo_details <repo ...>
List all available user repository.
usage: repo_list
Show the filters for a user repository.
usage: repo_listfilters repo
Remove filters from a user repository.
usage: repo_removefilters repo <filter ...>
Rename a user repository.
usage: repo_rename OLDNAME NEWNAME
Set the filters for a user repo.
usage: repo_setfilters repo <filter ...>
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)
Change the URL of a user repository.
usage: repo_updateurl <repo> <url>
The following spacecmd functions are available for working with reports.
List duplicate system profiles.
usage: report_duplicates
List all errata and how many systems they affect.
usage: report_errata [ERRATA|search:XXX ...]
List all inactive systems.
usage: report_inactivesystems [DAYS]
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
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
List all out-of-date systems.
usage: report_outofdatesystems
List all ungrouped systems.
usage: report_ungroupedsystems
The following spacecmd functions are available for working with OpenSCAP.
Get details of given OpenSCAP XCCDF scan.
usage: scap_getxccdfscandetails <XID>
Return a full list of RuleResults for given OpenSCAP XCCDF scan.
usage: scap_getxccdfscanruleresults <XID>
Return a list of finished OpenSCAP scans for given systems.
usage: scap_listxccdfscans <SYSTEMS>
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
The following spacecmd functions are available for working with scheduling.
Cancel a scheduled action.
usage: schedule_cancel ID|* ...
Show the details of a scheduled action.
usage: schedule_details ID
Show the output from an action.
usage: schedule_getoutput ID
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
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
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
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
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
Reschedule failed actions.
usage: schedule_reschedule ID|* ...
The following spacecmd functions are available for working with Kickstart snippets.
Create a Kickstart snippet
usage: snippet_create [options] options: -n NAME -f FILE
Delete a Kickstart snippet.
usage: snippet_removefile NAME
Show the contents of a snippet.
usage: snippet_details SNIPPET ...
List the available Kickstart snippets.
usage: snippet_list
Update a Kickstart snippet.
usage: snippet_update NAME
The following spacecmd functions are available for working with software channels.
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 DESTAdd 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)Add packages to a software channel.
usage: softwarechannel_addpackages CHANNEL <PACKAGE ...>
Add a repo to a software channel.
usage: softwarechannel_addrepo CHANNEL REPO
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 labelClone 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 descriptionCreate 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_FINGERPRINTDelete a software channel.
usage: softwarechannel_delete <CHANNEL ...>
Show the details of a software channel.
usage: softwarechannel_details <CHANNEL ...>
Check the difference between software channels.
usage: softwarechannel_diff SOURCE_CHANNEL TARGET_CHANNEL
Check the difference between software channel files.
usage: softwarechannel_errata_diff SOURCE_CHANNEL TARGET_CHANNEL
Sync errata of two software channels.
usage: softwarechannel_errata_sync SOURCE_CHANNEL TARGET_CHANNEL
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)
List all available software channels.
usage: softwarechannel_list [options]' options: -v verbose (display label and summary) -t tree view (pretty-print child-channels)
List all packages in a channel.
usage: softwarechannel_listallpackages CHANNEL
List all base software channels.
usage: softwarechannel_listbasechannels [options] options: -v verbose (display label and summary)
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)
List the errata associated with a software channel.
usage: softwarechannel_listerrata <CHANNEL ...> [from=yyyymmdd [to=yyyymmdd]]
List errata from channelbased on a date range.
usage: softwarechannel_listerratabydate CHANNEL BEGINDATE ENDDATE Date format : YYYYMMDD
List the newest version of all packages in a channel.
usage: softwarechannel_listlatestpackages CHANNEL
List the most recent packages available from a software channel.
usage: softwarechannel_listpackages CHANNEL
List the repos for a software channel.
usage: softwarechannel_listrepos CHANNEL
List sync schedules for all software channels.
usage: softwarechannel_listsyncschedule : List all channels
List all systems subscribed to a software channel.
usage: softwarechannel_listsystems CHANNEL
Download packages of a given channel.
usage: softwarechannel_mirrorpackages CHANNEL
Options:
-l/--latest : Only mirror latest package versionRegenerate the needed errata and package cache for all systems.
usage: softwarechannel_regenerateneededcache
Regenerate the YUM cache for a software channel.
usage: softwarechannel_regenerateyumcache <CHANNEL ...>
Remove patches from a software channel.
usage: softwarechannel_removeerrata CHANNEL <ERRATA:search:XXX ...>
Remove packages from a software channel.
usage: softwarechannel_removepackages CHANNEL <PACKAGE ...>
Remove a repo from a software channel.
usage: softwarechannel_removerepo CHANNEL REPO
Removes the repo sync schedule for a software channel.
usage: softwarechannel_setsyncschedule <CHANNEL>
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)
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 * * ?
Sync the packages of two software channels.
usage: softwarechannel_sync SOURCE_CHANNEL TARGET_CHANNEL
Sync users repos for a software channel.
usage: softwarechannel_syncrepos <CHANNEL ...>
The following spacecmd functions are available for use with System Set Manager.
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
Remove all systems from the SSM.
usage: ssm_clear
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
List the systems currently in the SSM.
usage: ssm_list see 'help ssm' for more details
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
The following spacecmd functions are available for use with systems.
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
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
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.
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
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
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
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
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
Compare the packages between two systems.
usage: system_comparepackages SOME_SYSTEM ANOTHER_SYSTEM
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:CHANNELCreate a package profile.
usage: system_createpackageprofile SYSTEM [options] options: -n NAME -d DESCRIPTION
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
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]
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
Delete a package profile.
usage: system_deletepackageprofile PROFILE
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
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
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]
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
List all system profiles.
usage: system_list
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
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
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
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
List all systems that have experienced a crash and reported by spacewalk-abrt.
usage: system_listcrashedsystems
List all reported crashes for a system.
usage: system_listcrashesbysystem -i sys_id
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
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
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
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
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
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
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
List all package profiles.
usage: system_listpackageprofiles
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
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
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
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
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
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
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
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
Rename a system profile.
usage: system_rename OLDNAME NEWNAME
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
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
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
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
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
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
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
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
Sync packages between two systems.
usage: system_syncpackages SOURCE TARGET
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
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
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
Toggle confirmation messages on/off.
usage: toggle_confirmations
Add a default group to an user account.
usage: user_adddefaultgroup USER <GROUP ...>
Add a group to an user account.
usage: user_addgroup USER <GROUP ...>
Add a role to an user account.
usage: user_addrole USER ROLE
Create an user.
usage: user_create [options] options: -u USERNAME -f FIRST_NAME -l LAST_NAME -e EMAIL -p PASSWORD --pam enable PAM authentication
Delete an user.
usage: user_delete NAME
Show the details of an user.
usage: user_details USER ...
Disable an user account.
usage: user_disable NAME
Enable an user account.
usage: user_enable NAME
List all users.
usage: user_list
List all available roles for users.
usage: user_listavailableroles
Remove a default group from an user account.
usage: user_removedefaultgroup USER <GROUP ...>
Remove a group to an user account.
usage: user_removegroup USER <GROUP ...>
Remove a role from an user account.
usage: user_removerole USER ROLE
Set an user accounts email field.
usage: user_setemail USER EMAIL
Set an user accounts first name field.
usage: user_setfirstname USER FIRST_NAME
Set an user accounts last name field.
usage: user_setlastname USER LAST_NAME
Set an user accounts name prefix field.
usage: user_setpassword USER PASSWORD
Set an user accounts name prefix field.
usage: user_setprefix USER PREFIX
The following command is available for returning the currently logged spacecmd username.
Print the currently logged spacecmd user.
spacecmd {SSM:0}> whoami
adminThe following spacecmd function is available for returning the server hostname.
Return the server hostname that spacecmd is connected with.
spacecmd {SSM:0}> whoamitalkingto
MGR_SERVER_HOSTNAMEThe following help topics are printed with all functions requiring the relevant information.
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> can be any of the following:
name ssm (see 'help ssm') search:QUERY (see 'help system_search') group:GROUP channel:CHANNEL
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