use of com.cloud.user.AccountDetailVO in project cloudstack by apache.
the class SolidFirePrimaryDataStoreDriver method getCreateSolidFireAccountId.
private long getCreateSolidFireAccountId(SolidFireUtil.SolidFireConnection sfConnection, long csAccountId, long storagePoolId) {
AccountDetailVO accountDetail = SolidFireUtil.getAccountDetail(csAccountId, storagePoolId, accountDetailsDao);
if (accountDetail == null || accountDetail.getValue() == null) {
AccountVO account = accountDao.findById(csAccountId);
String sfAccountName = SolidFireUtil.getSolidFireAccountName(account.getUuid(), account.getAccountId());
SolidFireUtil.SolidFireAccount sfAccount = SolidFireUtil.getAccount(sfConnection, sfAccountName);
if (sfAccount == null) {
sfAccount = createSolidFireAccount(sfConnection, sfAccountName);
}
SolidFireUtil.updateCsDbWithSolidFireAccountInfo(account.getId(), sfAccount, storagePoolId, accountDetailsDao);
accountDetail = SolidFireUtil.getAccountDetail(csAccountId, storagePoolId, accountDetailsDao);
}
return Long.parseLong(accountDetail.getValue());
}
Aggregations