You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/01/09 14:08:56 UTC

[GitHub] wido commented on a change in pull request #2097: [4.11] CLOUDSTACK-9813: Extending Config Drive support

wido commented on a change in pull request #2097: [4.11] CLOUDSTACK-9813: Extending Config Drive support
URL: https://github.com/apache/cloudstack/pull/2097#discussion_r160414658
 
 

 ##########
 File path: server/src/com/cloud/network/NetworkServiceImpl.java
 ##########
 @@ -4198,20 +4201,36 @@ private PhysicalNetworkServiceProvider addDefaultBaremetalProvidersToPhysicalNet
             addProviderToPhysicalNetwork(physicalNetworkId, "BaremetalUserdataProvider", null, null);
         } else if (dvo.getNetworkType() == NetworkType.Advanced) {
             addProviderToPhysicalNetwork(physicalNetworkId, "BaremetalPxeProvider", null, null);
-            enableBaremetalProvider("BaremetalPxeProvider");
+            enableProvider("BaremetalPxeProvider");
         }
 
         return null;
     }
 
-    private void enableBaremetalProvider(String providerName) {
+    private void enableProvider(String providerName) {
         QueryBuilder<PhysicalNetworkServiceProviderVO> q = QueryBuilder.create(PhysicalNetworkServiceProviderVO.class);
         q.and(q.entity().getProviderName(), SearchCriteria.Op.EQ, providerName);
         PhysicalNetworkServiceProviderVO provider = q.find();
         provider.setState(PhysicalNetworkServiceProvider.State.Enabled);
         _pNSPDao.update(provider.getId(), provider);
     }
 
+    private PhysicalNetworkServiceProvider addConfigDriveToPhysicalNetwork(long physicalNetworkId) {
+        PhysicalNetworkVO pvo = _physicalNetworkDao.findById(physicalNetworkId);
+        DataCenterVO dvo = _dcDao.findById(pvo.getDataCenterId());
+        if (dvo.getNetworkType() == NetworkType.Advanced) {
 
 Review comment:
   Why wouldn't config-drive be supported in Basic Networking?
   
   It's a network provider, correct?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services