Go to main content
Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.0

Exit Print View

Updated: July 2017
 
 

CLI Properties

Properties are typed name/value pairs that are associated with a context. Properties for a given context can be ascertained by running the "help properties" command. Following is an example of retrieving the properties associated with a user's preferences:

dory:configuration preferences> help properties
Properties that are valid in this context:

  locale               => Locality

  login_screen         => Initial login screen

  session_timeout      => Session timeout

  session_annotation   => Current session annotation

  advanced_analytics   => Make available advanced analytics statistics

The properties of a given context can be retrieved with the get command. Following is an example of using the get command to retrieve a user's preferences:

 dory:configuration preferences> get 
                       locale = C
                 login_screen = status/dashboard
              session_timeout = 15
           session_annotation = 
           advanced_analytics = false

The get command will return any properties provided to it as arguments. For example, to get the value of the login_screen property:

dory:configuration preferences> get login_screen
                 login_screen = status/dashboard

The get command will tab complete with the names of the available properties. For example, to see a list of available properties for the iSCSI service:

dory:> configuration services iscsi get tab 
<status>            isns_server         radius_secret       target_chap_name
isns_access         radius_access       radius_server       target_chap_secret

The select command, or a command surrounded by double quotes, will select a dynamic node by property. For example, to select key-000 by user:

hostname:configuration services sftp keys> show
Keys:

NAME    MODIFIED            CIPHER   USER    COMMENT
key-000 2015-6-5 19:48:23   RSA      u1      1

hostname:configuration services sftp keys> "user=u1"
hostname:configuration services sftp key-000>

The set command will set a property to a specified value, with the property name and its value separated by an equals sign. For example, to set the login_screen property to be "shares":

dory:configuration preferences> set login_screen=shares
                 login_screen = shares (uncommitted)

Note that in the case of properties that constitute state on the appliance, setting the property does not change the value, but rather records the set value and indicates that the value of the property is uncommitted.

To force set property values to take effect, they must be explicitly committed, allowing multiple values to be changed as a single, coherent change. To commit any uncommitted property values, use the commit command:

dory:configuration preferences> get login_screen 
                 login_screen = shares (uncommitted)
dory:configuration preferences> commit
dory:configuration preferences> get login_screen
                 login_screen = shares

If you attempt to leave a context that contains uncommitted properties, you will be warned that leaving will abandon the set property values, and will be prompted to confirm that you with to leave. For example:

dory:configuration preferences> set login_screen=maintenance/hardware
                 login_screen = maintenance/hardware (uncommitted)
dory:configuration preferences> done
You have uncommitted changes that will be discarded. Are you sure? (Y/N) 

If a property in a context is set from a different context -- that is, if the set command has been appended to a command that changes context -- the commit is implied, and happens before control is returned to the originating context. For example:

dory:> configuration preferences set login_screen=analytics/worksheets
                 login_screen = analytics/worksheets
dory:>

Some properties take a list of values. For these properties, the list elements should be separated by a comma. For example, the NTP servers property may be set to a list of NTP servers:

dory:configuration services ntp> set servers=0.pool.ntp.org,1.pool.ntp.org
                      servers = 0.pool.ntp.org,1.pool.ntp.org (uncommitted)
dory:configuration services ntp> commit

If a property value contains a comma, an equals sign, a quote or a space, the entire value must be double quoted. For example, the sharenfs shares property for the default project may be set to read-only, but provide read/write access to host kiowa. For more information, see Shares and Projects.

dory:> shares select default
dory:shares default> set sharenfs="ro,rw=kiowa"
                     sharenfs = ro,rw=kiowa (uncommitted)
dory:shares default> commit

Some properties are immutable; you can get their values, but you cannot set them. Attempts to set an immutable property results in an error. For example, attempting to set the immutable space_available property of the default project. For more information, see Shares and Projects.

dory:> shares select default
dory:shares default> get space_available 
              space_available = 1.15T
dory:shares default> set space_available=100P
error: cannot set immutable property "space_available"

Some other properties are only immutable in certain conditions. For these properties, the set command is not valid. For example, if the user named bmc is a network user, the fullname property will be immutable:

dory:> configuration users select bmc set fullname="Rembrandt Q. Einstein"
error: cannot set immutable property "fullname"

Related Topics