mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	fixing disassociateIpAddress API to call 'releasePortableIpAddress'
network service method for portable ip address. Also fix ensures events coresponding to the portabl ip are generated correctly.
This commit is contained in:
		
							parent
							
								
									8b9d6d81a2
								
							
						
					
					
						commit
						b000781bfc
					
				@ -103,7 +103,7 @@ public class EventTypes {
 | 
			
		||||
    public static final String EVENT_NET_IP_ASSIGN = "NET.IPASSIGN";
 | 
			
		||||
    public static final String EVENT_NET_IP_RELEASE = "NET.IPRELEASE";
 | 
			
		||||
    public static final String EVENT_PORTABLE_IP_ASSIGN = "PORTABLE.IPASSIGN";
 | 
			
		||||
    public static final String EVENT_PORTABLE_IP_RELEASE = "PORTABLEIPRELEASE";
 | 
			
		||||
    public static final String EVENT_PORTABLE_IP_RELEASE = "PORTABLE.IPRELEASE";
 | 
			
		||||
    public static final String EVENT_NET_RULE_ADD = "NET.RULEADD";
 | 
			
		||||
    public static final String EVENT_NET_RULE_DELETE = "NET.RULEDELETE";
 | 
			
		||||
    public static final String EVENT_NET_RULE_MODIFY = "NET.RULEMODIFY";
 | 
			
		||||
 | 
			
		||||
@ -191,7 +191,11 @@ public class AssociateIPAddrCmd extends BaseAsyncCreateCmd {
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String getEventType() {
 | 
			
		||||
        return EventTypes.EVENT_NET_IP_ASSIGN;
 | 
			
		||||
        if (isPortable()) {
 | 
			
		||||
            return EventTypes.EVENT_PORTABLE_IP_ASSIGN;
 | 
			
		||||
        } else {
 | 
			
		||||
            return EventTypes.EVENT_NET_IP_ASSIGN;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
 | 
			
		||||
@ -78,7 +78,7 @@ public class DisassociateIPAddrCmd extends BaseAsyncCmd {
 | 
			
		||||
        if (!isPortable(id)) {
 | 
			
		||||
            result = _networkService.releaseIpAddress(getIpAddressId());
 | 
			
		||||
        } else {
 | 
			
		||||
            result = _networkService.releaseIpAddress(getIpAddressId());
 | 
			
		||||
            result = _networkService.releasePortableIpAddress(getIpAddressId());
 | 
			
		||||
        }
 | 
			
		||||
        if (result) {
 | 
			
		||||
            SuccessResponse response = new SuccessResponse(getCommandName());
 | 
			
		||||
@ -90,7 +90,11 @@ public class DisassociateIPAddrCmd extends BaseAsyncCmd {
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String getEventType() {
 | 
			
		||||
        return EventTypes.EVENT_NET_IP_RELEASE;
 | 
			
		||||
        if (!isPortable(id)) {
 | 
			
		||||
            return EventTypes.EVENT_NET_IP_RELEASE;
 | 
			
		||||
        } else {
 | 
			
		||||
            return EventTypes.EVENT_PORTABLE_IP_RELEASE;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user