mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	api: add vpcname to networkacl response (#6207)
This PR fixes the vpc uuid in info card of network acls
This commit is contained in:
		
							parent
							
								
									9cc8da2a30
								
							
						
					
					
						commit
						ca8782b703
					
				| @ -43,6 +43,10 @@ public class NetworkACLResponse extends BaseResponse { | |||||||
|     @Param(description = "Id of the VPC this ACL is associated with") |     @Param(description = "Id of the VPC this ACL is associated with") | ||||||
|     private String vpcId; |     private String vpcId; | ||||||
| 
 | 
 | ||||||
|  |     @SerializedName(ApiConstants.VPC_NAME) | ||||||
|  |     @Param(description = "Name of the VPC this ACL is associated with") | ||||||
|  |     private String vpcName; | ||||||
|  | 
 | ||||||
|     @SerializedName(ApiConstants.FOR_DISPLAY) |     @SerializedName(ApiConstants.FOR_DISPLAY) | ||||||
|     @Param(description = "is ACL for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) |     @Param(description = "is ACL for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) | ||||||
|     private Boolean forDisplay; |     private Boolean forDisplay; | ||||||
| @ -63,6 +67,10 @@ public class NetworkACLResponse extends BaseResponse { | |||||||
|         this.vpcId = vpcId; |         this.vpcId = vpcId; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public void setVpcName(String vpcName) { | ||||||
|  |         this.vpcName = vpcName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     public void setForDisplay(Boolean forDisplay) { |     public void setForDisplay(Boolean forDisplay) { | ||||||
|         this.forDisplay = forDisplay; |         this.forDisplay = forDisplay; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -4438,6 +4438,7 @@ public class ApiResponseHelper implements ResponseGenerator { | |||||||
|         Vpc vpc = ApiDBUtils.findVpcById(networkACL.getVpcId()); |         Vpc vpc = ApiDBUtils.findVpcById(networkACL.getVpcId()); | ||||||
|         if (vpc != null) { |         if (vpc != null) { | ||||||
|             response.setVpcId(vpc.getUuid()); |             response.setVpcId(vpc.getUuid()); | ||||||
|  |             response.setVpcName(vpc.getName()); | ||||||
|         } |         } | ||||||
|         response.setObjectName("networkacllist"); |         response.setObjectName("networkacllist"); | ||||||
|         return response; |         return response; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user