4.5. リソース種別の管理

リソース種別を作成、表示、および削除することができます。デフォルトのリソース種別は汎用的なものですが、属性を自由に追加して独自のリソース種別を作成することができます。

手順

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

    $ openstack metric 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. リソース種別の設定を確認します。

    $ openstack metric resource-typegnocchi resource-type show testResource01
    ----------------------------------------------------------------------------+
    | Field          | Value                                                      |
    ----------------------------------------------------------------------------+
    | attributes/bla | max_length=255, min_length=123, required=True, type=string |
    | name           | testResource01                                             |
    | state          | active                                                     |
    ----------------------------------------------------------------------------+
  3. リソース種別を削除します。

    $ openstack metric resource-type delete testResource01
注記

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