mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 7451: Added network offering action events
status 7451: resolved fixed
This commit is contained in:
parent
675ffe23e8
commit
7a810d1df1
@ -2644,7 +2644,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||||||
throw new PermissionDeniedException("There's no way to confirm " + caller + " has access to zone:" + zone.getId());
|
throw new PermissionDeniedException("There's no way to confirm " + caller + " has access to zone:" + zone.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override @ActionEvent(eventType = EventTypes.EVENT_NETWORK_OFFERING_CREATE, eventDescription = "creating network offering")
|
||||||
public NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd) {
|
public NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd) {
|
||||||
Long userId = UserContext.current().getCallerUserId();
|
Long userId = UserContext.current().getCallerUserId();
|
||||||
String name = cmd.getNetworkOfferingName();
|
String name = cmd.getNetworkOfferingName();
|
||||||
@ -2722,6 +2722,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||||||
gatewayService, firewallService, lbService, vpnService, guestIpType, false);
|
gatewayService, firewallService, lbService, vpnService, guestIpType, false);
|
||||||
|
|
||||||
if ((offering = _networkOfferingDao.persist(offering)) != null) {
|
if ((offering = _networkOfferingDao.persist(offering)) != null) {
|
||||||
|
UserContext.current().setEventDetails(" Id: "+offering.getId()+" Name: "+name);
|
||||||
return offering;
|
return offering;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
@ -2809,9 +2810,10 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||||||
return _networkOfferingDao.search(sc, searchFilter);
|
return _networkOfferingDao.search(sc, searchFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override @ActionEvent(eventType = EventTypes.EVENT_NETWORK_OFFERING_DELETE, eventDescription = "deleting network offering")
|
||||||
public boolean deleteNetworkOffering(DeleteNetworkOfferingCmd cmd) {
|
public boolean deleteNetworkOffering(DeleteNetworkOfferingCmd cmd) {
|
||||||
Long offeringId = cmd.getId();
|
Long offeringId = cmd.getId();
|
||||||
|
UserContext.current().setEventDetails(" Id: "+offeringId);
|
||||||
|
|
||||||
// Verify network offering id
|
// Verify network offering id
|
||||||
NetworkOfferingVO offering = _networkOfferingDao.findById(offeringId);
|
NetworkOfferingVO offering = _networkOfferingDao.findById(offeringId);
|
||||||
@ -2833,13 +2835,14 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override @ActionEvent(eventType = EventTypes.EVENT_NETWORK_OFFERING_EDIT, eventDescription = "updating network offering")
|
||||||
public NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd) {
|
public NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd) {
|
||||||
String displayText = cmd.getDisplayText();
|
String displayText = cmd.getDisplayText();
|
||||||
Long id = cmd.getId();
|
Long id = cmd.getId();
|
||||||
String name = cmd.getNetworkOfferingName();
|
String name = cmd.getNetworkOfferingName();
|
||||||
String availabilityStr = cmd.getAvailability();
|
String availabilityStr = cmd.getAvailability();
|
||||||
Availability availability = null;
|
Availability availability = null;
|
||||||
|
UserContext.current().setEventDetails(" Id: "+id);
|
||||||
|
|
||||||
// Verify input parameters
|
// Verify input parameters
|
||||||
NetworkOfferingVO offeringToUpdate = _networkOfferingDao.findById(id);
|
NetworkOfferingVO offeringToUpdate = _networkOfferingDao.findById(id);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user