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/05/29 01:11:00 UTC

[GitHub] GabrielBrascher commented on a change in pull request #2673: Fix test_configdrive.py and test_nuage_configdrive

GabrielBrascher 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_r191285887
 
 

 ##########
 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:
   Shouldn't it have a line `physicalnetworkid=self.vsp_physical_network.id)[0]`? I am following the same logic of the test `get_configdrive_provider` on `test_nuage_configdrive.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:
users@infra.apache.org


With regards,
Apache Git Services