use of com.emc.storageos.ecs.api.UserSecretKeysAddCommandResult in project coprhd-controller by CoprHD.
the class ECSObjectStorageDevice method doAddUserSecretKey.
@Override
public ObjectUserSecretKey doAddUserSecretKey(StorageSystem storageObj, String userId, String secretKey) throws InternalException {
ECSApi ecsApi = getAPI(storageObj);
ObjectUserSecretKey secretKeyRes = new ObjectUserSecretKey();
try {
UserSecretKeysAddCommandResult cmdRes = ecsApi.addUserSecretKey(userId, secretKey);
// secretKeyRes.setSecret_key_1(cmdRes.getSecret_key()); //for security reason hiding the secrete key
secretKeyRes.setSecret_key_1_expiry_timestamp(cmdRes.getKey_expiry_timestamp());
return secretKeyRes;
} catch (Exception e) {
_log.error("ECSObjectStorageDevice:doAddUserSecretKey failed");
throw e;
}
}
Aggregations