A tenant identifies a tenant organization or group that is associated with a set of administrators. When you create tenant
definitions, the data stored on both regional and local clusters is segmented by tenant. A tenant cannot access the data of
another tenant. You can use NETCONF/ REST interface, or the ESC portal to create a tenant definition through ESC.
 Note |
Tenants are not supported on VMware vCenter.
|
Three types of tenants can be created in ESC:
-
Tenant on the VIM (ESC creates the tenant)—ESC creates and uses the tenant for deployments on default VIM. ESC can delete
this tenant.
-
Pre-existing (out-of-band) tenant on the VIM—ESC does not create this tenant, but uses the tenant for deployments on default
VIM only. The admin tenant, for example, is a pre-existing tenant, where the ESC itself is deployed. ESC supports deploying
resources such as flavors, images and volumes on a pre-existing tenant that is identified by its name or UUID. ESC manages
a pre-existing tenant for default VIM only. ESC cannot delete a pre-existing tenant.
-
Tenant within ESC—ESC creates a tenant within ESC, which is independent of any VIM. This tenant acts as the root tenant for
deploying VMs on multiple VIMs.
Note that the tenant name must be unique.
 Note |
ESC can create and manage resources such as tenants, networks, subnetworks, images and flavors on the default VIM only. Only
deployments are supported on the non-default VIMs (other than the default VIM).
|
The following attributes manage the tenants in the data model.
The table below further explains the tenant and the attribute mapping in the data model.
Tenant Type
|
managed_resource
|
vim_mapping
|
Description
|
Tenant on the VIM(created by ESC)
|
true
|
true
|
ESC creates a tenant on the VIM if the managed_resource attribute is set to true. By default, the managed_resource is true.
The vim_mapping attribute is true.
<tenants>
<tenant>
<name>new-tenant</name>
<managed_resource>true</managed_resource>
</tenant>
</tenants>
|
Pre-existing tenant on the VIM
|
false
|
true
|
For a pre-existing tenant, the managed_resource attribute is set to false. The vim_mapping attribute is true.
<tenants>
<tenant>
<name>pre-existing</name>
<managed_resource>false</managed_resource>
</tenant>
</tenants>
Sample data model using the tenant UUID
<tenants>
<tenant>
<name>76eedcae-6067-44a7-b733-fc99a2e50bdf</name>
<managed_resource>false</managed_resource>
</tenant>
</tenants>
|
Tenant within ESC
|
-
|
false
|
The vim_mapping attribute is set to false to create a tenant within ESC.
<tenants>
<tenant>
<name>esc-tenant-A</name>
<vim_mapping>false</vim_mapping>
</tenant>
</tenants>
|
-
|
false
|
false
|
Tenant is not created. The request is rejected by ESC.
|
To deploy VMs on multiple VIMs of the same type (OpenStack VIMs), you must create a tenant with the vim_mapping attribute
set to false. This tenant can be created independently or as part of the deployment. This creates a tenant within ESC, which
acts as the root tenant for multi VIM deployments. A VIM locator attribute must be specified within the each vm group for
multi VIM deployment. For more details, see Deploying VNFs on Single VMware vCenter VIM.
Tenant Quotas
You can set the operational limit, known as quotas for the tenants created in ESC. The quotas can be set during the deployment
using the deployment datamodel.
 Note |
Tenant Quotas are not supported on pre-existing tenants and tenants within ESC.
|
The tenant supports the following quota settings for Compute (Nova) and Network (Neutron):
Compute settings:
Compute settings:
-
floatingip
-
security_group_rule
-
security_group
-
network
-
subnet
-
port
-
router
The deployment datamodel below shows the quota settings for the tenant.
<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>
 Note |
The property name in the deployment datamodel must match the compute and network setting names mentioned above. The tenant
creation request is rejected.
|
Adding Tenants Using Northbound APIs
The following example explains how to create a tenant definition using 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>
Updating Quotas for Tenants
You can update the quotas for the tenants created in ESC. The quota update is only allowed on the tenants for which managed_resource
and vim_mapping attributes are set to true. However, updating other configurations, for example, name, vim_mapping, managed_resource,
and description are not allowed.
The following deployment data model below shows the process of updating one or multiple properties of quota for the tenants.
<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>
The following data model shows how to modify the core properties of the quota of a tenant.
<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>
The following data model shows how to add a non-existing property to the quota of a tenant.
<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>
The following example shows how to delete a property from the data model.
<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>
 Note |
The property gets deleted from the data model only. The quota values remain the same for that tenant in the OpenStack.
|
Updating Tenant Quotas with REST API
You can use REST API to create new tenants, or modify quotas of an existing tenant in ESC.
Method Type:
PUT
URL: /ESCManager/v0/tenants/[tenant_internal_id]
HTTP Request Headers:
internal_tenant_id : is the tenant ID to be updated
callback : address and port to receive rest callback notifications
Content-Type : application/xml
Example of REST API while creating a tenant with quotas.
<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>
Example of REST API while creating a tenant with modified or added quotas.
<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>