public class MsoKeystoneUtils extends MsoTenantUtils
cloudConfig, cloudConfigFactory, msoPropFactory, msoProps
alarmLogger, retryCodesDefault, retryCodesProp, retryCountDefault, retryCountProp, retryDelayDefault, retryDelayProp
Constructor and Description |
---|
MsoKeystoneUtils(String msoPropID) |
Modifier and Type | Method and Description |
---|---|
static void |
adminCacheCleanup()
Clean up the Admin client cache to remove expired entries.
|
static void |
adminCacheReset()
Reset the Admin client cache.
|
String |
createTenant(String tenantName,
String cloudSiteId,
Map<String,String> metadata,
boolean backout)
Create a tenant with the specified name in the given cloud.
|
boolean |
deleteTenant(String tenantId,
String cloudSiteId)
Delete the specified Tenant (by ID) in the given cloud.
|
boolean |
deleteTenantByName(String tenantName,
String cloudSiteId)
Delete the specified Tenant (by Name) in the given cloud.
|
com.woorea.openstack.keystone.model.Tenant |
findTenantByName(com.woorea.openstack.keystone.Keystone adminClient,
String tenantName) |
com.woorea.openstack.keystone.model.Tenant |
findTenantByNameOrId(com.woorea.openstack.keystone.Keystone adminClient,
String tenantNameOrId) |
com.woorea.openstack.keystone.model.User |
findUserByName(com.woorea.openstack.keystone.Keystone adminClient,
String userName) |
com.woorea.openstack.keystone.Keystone |
getKeystoneAdminClient(CloudSite cloudSite) |
MsoTenant |
queryTenant(String tenantId,
String cloudSiteId)
Query for a tenant by ID in the given cloud.
|
MsoTenant |
queryTenantByName(String tenantName,
String cloudSiteId)
Query for a tenant with the specified name in the given cloud.
|
executeAndRecordOpenstackRequest, executeAndRecordOpenstackRequest, heatExceptionToMsoException, isNullOrEmpty, keystoneErrorToMsoException, neutronExceptionToMsoException, runtimeExceptionToMsoException
public MsoKeystoneUtils(String msoPropID)
public String createTenant(String tenantName, String cloudSiteId, Map<String,String> metadata, boolean backout) throws MsoException
For the AIC Cloud (DCP/LCP): it is not clear that cloudId is needed, as all admin requests go to the centralized identity service in DCP. However, if some artifact must exist in each local LCP instance as well, then it will be needed to access the correct region.
createTenant
in class MsoTenantUtils
tenantName
- The tenant name to createcloudId
- The cloud identifier (may be a region) in which to create the tenant.MsoTenantAlreadyExists
- Thrown if the requested tenant already existsMsoOpenstackException
- Thrown if the Openstack API call returns an exceptionMsoException
public MsoTenant queryTenant(String tenantId, String cloudSiteId) throws MsoException, MsoCloudSiteNotFound
For the AIC Cloud (DCP/LCP): it is not clear that cloudId is needed, as all admin requests go to the centralized identity service in DCP. However, if some artifact must exist in each local LCP instance as well, then it will be needed to access the correct region.
queryTenant
in class MsoTenantUtils
tenantId
- The Openstack ID of the tenant to querycloudSiteId
- The cloud identifier (may be a region) in which to query the tenant.MsoOpenstackException
- Thrown if the Openstack API call returns an exceptionMsoException
MsoCloudSiteNotFound
public MsoTenant queryTenantByName(String tenantName, String cloudSiteId) throws MsoException
For the AIC Cloud (DCP/LCP): it is not clear that cloudId is needed, as all admin requests go to the centralized identity service in DCP. However, if some artifact must exist in each local LCP instance as well, then it will be needed to access the correct region.
queryTenantByName
in class MsoTenantUtils
tenantName
- The name of the tenant to querycloudSiteId
- The cloud identifier (may be a region) in which to query the tenant.MsoOpenstackException
- Thrown if the Openstack API call returns an exceptionMsoException
public boolean deleteTenant(String tenantId, String cloudSiteId) throws MsoException
Note for the AIC Cloud (DCP/LCP): all admin requests go to the centralized identity service in DCP. So deleting a tenant from one cloudSiteId will remove it from all sites managed by that identity service.
deleteTenant
in class MsoTenantUtils
tenantId
- The Openstack ID of the tenant to deletecloudSiteId
- The cloud identifier from which to delete the tenant.MsoOpenstackException
- If the Openstack API call returns an exception.MsoException
public boolean deleteTenantByName(String tenantName, String cloudSiteId) throws MsoException
Note for the AIC Cloud (DCP/LCP): all admin requests go to the centralized identity service in DCP. So deleting a tenant from one cloudSiteId will remove it from all sites managed by that identity service.
tenantName
- The name of the tenant to deletecloudSiteId
- The cloud identifier from which to delete the tenant.MsoOpenstackException
- If the Openstack API call returns an exception.MsoException
public com.woorea.openstack.keystone.Keystone getKeystoneAdminClient(CloudSite cloudSite) throws MsoException
MsoException
public com.woorea.openstack.keystone.model.Tenant findTenantByNameOrId(com.woorea.openstack.keystone.Keystone adminClient, String tenantNameOrId)
public com.woorea.openstack.keystone.model.Tenant findTenantByName(com.woorea.openstack.keystone.Keystone adminClient, String tenantName)
public com.woorea.openstack.keystone.model.User findUserByName(com.woorea.openstack.keystone.Keystone adminClient, String userName)
public static void adminCacheCleanup()
public static void adminCacheReset()
Copyright © 2017 OPENECOMP - MSO. All rights reserved.