(self, sr_uuid)
| 192 | self.detach(sr_uuid) |
| 193 | |
| 194 | def delete(self, sr_uuid): |
| 195 | # try to remove/delete non VDI contents first |
| 196 | super(NFSSR, self).delete(sr_uuid) |
| 197 | try: |
| 198 | if self._checkmount(): |
| 199 | self.detach(sr_uuid) |
| 200 | |
| 201 | # Set the target path temporarily to the base dir |
| 202 | # so that we can remove the target SR directory |
| 203 | self.remotepath = self.dconf['serverpath'] |
| 204 | self.mount_remotepath(sr_uuid) |
| 205 | newpath = os.path.join(self.path, sr_uuid) |
| 206 | |
| 207 | if util.ioretry(lambda: util.pathexists(newpath)): |
| 208 | util.ioretry(lambda: os.rmdir(newpath)) |
| 209 | self.detach(sr_uuid) |
| 210 | except util.CommandException, inst: |
| 211 | self.detach(sr_uuid) |
| 212 | if inst.code != errno.ENOENT: |
| 213 | raise xs_errors.XenError('NFSDelete') |
| 214 | |
| 215 | def vdi(self, uuid, loadLocked = False): |
| 216 | if not loadLocked: |
nothing calls this directly
no test coverage detected