system
The following spacecmd functions are available for use with systems.
1. 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:CHANNEL2. 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:CHANNEL3. 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.4. 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:CHANNEL5. 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:CHANNEL6. 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:CHANNEL7. 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:CHANNEL8. 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:CHANNEL9. system_comparepackages
Compare the packages between two systems.
usage: system_comparepackages SOME_SYSTEM ANOTHER_SYSTEM10. 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:CHANNEL11. system_createpackageprofile
Create a package profile.
usage: system_createpackageprofile SYSTEM [options]
options:
  -n NAME
  -d DESCRIPTION12. 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:CHANNEL13. 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:CHANNEL14. system_deletepackageprofile
Delete a package profile.
usage: system_deletepackageprofile PROFILE15. 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:CHANNEL16. 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:CHANNEL17. 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:CHANNEL18. system_list
List all system profiles.
usage: system_list19. 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:CHANNEL20. 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:CHANNEL21. 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:CHANNEL22. 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:CHANNEL23. 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:CHANNEL24. 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:CHANNEL25. 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:CHANNEL26. system_listeventhistory
List the event history for a system.
usage: system_listeventhistory <SYSTEMS> [options]
options:
  -s START_TIME list only the events happened after the specified time. [Default: returns all events]
  -o OFFSET skip the first events. Ignored if -l is not specified as well. [Default: 0]
  -l LIMIT limit the results to the specified number of events. [Default: no limit]
<SYSTEMS> can be any of the following:
name
ssm (see 'help ssm')
search:QUERY (see 'help system_search')
group:GROUP
channel:CHANNEL27. 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:CHANNEL28. 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:CHANNEL29. 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:CHANNEL30. 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:CHANNEL31. system_listpackageprofiles
List all package profiles.
usage: system_listpackageprofiles32. 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:CHANNEL33. 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:CHANNEL34. 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:CHANNEL35. 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:CHANNEL36. 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:CHANNEL37. 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:CHANNEL38. 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:CHANNEL39. 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:CHANNEL40. system_rename
Rename a system profile.
usage: system_rename OLDNAME NEWNAME41. 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 -> days42. 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:CHANNEL43. 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:CHANNEL44. 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.8245. 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:CHANNEL46. 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:CHANNEL47. system_setcontactmethod
Set the contact method for a given system.
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:CHANNEL48. system_show_packageversion
Shows version of installed package on a given system.
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:CHANNEL49. 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 
50. 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:CHANNEL51. 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