From: Chris Harding Date: Fri, 6 Nov 2015 08:54:00 +0000 (+0000) Subject: Add a check for localStorage to the C-SDKs. Rename the property in xapi obejects too X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3c71f08cbe9d0313941c6d178082899639b48b4d;p=xenrt-citrix%2Fxenrt.git Add a check for localStorage to the C-SDKs. Rename the property in xapi obejects too --- diff --git a/exec/testcases/xenserver/gui.py b/exec/testcases/xenserver/gui.py index 9c92bc1e8..6709769ad 100755 --- a/exec/testcases/xenserver/gui.py +++ b/exec/testcases/xenserver/gui.py @@ -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()): diff --git a/exec/xenrt/lib/xenserver/objects.py b/exec/xenrt/lib/xenserver/objects.py index 7309753d4..855d95e6c 100755 --- a/exec/xenrt/lib/xenserver/objects.py +++ b/exec/xenrt/lib/xenserver/objects.py @@ -265,7 +265,7 @@ class SR(NamedXapiObject): __TYPE = "type" @property - def isLocal(self): + def isLocalStorage(self): return re.search(self.__LOCAL, self.name) @property