5.10. リソース種別の管理

従来ハードコードされていた Telemetry リソース種別が、gnocchi クライアントによって管理できるようになりました。Gnocchi クライアントを使用して、リソース種別を作成、表示、削除することができ、Gnocchi API を使用して属性を更新または削除することができます。

1.新しい リソース種別 を作成します。

$ gnocchi resource-type create testResource01 -a bla:string:True:min_length=123
+----------------+------------------------------------------------------------+
| Field          | Value                                                      |
+----------------+------------------------------------------------------------+
| attributes/bla | max_length=255, min_length=123, required=True, type=string |
| name           | testResource01                                             |
| state          | active                                                     |
+----------------+------------------------------------------------------------+

2. リソース種別 の設定を確認します。

$ gnocchi resource-type show testResource01
+----------------+------------------------------------------------------------+
| Field          | Value                                                      |
+----------------+------------------------------------------------------------+
| attributes/bla | max_length=255, min_length=123, required=True, type=string |
| name           | testResource01                                             |
| state          | active                                                     |
+----------------+------------------------------------------------------------+

3. リソース種別 を削除します。

$ gnocchi resource-type delete testResource01
注記

リソースが使用中のリソース種別を削除することはできません。