]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Add a check for localStorage to the C-SDKs. Rename the property in xapi obejects too
authorChris Harding <chris.harding@citrix.com>
Fri, 6 Nov 2015 08:54:00 +0000 (08:54 +0000)
committerChris Harding <chris.harding@citrix.com>
Fri, 6 Nov 2015 08:54:00 +0000 (08:54 +0000)
exec/testcases/xenserver/gui.py
exec/xenrt/lib/xenserver/objects.py

index 9c92bc1e8f4ccd88dd50b87f20d74543c2b3807e..6709769ad281fa27f2cbc43a7156e8899aef6336 100755 (executable)
@@ -538,18 +538,18 @@ class CUnitTestMechanism(_UnitTestMechanism):
         return self._runner.execguest("cd %s && ./%s https://%s root xenroot" % (self.__TEST_CODE_PATH, self.__currentTest, self._host.getIP()))
 
     def runTests(self):
-        localSrName = next(sr for sr in self._host.xapiObject.localSRs).name
+        localSrName = next(sr for sr in self._host.xapiObject.localSRs if sr.isLocalStorage).name
         try:
             self.__results[self.__currentTest] = self.__runVmOps(localSrName)
             self.__results[self.__currentTest] = self.__runGetRecords()
         except xenrt.XRTFailure, e:
             log("Test failed: %s" % e)
-            self.__results[self.__currentTest]=(e.data)
+            self.__results[self.__currentTest] = (e.data)
 
     def triageTestOutput(self):
         for bad in self.__BADNESS:
             if bad in self.results:
-                log("Found the horror: %s in the output" %bad)
+                log("Found the horror: %s in the output" % bad)
                 raise xenrt.XRTFailure("A failure message was found in the output")
 
         if self.__vmCount + 1 != len(self._host.listGuests()):
index 7309753d492071defabd17432d0c34562737c104..855d95e6c2321ccdcb27add0310feccc62b724af 100755 (executable)
@@ -265,7 +265,7 @@ class SR(NamedXapiObject):
     __TYPE = "type"
 
     @property
-    def isLocal(self):
+    def isLocalStorage(self):
         return re.search(self.__LOCAL, self.name)
 
     @property