class MsoTenantAdapterImpl implements MsoTenantAdapter {

    @Override
    public void rollbackTenant(TenantRollback rollback) throws TenantException {
        // rollback may be null (e.g. if stack already existed when Create was called)
        if (rollback == null) {
            logger.warn("{} {} rollbackTenant, rollback is null", MessageEnum.RA_ROLLBACK_NULL,
                    ErrorCode.DataError.getValue());
            return;
        }

        // Get the elements of the VnfRollback object for easier access
        String cloudSiteId = rollback.getCloudId();
        String tenantId = rollback.getTenantId();

        logger.debug("Rolling Back Tenant {} in {}", rollback.getTenantId(), cloudSiteId);

        if (rollback.getTenantCreated()) {
            try {

                MsoTenantUtils tUtils = tFactory.getTenantUtils(cloudSiteId);
                tUtils.deleteTenant(tenantId, cloudSiteId);
            } catch (MsoException me) {
                me.addContext(ROLLBACK_TENANT);
                // Failed to delete the tenant.
                logger.error("{} {} Exception - rollbackTenant {}: ", MessageEnum.RA_ROLLBACK_TENANT_ERR,
                        ErrorCode.DataError.getValue(), tenantId, me);
                throw new TenantException(me);
            }
        }
        return;
    }

}