[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16610758#comment-16610758 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner closed pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/api/src/main/java/com/cloud/network/NetworkModel.java b/api/src/main/java/com/cloud/network/NetworkModel.java index a5bf5e44610..002271ab854 100644 --- a/api/src/main/java/com/cloud/network/NetworkModel.java +++ b/api/src/main/java/com/cloud/network/NetworkModel.java @@ -282,7 +282,7 @@ boolean isNetworkInlineMode(Network network); -boolean isIP6AddressAvailableInNetwork(long networkId); +boolean areThereIPv6AddressAvailableInNetwork(long networkId); boolean isIP6AddressAvailableInVlan(long vlanId); diff --git a/api/src/main/java/com/cloud/network/NetworkService.java b/api/src/main/java/com/cloud/network/NetworkService.java index d76d6597202..aa33defba93 100644 --- a/api/src/main/java/com/cloud/network/NetworkService.java +++ b/api/src/main/java/com/cloud/network/NetworkService.java @@ -34,6 +34,7 @@ import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; +import com.cloud.network.Network.IpAddresses; import com.cloud.network.Network.Service; import com.cloud.network.Networks.TrafficType; import com.cloud.network.vpc.Vpc; @@ -155,15 +156,6 @@ PhysicalNetworkTrafficType addTrafficTypeToPhysicalNetwork(Long physicalNetworkI List getIsolatedNetworksWithSourceNATOwnedByAccountInZone(long zoneId, Account owner); -/** - * @param networkId - * @param entityId - * @return - * @throws ConcurrentOperationException - * @throws ResourceUnavailableException - * @throws ResourceAllocationException - * @throws InsufficientAddressCapacityException - */ IpAddress associateIPToNetwork(long ipId, long networkId) throws InsufficientAddressCapacityException, ResourceAllocationException, ResourceUnavailableException, ConcurrentOperationException; @@ -189,12 +181,16 @@ Network createPrivateNetwork(String networkName, String displayText, long physic String netmask, long networkOwnerId, Long vpcId, Boolean sourceNat, Long networkOfferingId) throws ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException; -/* Requests an IP address for the guest nic */ -NicSecondaryIp allocateSecondaryGuestIP(long nicId, String ipaddress) throws InsufficientAddressCapacityException; +/** + * Requests an IP address for the guest NIC + */ +NicSecondaryIp allocateSecondaryGuestIP(long nicId, IpAddresses requestedIpPair) throws InsufficientAddressCapacityException; boolean releaseSecondaryIpFromNic(long ipAddressId); -/* lists the nic informaton */ +/** + * lists the NIC information + */ List listNics(ListNicsCmd listNicsCmd); Map getNetworkOfferingServiceCapabilities(NetworkOffering offering, Service service); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java index 009c4fd2fdf..ba465ad4259 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java @@ -29,7 +29,6 @@ import org.apache.log4j.Logger; import com.cloud.dc.DataCenter; -import com.cloud.dc.DataCenter.NetworkType; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientAddressCapacityException; @@ -38,6 +37,7 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.Network; +import com.cloud.network.Network.IpAddresses; import com.cloud.utils.net.NetUtils; import com.cloud.vm.Nic; import com.cloud.vm.NicSecondaryIp; @@ -78,20 +78,6 @@ public long getNicId() { return nicId; } -private String getIpaddress() { -if (ipAddr != null) { -return ipAddr; -} else { -return null; -} -} - -private NetworkType getNetworkType() { -Network ntwk = _entityMgr.findById(Network.class, getNetworkId()); -DataCenter dc = _entityMgr.findById(DataCenter.class, ntwk.getDataCenterId()); -
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16609745#comment-16609745 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - blueorangutan commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-420046516 Trillian test result (tid-2995) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 31560 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2773-t2995-kvm-centos7.zip Intermittent failure detected: /marvin/tests/smoke/test_multipleips_per_nic.py Intermittent failure detected: /marvin/tests/smoke/test_primary_storage.py Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py Intermittent failure detected: /marvin/tests/smoke/test_public_ip_range.py Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py Intermittent failure detected: /marvin/tests/smoke/test_templates.py Intermittent failure detected: /marvin/tests/smoke/test_usage.py Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py Intermittent failure detected: /marvin/tests/smoke/test_volumes.py Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py Smoke tests completed. 58 look OK, 11 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_nic_secondaryip_add_remove | `Error` | 34.07 | test_multipleips_per_nic.py test_01_add_primary_storage_disabled_host | `Error` | 0.66 | test_primary_storage.py test_01_primary_storage_nfs | `Error` | 0.14 | test_primary_storage.py ContextSuite context=TestStorageTags>:setup | `Error` | 0.24 | test_primary_storage.py test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 1156.18 | test_privategw_acl.py test_02_list_snapshots_with_removed_data_store | `Error` | 1.19 | test_snapshots.py test_04_extract_template | `Failure` | 128.37 | test_templates.py ContextSuite context=TestISOUsage>:setup | `Error` | 0.00 | test_usage.py test_01_secure_vm_migration | `Error` | 53.38 | test_vm_life_cycle.py test_02_unsecure_vm_migration | `Error` | 68.41 | test_vm_life_cycle.py test_03_secured_to_nonsecured_vm_migration | `Error` | 42.47 | test_vm_life_cycle.py test_08_migrate_vm | `Error` | 14.92 | test_vm_life_cycle.py test_06_download_detached_volume | `Failure` | 137.65 | test_volumes.py test_01_redundant_vpc_site2site_vpn | `Failure` | 326.38 | test_vpc_vpn.py test_01_cancel_host_maintenace_with_no_migration_jobs | `Failure` | 0.13 | test_host_maintenance.py test_02_cancel_host_maintenace_with_migration_jobs | `Error` | 3.37 | test_host_maintenance.py test_hostha_enable_ha_when_host_in_maintenance | `Error` | 3.63 | test_hostha_kvm.py This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16609009#comment-16609009 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - blueorangutan commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-419873861 @borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16609007#comment-16609007 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - borisstoyanov commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-419873669 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16609000#comment-16609000 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - blueorangutan commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-419870768 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2291 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16608967#comment-16608967 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - blueorangutan commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-419862193 @borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16608966#comment-16608966 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - borisstoyanov commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-419862118 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16608570#comment-16608570 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-419744567 @borisstoyanov Rebased against latest master. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16597701#comment-16597701 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-417398264 Sure @borisstoyanov! I will rebase it against the latest master, thanks :+1: This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16597063#comment-16597063 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-417190831 @borisstoyanov do you know if some of these failures are false positives? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16591491#comment-16591491 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r212595765 ## File path: server/src/main/java/com/cloud/api/ApiResponseHelper.java ## @@ -3623,7 +3623,11 @@ public NicSecondaryIpResponse createSecondaryIPToNicResponse(NicSecondaryIp resu NicVO nic = _entityMgr.findById(NicVO.class, result.getNicId()); NetworkVO network = _entityMgr.findById(NetworkVO.class, result.getNetworkId()); response.setId(result.getUuid()); -response.setIpAddr(result.getIp4Address()); +if (result.getIp4Address() != null) { Review comment: Done. Thanks, @rafaelweingartner. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590898#comment-16590898 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - blueorangutan commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-415595045 Trillian test result (tid-2962) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 37960 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2773-t2962-kvm-centos7.zip Intermitten failure detected: /marvin/tests/smoke/test_multipleips_per_nic.py Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py Intermitten failure detected: /marvin/tests/smoke/test_public_ip_range.py Intermitten failure detected: /marvin/tests/smoke/test_templates.py Intermitten failure detected: /marvin/tests/smoke/test_usage.py Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py Intermitten failure detected: /marvin/tests/smoke/test_volumes.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py Smoke tests completed. 62 look OK, 7 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_nic_secondaryip_add_remove | `Error` | 31.28 | test_multipleips_per_nic.py test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 1120.18 | test_privategw_acl.py test_04_extract_template | `Failure` | 128.33 | test_templates.py ContextSuite context=TestISOUsage>:setup | `Error` | 0.00 | test_usage.py test_01_secure_vm_migration | `Error` | 132.75 | test_vm_life_cycle.py test_02_unsecure_vm_migration | `Error` | 131.73 | test_vm_life_cycle.py test_03_secured_to_nonsecured_vm_migration | `Error` | 132.75 | test_vm_life_cycle.py test_04_nonsecured_to_secured_vm_migration | `Error` | 132.73 | test_vm_life_cycle.py test_08_migrate_vm | `Error` | 15.68 | test_vm_life_cycle.py test_06_download_detached_volume | `Failure` | 136.56 | test_volumes.py test_05_rvpc_multi_tiers | `Failure` | 293.29 | test_vpc_redundant.py test_05_rvpc_multi_tiers | `Error` | 316.10 | test_vpc_redundant.py This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590122#comment-16590122 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - blueorangutan commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-415385987 @borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590121#comment-16590121 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - borisstoyanov commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-415385833 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590058#comment-16590058 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - blueorangutan commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-415371108 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2265 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590007#comment-16590007 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - blueorangutan commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-415362834 @borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590005#comment-16590005 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - borisstoyanov commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-415362661 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16585812#comment-16585812 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-414283876 @borisstoyanov I did not make me clear, sorry. The code is fully covered with JUnit tests, that means that any added method has been tested with different entries and the expected behavior have been asserted. I have been testing this feature for advanced and basic networks and it is stable. I think that a future PR with Continuous Integration testing this and other actions with IPv6 would be great; however, for now, we are ok and covered with Unit tests. @rafaelweingartner this PR adds a function to the API that should be ok for any hypervisor. However, I have not been testing it with multiple hypervisors. The PR #2028 from @wido allows to have multiple IPv6 addresses per NIC as well as it ensures that IPv6 will work within the security groups scope; the PR #2028 tackles not only KVM (at least KVM and XenServer are covered in that PR). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16565718#comment-16565718 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-409664131 @GabrielBrascher is this only to KVM? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16565291#comment-16565291 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r206869611 ## File path: server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java ## @@ -400,7 +405,13 @@ public UserVmResponse setUserVmResponse(ResponseView view, UserVmResponse userVm for (NicSecondaryIpVO ip : secondaryIps) { NicSecondaryIpResponse ipRes = new NicSecondaryIpResponse(); ipRes.setId(ip.getUuid()); -ipRes.setIpAddr(ip.getIp4Address()); + +String ipAddr = ip.getIp4Address(); Review comment: here This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16565290#comment-16565290 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r206868794 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java ## @@ -169,17 +161,15 @@ public long getEntityOwnerId() { @Override public void create() throws ResourceAllocationException { -String ip; NicSecondaryIp result; -String secondaryIp = null; -if ((ip = getIpaddress()) != null) { -if (!NetUtils.isValidIp4(ip)) { -throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid ip address " + ip); -} + +IpAddresses requestedIpPair = new IpAddresses(ipAddr, null); +if (!NetUtils.isIpv4(ipAddr)) { +requestedIpPair = new IpAddresses(null, ipAddr); } try { -result = _networkService.allocateSecondaryGuestIP(getNicId(), getIpaddress()); +result = _networkService.allocateSecondaryGuestIP(getNicId(), requestedIpPair); Review comment: What about sending the command to `allocateSecondaryGuestIP`? Then, you can extract the block 166-168 to a method and unit-test it there. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16565294#comment-16565294 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r206870388 ## File path: server/src/main/java/com/cloud/network/Ipv6AddressManagerImpl.java ## @@ -150,4 +163,101 @@ public void revokeDirectIpv6Address(long networkId, String ip6Address) { _ipv6Dao.remove(ip.getId()); } } + +/** + * Executes method {@link #acquireGuestIpv6Address(Network, String)} and returns the requested IPv6 (String) in case of successfully allocating the guest IPv6 address. + */ +@Override +public String allocateGuestIpv6(Network network, String requestedIpv6) throws InsufficientAddressCapacityException { +return acquireGuestIpv6Address(network, requestedIpv6); +} + +/** + * Allocates a guest IPv6 address for the guest NIC. It will throw exceptions in the following cases: + * + *there is no IPv6 address available in the network; + *IPv6 address is equals to the Gateway; + *the network offering is empty; + *the IPv6 address is not in the network; + *the the requested IPv6 address is already in use in the network. + * + */ +@Override +@DB +public String acquireGuestIpv6Address(Network network, String requestedIpv6) throws InsufficientAddressCapacityException { +if (!_networkModel.isIP6AddressAvailableInNetwork(network.getId())) { Review comment: What about `areThereIPv6AddressAvailableInNetwork` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16565292#comment-16565292 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r206869423 ## File path: server/src/main/java/com/cloud/api/ApiResponseHelper.java ## @@ -3623,7 +3623,11 @@ public NicSecondaryIpResponse createSecondaryIPToNicResponse(NicSecondaryIp resu NicVO nic = _entityMgr.findById(NicVO.class, result.getNicId()); NetworkVO network = _entityMgr.findById(NetworkVO.class, result.getNetworkId()); response.setId(result.getUuid()); -response.setIpAddr(result.getIp4Address()); +if (result.getIp4Address() != null) { Review comment: would you mind extracting the block 3626-3630 to a method? You can then unit test it. Moreover, it looks like this block is also used at 3713-3717 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16565293#comment-16565293 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r206869534 ## File path: server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java ## @@ -267,15 +267,20 @@ public UserVmResponse newUserVmResponse(ResponseView view, String objectName, Us for (NicSecondaryIpVO ip : secondaryIps) { NicSecondaryIpResponse ipRes = new NicSecondaryIpResponse(); ipRes.setId(ip.getUuid()); -ipRes.setIpAddr(ip.getIp4Address()); + +String secIpAddr = ip.getIp4Address(); Review comment: Here as well. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16565193#comment-16565193 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-409553727 @borisstoyanov @rafaelweingartner I updated the code enhancing documentation and unit tests. @borisstoyanov the added methods are covered with unit tests, for now, adding Marvin would make this PR too big (we don't have a code base for IPv6 Marvin tests). However, it might be interesting to prepare a PR in the future to cover all CloudStack IPv6 actions with Marvin tests. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16559917#comment-16559917 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205816775 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java ## @@ -169,17 +161,25 @@ public long getEntityOwnerId() { @Override public void create() throws ResourceAllocationException { -String ip; NicSecondaryIp result; -String secondaryIp = null; -if ((ip = getIpaddress()) != null) { -if (!NetUtils.isValidIp4(ip)) { -throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid ip address " + ip); +boolean isIpv4 = true; Review comment: Thanks, @rafaelweingartner. Updated it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16559915#comment-16559915 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205816555 ## File path: server/src/main/java/com/cloud/network/IpAddressManagerImpl.java ## @@ -300,6 +300,8 @@ Boolean.class, "system.vm.public.ip.reservation.mode.strictness", "false", "If enabled, the use of System VMs public IP reservation is strict, preferred if not.", false, ConfigKey.Scope.Global); +Random rand = new Random(System.currentTimeMillis()); Review comment: Done :) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558821#comment-16558821 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-408215215 @rafaelweingartner @rhtyd the Travis is ok now, fixed the missing Apache license. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558192#comment-16558192 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205415983 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java ## @@ -169,17 +161,25 @@ public long getEntityOwnerId() { @Override public void create() throws ResourceAllocationException { -String ip; NicSecondaryIp result; -String secondaryIp = null; -if ((ip = getIpaddress()) != null) { -if (!NetUtils.isValidIp4(ip)) { -throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid ip address " + ip); +boolean isIpv4 = true; Review comment: What about moving this validation to a "service" layer? This is the "view/controller" part of the design. It should only receive the request, get the data and dispatch to the service layer where the business gets done. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558187#comment-16558187 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205417670 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java ## @@ -169,17 +161,25 @@ public long getEntityOwnerId() { @Override public void create() throws ResourceAllocationException { -String ip; NicSecondaryIp result; -String secondaryIp = null; -if ((ip = getIpaddress()) != null) { -if (!NetUtils.isValidIp4(ip)) { -throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid ip address " + ip); +boolean isIpv4 = true; + +if (ipAddr != null) { +if (!NetUtils.isValidIp4(ipAddr)) { +isIpv4 = false; +} +if (!NetUtils.isValidIp6(ipAddr) && !isIpv4) { +throw new InvalidParameterValueException("Invalid ip address " + ipAddr); } } +IpAddresses requestedIpPair = new IpAddresses(ipAddr, null); Review comment: Can I request to allocate an IPV4 and IPV6 at the same time? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558189#comment-16558189 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205416950 ## File path: server/src/main/java/com/cloud/network/Ipv6AddressManagerImpl.java ## @@ -150,4 +164,74 @@ public void revokeDirectIpv6Address(long networkId, String ip6Address) { _ipv6Dao.remove(ip.getId()); } } + +@Override +public String allocateGuestIpv6(Network network, String requestedIpv6) throws InsufficientAddressCapacityException { +return acquireGuestIpv6Address(network, requestedIpv6); +} + +@Override +@DB +public String acquireGuestIpv6Address(Network network, String requestedIpv6) throws InsufficientAddressCapacityException { +if (!_networkModel.isIP6AddressAvailableInNetwork(network.getId())) { Review comment: Do you validate somewhere else if the IP is valid? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558188#comment-16558188 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205416708 ## File path: server/src/main/java/com/cloud/network/IpAddressManagerImpl.java ## @@ -300,6 +300,8 @@ Boolean.class, "system.vm.public.ip.reservation.mode.strictness", "false", "If enabled, the use of System VMs public IP reservation is strict, preferred if not.", false, ConfigKey.Scope.Global); +Random rand = new Random(System.currentTimeMillis()); Review comment: private? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558186#comment-16558186 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205415515 ## File path: api/src/main/java/com/cloud/network/NetworkService.java ## @@ -189,12 +181,16 @@ Network createPrivateNetwork(String networkName, String displayText, long physic String netmask, long networkOwnerId, Long vpcId, Boolean sourceNat, Long networkOfferingId) throws ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException; -/* Requests an IP address for the guest nic */ -NicSecondaryIp allocateSecondaryGuestIP(long nicId, String ipaddress) throws InsufficientAddressCapacityException; +/** + * Requests an IP address for the guest nic Review comment: NIC This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558191#comment-16558191 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205415478 ## File path: api/src/main/java/com/cloud/network/NetworkService.java ## @@ -189,12 +181,16 @@ Network createPrivateNetwork(String networkName, String displayText, long physic String netmask, long networkOwnerId, Long vpcId, Boolean sourceNat, Long networkOfferingId) throws ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException; -/* Requests an IP address for the guest nic */ -NicSecondaryIp allocateSecondaryGuestIP(long nicId, String ipaddress) throws InsufficientAddressCapacityException; +/** + * Requests an IP address for the guest nic + */ +NicSecondaryIp allocateSecondaryGuestIP(long nicId, IpAddresses requestedIpPair) throws InsufficientAddressCapacityException; boolean releaseSecondaryIpFromNic(long ipAddressId); -/* lists the nic informaton */ +/** + * lists the nic informaton Review comment: NIC instead of nic This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558190#comment-16558190 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on a change in pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#discussion_r205416258 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java ## @@ -147,10 +147,15 @@ public void execute() throws InvalidParameterValueException { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid IP id is passed"); } +String secIp = nicSecIp.getIp4Address(); +if (secIp == null) { +secIp = nicSecIp.getIp6Address(); +} + if (isZoneSGEnabled()) { //remove the security group rules for this secondary ip boolean success = false; -success = _securityGroupService.securityGroupRulesForVmSecIp(nicSecIp.getNicId(), nicSecIp.getIp4Address(), false); +success = _securityGroupService.securityGroupRulesForVmSecIp(nicSecIp.getNicId(), secIp, false); Review comment: Instead of sending the parameters what about using the command POJO? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558177#comment-16558177 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rafaelweingartner commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-408060351 @GabrielBrascher: ``` Unapproved licenses: server/src/test/java/com/cloud/network/Ipv6AddressManagerTest.java ``` Would you mind fixing this? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558005#comment-16558005 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - rhtyd commented on issue #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773#issuecomment-408003265 @GabrielBrascher can you have a look at travis failure This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CLOUDSTACK-10328) Add Secondary IPv6 address through API
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16556889#comment-16556889 ] ASF GitHub Bot commented on CLOUDSTACK-10328: - GabrielBrascher opened a new pull request #2773: CLOUDSTACK-10328: Add Secondary IPv6 address through API URL: https://github.com/apache/cloudstack/pull/2773 This PR allows the addition of IPv6 address to the secondary NIC through API. It was tested with the basic and the advanced network. Some use cases are illustrated with the following screenshots: - the given IP address is checked in the UI : ![acquirenewipstringcheck2](https://user-images.githubusercontent.com/5025148/43241812-ae98f4a8-9073-11e8-9714-a8606abac2d5.jpg) - it acquires multiple IP addresses: ![acquirenewips](https://user-images.githubusercontent.com/5025148/43241834-d148b9e8-9073-11e8-818b-3264ab4a2037.jpg) ![acquirenewipsvmview](https://user-images.githubusercontent.com/5025148/43241838-d471b110-9073-11e8-965b-f58d19d06f01.jpg) - fails to acquire an allocated IP: ![acquirenewipsfailduplicated](https://user-images.githubusercontent.com/5025148/43241874-fa1c0aaa-9073-11e8-8178-cafe0ddda09c.jpg) - releases the IP addresses: ![releaseipv6](https://user-images.githubusercontent.com/5025148/43241852-e2936aea-9073-11e8-98f7-34bfc4e91dd8.jpg) ## Description ## Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [x] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ## GitHub Issue/PRs ## Screenshots (if appropriate): ## How Has This Been Tested? ## Checklist: - [x] I have read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document. - [x] My code follows the code style of this project. - [x] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. Testing - [x] I have added tests to cover my changes. - [ ] All relevant new and existing integration tests have passed. - [ ] A full integration testsuite with all test that can run on my environment has passed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add Secondary IPv6 address through API > -- > > Key: CLOUDSTACK-10328 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10328 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) >Reporter: Gabriel Beims Bräscher >Assignee: Gabriel Beims Bräscher >Priority: Critical > > Currently, we have IPv6 support in Basic Networking. However, CloudStack does > not support Multiple IPv6 addresses. This was partially implemented with this > Pull Request: https://github.com/apache/cloudstack/pull/2028 > The addIpToNic command only supports IPv4: > https://cloudstack.apache.org/api/apidocs-4.11/apis/addIpToNic.html > Features: > - Add IPv6 address alias > - Check if this IPv6 address is in the configured subnet for that POD/VLAN > - Update the security group > The admin will manually add the address to the Instance but the Security > Grouping should allow it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)