Go to main content

Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.x

Exit Print View

Updated: November 2018
 
 

Creating a Schema (CLI)

  1. Go to the schema context (shares schema).
  2. Create a new property named "contact" (create contact).
  3. Set the description for the property (set description="Owner Contact").
  4. Set the type of the property (set type=EmailAddress).
  5. Commit the changes (commit).
  6. Go to an existing share or project.
  7. Set the "custom:contact" property.
Example 16  Example Schema

The schema context can be found at Shares > Schema".

carp:> shares schema
carp:shares schema> show
Properties:

NAME          TYPE          DESCRIPTION
owner         EmailAddress  Owner Contact

Each property is a child of the schema context, using the name of the property as the token. To create a property, use the create command:

carp:shares schema> create department
carp:shares schema department (uncommitted)> get
                          type = String
                   description = department
carp:shares schema department (uncommitted)> set description="Department Code"
                   description = Department Code (uncommitted)
carp:shares schema department (uncommitted)> commit
carp:shares schema> 

Within the context of a particular property, fields can be set using the standard CLI commands:

carp:shares schema> select owner
carp:shares schema owner> get
                          type = EmailAddress
                   description = Owner Contact
carp:shares schema owner> set description="Owner Contact Email"
                   description = Owner Contact Email (uncommitted)
carp:shares schema owner> commit

Once custom properties have been defined, they can be accessed like any other property under the name "custom:<property>":

carp:shares default> get
...
             custom:department = 123-45-6789
                  custom:owner = 
...
carp:shares default> set custom:owner=bob@corp
                  custom:owner = bob@corp (uncommitted)
carp:shares default> commit