Go to main content
Oracle® ZFS Storage Appliance 管理ガイド、Release OS8.7.0

印刷ビューの終了

更新: 2017 年 3 月
 
 

スキーマの作成 (CLI)

  1. スキーマコンテキストに移動します (shares schema)。
  2. 「contact」という名前の新しいプロパティーを作成します (create contact)。
  3. プロパティーの説明を設定します (set description="Owner Contact")。
  4. プロパティーの型を設定します (set type=EmailAddress)。
  5. 変更を確定します (commit)。
  6. 既存のシェアまたはプロジェクトに移動します。
  7. 「custom:contact」プロパティーを設定します。
使用例 16  スキーマの例

スキーマコンテキストは「シェア」>「スキーマ」にあります。

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

NAME          TYPE          DESCRIPTION
owner         EmailAddress  Owner Contact

各プロパティーは、プロパティーの名前をトークンとして使用して、スキーマコンテキストの子になっています。プロパティーを作成するには、create コマンドを使用します。

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> 

特定のプロパティーのコンテキスト内で、標準の CLI コマンドを使用してフィールドを設定できます。

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

カスタムプロパティーを定義したあとは、ほかのプロパティーと同様に、「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