use of org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret in project ovirt-engine by oVirt.
the class ProviderSecretListModel method onRemoveSecret.
private void onRemoveSecret() {
ConfirmationModel model = (ConfirmationModel) getConfirmWindow();
if (model.getProgress() != null) {
return;
}
ArrayList<ActionParametersBase> parameters = new ArrayList<>();
for (LibvirtSecret libvirtSecret : getSelectedItems()) {
LibvirtSecretParameters param = new LibvirtSecretParameters(libvirtSecret);
parameters.add(param);
}
Frontend.getInstance().runMultipleAction(ActionType.RemoveLibvirtSecret, parameters, result -> cancel());
}
use of org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret in project ovirt-engine by oVirt.
the class BackendOpenStackVolumeAuthenticationKeyResource method remove.
@Override
public Response remove() {
LibvirtSecret libvirtSecret = map(get(), null);
LibvirtSecretParameters parameters = new LibvirtSecretParameters(libvirtSecret);
return performAction(ActionType.RemoveLibvirtSecret, parameters);
}
use of org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret in project ovirt-engine by oVirt.
the class LibvirtSecretDaoTest method generateNewEntity.
@Override
protected LibvirtSecret generateNewEntity() {
LibvirtSecret libvirtSecret = new LibvirtSecret();
libvirtSecret.setId(Guid.newGuid());
libvirtSecret.setValue("MTIzNDU2Cg==");
libvirtSecret.setUsageType(LibvirtSecretUsageType.CEPH);
libvirtSecret.setProviderId(FixturesTool.CINDER_PROVIDER_ID);
return libvirtSecret;
}
use of org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret in project ovirt-engine by oVirt.
the class CINDERStorageHelper method disconnectStorageFromDomainByVdsId.
@Override
public boolean disconnectStorageFromDomainByVdsId(StorageDomain storageDomain, Guid vdsId) {
Provider<?> provider = providerDao.get(Guid.createGuidFromString(storageDomain.getStorage()));
List<LibvirtSecret> libvirtSecrets = libvirtSecretDao.getAllByProviderId(provider.getId());
VDS vds = vdsDao.get(vdsId);
return unregisterLibvirtSecrets(storageDomain, vds, libvirtSecrets);
}
use of org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret in project ovirt-engine by oVirt.
the class BackendOpenStackVolumeAuthenticationKeysResourceTest method getEntity.
@Override
protected LibvirtSecret getEntity(int index) {
LibvirtSecret libvirtSecret = mock(LibvirtSecret.class);
when(libvirtSecret.getId()).thenReturn(GUIDS[index]);
when(libvirtSecret.getDescription()).thenReturn(DESCRIPTIONS[index]);
when(libvirtSecret.getProviderId()).thenReturn(GUIDS[0]);
when(libvirtSecret.getUsageType()).thenReturn(LibvirtSecretUsageType.CEPH);
return libvirtSecret;
}
Aggregations