bernardodemarco commented on code in PR #12864:
URL: https://github.com/apache/cloudstack/pull/12864#discussion_r3268645739


##########
engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql:
##########
@@ -131,3 +131,6 @@ CREATE TABLE IF NOT EXISTS 
`cloud_usage`.`quota_tariff_usage` (
 -- Add the 'keep_mac_address_on_public_nic' column to the 'cloud.networks' and 
'cloud.vpc' tables
 CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.networks', 
'keep_mac_address_on_public_nic', 'TINYINT(1) NOT NULL DEFAULT 1');
 CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.vpc', 
'keep_mac_address_on_public_nic', 'TINYINT(1) NOT NULL DEFAULT 1');
+
+-- Add description for secondary IP addresses
+CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.nic_secondary_ips','description', 
'varchar(2048) DEFAULT NULL');

Review Comment:
   ```suggestion
   CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.nic_secondary_ips', 
'description', 'VARCHAR(2048) DEFAULT NULL');
   ```



##########
api/src/main/java/org/apache/cloudstack/api/response/NicSecondaryIpResponse.java:
##########
@@ -53,6 +53,10 @@ public class NicSecondaryIpResponse extends BaseResponse {
     @Param(description = "The ID of the Instance")
     private String vmId;
 
+    @SerializedName(ApiConstants.DESCRIPTION)
+    @Param(description = "description")

Review Comment:
   ```suggestion
       @Param(description = "Description of the secondary IP address")
   ```



##########
api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java:
##########
@@ -56,6 +56,9 @@ public class AddIpToVmNicCmd extends BaseAsyncCreateCmd {
     @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, 
required = false, description = "Secondary IP Address")
     private String ipAddr;
 
+    @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, 
required = false, description = "Description", length = 2048)

Review Comment:
   ```suggestion
       @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, 
required = false, description = "Description of the secondary IP address", 
length = 2048)
   ```



##########
ui/src/views/network/NicsTable.vue:
##########
@@ -39,7 +39,7 @@
           {{ record.traffictype }}
         </a-descriptions-item>
         <a-descriptions-item :label="$t('label.secondaryips')" 
v-if="record.secondaryip && record.secondaryip.length > 0 && record.type !== 
'L2'">
-          {{ record.secondaryip.map(x => x.ipaddress).join(', ') }}
+          {{ record.secondaryip.map(x => x.description ? (x.ipaddress + ': ' + 
x.description) : x.ipaddress).join(', ') }}

Review Comment:
   ```suggestion
             {{ record.secondaryip.map(secondaryIp => secondaryIp.description ? 
(secondaryIp.ipaddress + ': ' + secondaryIp.description) : 
secondaryIp.ipaddress).join(', ') }}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to