This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new 207a2c1da35 Support ConfigDrive with VPC (#10495)
207a2c1da35 is described below

commit 207a2c1da35c00647f16ea06c2ef0f8476acec56
Author: Vishesh <vishes...@gmail.com>
AuthorDate: Wed Apr 16 18:28:17 2025 +0530

    Support ConfigDrive with VPC (#10495)
---
 .../java/com/cloud/network/element/ConfigDriveNetworkElement.java | 6 +++---
 ui/src/views/offering/AddVpcOffering.vue                          | 8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git 
a/server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java 
b/server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
index 47c9979c2f6..5f1c1e58d93 100644
--- 
a/server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
+++ 
b/server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
@@ -203,8 +203,8 @@ public class ConfigDriveNetworkElement extends AdapterBase 
implements NetworkEle
     private static Map<Service, Map<Capability, String>> setCapabilities() {
         Map<Service, Map<Capability, String>> capabilities = new HashMap<>();
         capabilities.put(Service.UserData, null);
-        capabilities.put(Service.Dhcp, new HashMap<>());
-        capabilities.put(Service.Dns, new HashMap<>());
+        capabilities.put(Service.Dhcp, 
Map.of(Network.Capability.DhcpAccrossMultipleSubnets, "true"));
+        capabilities.put(Service.Dns, 
Map.of(Capability.AllowDnsSuffixModification, "true"));
         return capabilities;
     }
 
@@ -841,7 +841,7 @@ public class ConfigDriveNetworkElement extends AdapterBase 
implements NetworkEle
     public boolean configDhcpSupportForSubnet(Network network, NicProfile nic, 
VirtualMachineProfile vm,
             DeployDestination dest,
             ReservationContext context) throws ConcurrentOperationException, 
InsufficientCapacityException, ResourceUnavailableException {
-        return false;
+        return true;
     }
 
     @Override
diff --git a/ui/src/views/offering/AddVpcOffering.vue 
b/ui/src/views/offering/AddVpcOffering.vue
index 450ee117715..99227d2de50 100644
--- a/ui/src/views/offering/AddVpcOffering.vue
+++ b/ui/src/views/offering/AddVpcOffering.vue
@@ -449,12 +449,16 @@ export default {
         services.push({
           name: 'Dhcp',
           provider: [
-            { name: 'VpcVirtualRouter' }
+            { name: 'VpcVirtualRouter' },
+            { name: 'ConfigDrive' }
           ]
         })
         services.push({
           name: 'Dns',
-          provider: [{ name: 'VpcVirtualRouter' }]
+          provider: [
+            { name: 'VpcVirtualRouter' },
+            { name: 'ConfigDrive' }
+          ]
         })
         services.push({
           name: 'Lb',

Reply via email to