テナントは、一連の管理者に関連付けられているテナント組織またはグループを識別します。テナント定義を作成すると、リージョンとローカルの両方のクラスタに保存されるデータが、テナント別にセグメント化されます。テナントが別のテナントのデータにアクセスすることはできません。NETCONF/REST
インターフェイスまたは ESC ポータルを使用し、ESC を介してテナント定義を作成できます。
(注) |
テナントは VMware vCenter ではサポートされていません。
|
ESC では、次の 3 種類のテナントを作成できます。
-
VIM 上のテナント(ESC がテナントを作成):ESC ではデフォルトの VIM での展開用にテナントを作成して使用できます。ESC ではこのテナントを削除できます。
-
VIM 上の既存の(アウトオブバンド)テナント:ESC ではこのテナントを作成せず、デフォルトの VIM での展開にのみテナントを使用します。たとえば、admin テナントは、ESC 自体が展開されている既存のテナントです。ESC では、名前または
UUID で識別される既存のテナントへのフレーバー、イメージ、ボリュームなどのリソースの展開がサポートされます。ESC では、デフォルトの VIM に対してのみ既存のテナントが管理されます。ESC では既存のテナントを削除できません。
-
ESC 内のテナント:ESC では、ESC 内にテナントが作成されます。このテナントは、いずれの VIM からも独立しています。このテナントは、複数の VIM に VM を展開するためのルートテナントとして機能します。
テナント名は一意である必要があります。
(注) |
ESC では、テナント、ネットワーク、サブネットワーク、イメージ、フレーバーなどのリソースをデフォルトの VIM でのみ作成して管理できます。(デフォルトの VIM 以外の)デフォルトではない VIM では、展開のみがサポートされます。
|
データモデルのテナントは、次の属性で管理します。
-
managed_resource 属性
-
vim_mapping 属性
次の表に、データモデルのテナントと属性のマッピングの詳細が示されています。
テナントタイプ
|
managed_resource
|
vim_mapping
|
説明
|
VIM のテナント(ESC によって作成)
|
true
|
true
|
managed_resource 属性が true に設定されている場合、ESC では VIM 上にテナントが作成されます。デフォルトでは、managed_resource は true です。vim_mapping 属性は true です。
<tenants>
<tenant>
<name>new-tenant</name>
<managed_resource>true</managed_resource>
</tenant>
</tenants>
|
VIM 上の既存のテナント
|
false
|
true
|
既存のテナントの場合、managed_resource 属性は false に設定されます。vim_mapping 属性は true です。
<tenants>
<tenant>
<name>pre-existing</name>
<managed_resource>false</managed_resource>
</tenant>
</tenants>
テナント UUID を使用したサンプルデータモデル
<tenants>
<tenant>
<name>76eedcae-6067-44a7-b733-fc99a2e50bdf</name>
<managed_resource>false</managed_resource>
</tenant>
</tenants>
|
ESC 内のテナント
|
-
|
false
|
ESC 内にテナントを作成するには、vim_mapping 属性を false に設定します。
<tenants>
<tenant>
<name>esc-tenant-A</name>
<vim_mapping>false</vim_mapping>
</tenant>
</tenants>
|
-
|
false
|
false
|
テナントは作成されません。要求は ESC によって拒否されます。
|
同じタイプの複数の VIM(OpenStack VIM)に VM を展開するには、vim_mapping 属性を false に設定してテナントを作成する必要があります。このテナントは、個別に作成することも、展開の一部として作成することもできます。これにより、ESC
内にテナントが作成され、マルチ VIM 展開のルートテナントとして機能します。マルチ VIM 展開の場合は、各 VM グループ内で VIM ロケータ属性を指定する必要があります。詳細については、単一の VMware vCenter VIM での VNF の展開を参照してください。
テナントクォータ
ESC で作成されたテナントのクォータと呼ばれる動作制限を設定できます。クォータは、展開データモデルを使用して展開中に設定できます。
(注) |
テナントクォータは、既存のテナントおよび ESC 内のテナントではサポートされません。
|
テナントは、コンピューティング(Nova)およびネットワーク(Neutron)の次のクォータ設定をサポートしています。
コンピューティングの設定:
コンピューティングの設定:
-
floatingip
-
security_group_rule
-
security_group
-
network
-
サブネット
-
port
-
ルータ
次の展開データモデルは、テナントのクォータ設定を示しています。
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>tenant-quota-example</name>
<extensions>
<extension>
<name>quota</name>
<properties>
<property>
<name>cores</name>
<value>26</value>
</property>
<property>
<name>metadata_items</name>
<value>260</value>
</property>
<property>
<name>floating_ips</name>
<value>26</value>
</property>
<property>
<name>injected_file_content_bytes</name>
<value>26000</value>
</property>
<property>
<name>injected_file_path_bytes</name>
<value>246</value>
</property>
<property>
<name>injected_files</name>
<value>26</value>
</property>
<property>
<name>instances</name>
<value>26</value>
</property>
<property>
<name>key_pairs</name>
<value>26</value>
</property>
<property>
<name>ram</name>
<value>26</value>
</property>
<property>
<name>security_groups</name>
<value>26</value>
</property>
<property>
<name>security_group_rules</name>
<value>26</value>
</property>
<property>
<name>floatingip</name>
<value>26</value>
</property>
<property>
<name>security_group_rule</name>
<value>26</value>
</property>
<property>
<name>security_group</name>
<value>26</value>
</property>
<property>
<name>network</name>
<value>26</value>
</property>
<property>
<name>subnet</name>
<value>26</value>
</property>
<property>
<name>port</name>
<value>26</value>
</property>
<property>
<name>router</name>
<value>26</value>
</property>
</properties>
</extension>
</extensions>
</tenant>
</tenants>
</esc_datamodel>
(注) |
展開データモデルのプロパティ名は、前述のコンピューティングおよびネットワークの設定名と一致している必要があります。テナント作成要求は拒否されます。
|
ノースバウンド API を使用したテナントの追加
次に、NETCONF を使用してテナント定義を作成する例を示します。
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<source>
<running />
</source>
<config>
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>mytenant</name>
</tenant>
</tenants>
</esc_datamodel>
</config>
</edit-config>
</rpc>
テナントのクォータの更新
ESC で作成されたテナントのクォータを更新できます。クォータの更新は、managed_resource 属性と vim_mapping 属性が true に設定されているテナントでのみ許可されます。ただし、name、vim_mapping、managed_resource、description
などの設定は更新できません。
次の展開データモデルは、テナントのクォータの 1 つまたは複数のプロパティを更新するプロセスを示しています。
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>ten-test-1</name>
<managed_resource>true</managed_resource>
<vim_mapping>true</vim_mapping>
<extensions>
<extension>
<name>quota</name>
<properties>
<property>
<name>cores</name>
<value>15</value>
</property>
<property>
<name>ram</name>
<value>10000</value>
</property>
</properties>
</extension>
</extensions>
</tenant>
</tenants>
</esc_datamodel>
次のデータモデルは、テナントのクォータのコアプロパティを変更する方法を示しています。
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>ten-test-1</name>
<managed_resource>true</managed_resource>
<vim_mapping>true</vim_mapping>
<extensions>
<extension>
<name>quota</name>
<properties>
<property>
<name>cores</name>
<value>20</value>
</property>
<property>
<name>ram</name>
<value>10000</value>
</property>
</properties>
</extension>
</extensions>
</tenant>
</tenants>
</esc_datamodel>
次のデータモデルは、存在しないプロパティをテナントのクォータに追加する方法を示しています。
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>ten-test-1</name>
<managed_resource>true</managed_resource>
<vim_mapping>true</vim_mapping>
<extensions>
<extension>
<name>quota</name>
<properties>
<property>
<name>cores</name>
<value>15</value>
</property>
<property>
<name>ram</name>
<value>10000</value>
</property>
<property>
<name>network</name>
<value>10</value>
</property>
</properties>
</extension>
</extensions>
</tenant>
</tenants>
</esc_datamodel>
次の例は、データモデルからプロパティを削除する方法を示しています。
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>ten-test-1</name>
<managed_resource>true</managed_resource>
<vim_mapping>true</vim_mapping>
<extensions>
<extension>
<name>quota</name>
<properties>
<property nc:operation="delete">
<name>cores</name>
<value>15</value>
</property>
<property>
<name>ram</name>
<value>10000</value>
</property>
</properties>
</extension>
</extensions>
</tenant>
</tenants>
</esc_datamodel>
(注) |
プロパティはデータモデルからのみ削除されます。クォータ値は、OpenStack 内のそのテナントに対しては同じままです。
|
REST API を使用したテナントクォータの更新
REST API を使用して、新しいテナントを作成したり、ESC の既存テナントのクォータを変更したりできます。
方式タイプ:
PUT
URL:/ESCManager/v0/tenants/[tenant_internal_id]
HTTP 要求ヘッダー:
internal_tenant_id:更新するテナント ID
callback:残りのコールバック通知を受信するアドレスとポート
Content-Type:application/xml
クォータを指定してテナントを作成する際の REST API の例。
<tenant xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<name>tenant_internal_id</name>
<managed_resource>true</managed_resource>
<extensions>
<extension>
<name>quota</name>
<properties>
<property>
<name>port</name>
<value>17</value>
</property>
<property>
<name>ram</name>
<value>17021</value>
</property>
<property>
<name>cores</name>
<value>22</value>
</property>
</properties>
</extension>
</extensions>
</tenant>
クォータを変更または追加してテナントを作成する際の REST API の例。
<tenant xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<name>tenant_internal_id</name>
<managed_resource>true</managed_resource>
<extensions>
<extension>
<name>quota</name>
<properties>
<property>
<name>port</name>
<value>20</value>
</property>
<property>
<name>ram</name>
<value>15000</value>
</property>
<property>
<name>network</name>
<value>5</value>
</property>
</properties>
</extension>
</extensions>
</tenant>