Creating a Schema (CLI)

Use the following procedure create a schema.
  1. Go to shares schema.
  2. To create a new property named contact, enter create contact.
  3. Set the description for the property.
    hostname:shares schema> set description="Owner Contact"
  4. Set the type of the property.
    hostname:shares schema> set type=EmailAddress
  5. Enter commit.
  6. Go to an existing share or project.
  7. Set the custom contact property, and enter commit.
    hostname:shares default> set custom:owner=chris@corp
                      custom:owner = chris@corp (uncommitted)
    hostname:shares default> commit

Example 4-1 Example Schema

The schema context can be found at shares schema.

hostname:> shares schema
hostname: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:

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

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

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

After custom properties have been defined, they can be accessed like any other property under the name custom:property_name:

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