fmaximus commented on a change in pull request #2673: Fix test_configdrive.py 
and test_nuage_configdrive
URL: https://github.com/apache/cloudstack/pull/2673#discussion_r191830845
 
 

 ##########
 File path: test/integration/component/test_configdrive.py
 ##########
 @@ -513,17 +535,22 @@ def update_provider_state(self, new_state):
         :rtype: str
         """
         self.debug("Updating Service Provider ConfigDrive to %s" % new_state)
-        configdriveprovider = NetworkServiceProvider.list(
-            self.api_client,
-            name="ConfigDrive",
-            physicalnetworkid=self.vsp_physical_network.id)[0]
+        configdriveprovider = self.get_configdrive_provider()
         orig_state = configdriveprovider.state
         NetworkServiceProvider.update(self.api_client,
                                       configdriveprovider.id,
                                       state=new_state)
         self.validate_NetworkServiceProvider("ConfigDrive", state=new_state)
         return orig_state
 
+    def _get_test_data(self, key):
+        return self.test_data[key]
+
+    def get_configdrive_provider(self):
+        return NetworkServiceProvider.list(
+            self.api_client,
+            name="ConfigDrive")[0]
+
 
 Review comment:
   Native test can just take the first one, as there are no multiple physical 
networks which might have a ConfigDrive provider, as is the case in a Nuage 
setup

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to