@@ -161,7 +161,7 @@ public boolean start() {
161161 }
162162
163163 @ Override
164- @ ActionEvent (eventType = EventTypes .EVENT_FIREWALL_OPEN , eventDescription = "creating firewall rule" , create = true )
164+ @ ActionEvent (eventType = EventTypes .EVENT_FIREWALL_EGRESS_OPEN , eventDescription = "creating egress firewall rule for network " , create = true )
165165 public FirewallRule createEgressFirewallRule (FirewallRule rule ) throws NetworkRuleConflictException {
166166 Account caller = CallContext .current ().getCallingAccount ();
167167
@@ -612,13 +612,20 @@ public void removeRule(FirewallRule rule) {
612612 _firewallDao .remove (rule .getId ());
613613 }
614614
615+ @ Override
616+ @ ActionEvent (eventType = EventTypes .EVENT_FIREWALL_OPEN , eventDescription = "creating firewall rule" , async = true )
617+ public boolean applyIngressFwRules (long ipId , Account caller ) throws ResourceUnavailableException {
618+ return applyIngressFirewallRules (ipId , caller );
619+ }
620+
615621 @ Override
616622 public boolean applyIngressFirewallRules (long ipId , Account caller ) throws ResourceUnavailableException {
617623 List <FirewallRuleVO > rules = _firewallDao .listByIpAndPurpose (ipId , Purpose .Firewall );
618624 return applyFirewallRules (rules , false , caller );
619625 }
620626
621627 @ Override
628+ @ ActionEvent (eventType = EventTypes .EVENT_FIREWALL_EGRESS_OPEN , eventDescription = "creating egress firewall rule" , async = true )
622629 public boolean applyEgressFirewallRules (FirewallRule rule , Account caller ) throws ResourceUnavailableException {
623630 List <FirewallRuleVO > rules = _firewallDao .listByNetworkPurposeTrafficType (rule .getNetworkId (), Purpose .Firewall , FirewallRule .TrafficType .Egress );
624631 return applyFirewallRules (rules , false , caller );
@@ -719,15 +726,36 @@ protected boolean revokeFirewallRule(long ruleId, boolean apply, Account caller,
719726
720727 @ Override
721728 @ ActionEvent (eventType = EventTypes .EVENT_FIREWALL_CLOSE , eventDescription = "revoking firewall rule" , async = true )
722- public boolean revokeFirewallRule (long ruleId , boolean apply ) {
729+ public boolean revokeIngressFwRule (long ruleId , boolean apply ) {
730+ return revokeIngressFirewallRule (ruleId , apply );
731+ }
732+
733+
734+ @ Override
735+ public boolean revokeIngressFirewallRule (long ruleId , boolean apply ) {
736+ Account caller = CallContext .current ().getCallingAccount ();
737+ long userId = CallContext .current ().getCallingUserId ();
738+ return revokeFirewallRule (ruleId , apply , caller , userId );
739+ }
740+
741+ @ Override
742+ @ ActionEvent (eventType = EventTypes .EVENT_FIREWALL_EGRESS_CLOSE , eventDescription = "revoking egress firewall rule" , async = true )
743+ public boolean revokeEgressFirewallRule (long ruleId , boolean apply ) {
723744 Account caller = CallContext .current ().getCallingAccount ();
724745 long userId = CallContext .current ().getCallingUserId ();
725746 return revokeFirewallRule (ruleId , apply , caller , userId );
726747 }
727748
728749 @ Override
729750 @ ActionEvent (eventType = EventTypes .EVENT_FIREWALL_UPDATE , eventDescription = "updating firewall rule" , async = true )
730- public FirewallRule updateFirewallRule (long ruleId , String customId , Boolean forDisplay ) {
751+ public FirewallRule updateIngressFirewallRule (long ruleId , String customId , Boolean forDisplay ) {
752+ Account caller = CallContext .current ().getCallingAccount ();
753+ return updateFirewallRule (ruleId , customId , caller , forDisplay );
754+ }
755+
756+ @ Override
757+ @ ActionEvent (eventType = EventTypes .EVENT_FIREWALL_EGRESS_UPDATE , eventDescription = "updating egress firewall rule" , async = true )
758+ public FirewallRule updateEgressFirewallRule (long ruleId , String customId , Boolean forDisplay ) {
731759 Account caller = CallContext .current ().getCallingAccount ();
732760 return updateFirewallRule (ruleId , customId , caller , forDisplay );
733761 }
@@ -881,7 +909,7 @@ public boolean revokeRelatedFirewallRule(long ruleId, boolean apply) {
881909 }
882910
883911 s_logger .debug ("Revoking Firewall rule id=" + fwRule .getId () + " as a part of rule delete id=" + ruleId + " with apply=" + apply );
884- return revokeFirewallRule (fwRule .getId (), apply );
912+ return revokeIngressFirewallRule (fwRule .getId (), apply );
885913
886914 }
887915
0 commit comments