def _open(self, **kwargs): if self._mode == OpenMode.OPEN_WRITE: return ngaslite.beingArchive(self._ngasSrv, self._fileId, port=self._ngasPort, timeout=self._ngasTimeout, length=self._length) return ngaslite.retrieve(self._ngasSrv, self._fileId, port=self._ngasPort, timeout=self._ngasTimeout)
def checkReplica(dropId, copies): response = ngaslite.retrieve('ngas.ddns.net', dropId) buff = response.read() self.assertEquals(msg*copies, buff, "%s's replica doesn't look correct" % (dropId))
def _open(self, **kwargs): if self._mode == OpenMode.OPEN_WRITE: return ngaslite.beingArchive(self._ngasSrv, self._fileId, port=self._ngasPort, timeout=self._ngasTimeout, length=self._length) return ngaslite.retrieve(self._ngasSrv, self._fileId, port=self._ngasPort, timeout=self._ngasTimeout)