Detach the SR: Unmounts and removes the mountpoint
(self, sr_uuid)
| 140 | |
| 141 | |
| 142 | def detach(self, sr_uuid): |
| 143 | """Detach the SR: Unmounts and removes the mountpoint""" |
| 144 | if not self._checkmount(): |
| 145 | return |
| 146 | util.SMlog("Aborting GC/coalesce") |
| 147 | cleanup.abort(self.uuid) |
| 148 | |
| 149 | # Change directory to avoid unmount conflicts |
| 150 | os.chdir(SR.MOUNT_BASE) |
| 151 | |
| 152 | try: |
| 153 | nfs.unmount(self.path, True) |
| 154 | except nfs.NfsException, exc: |
| 155 | raise xs_errors.XenError('NFSUnMount', opterr=exc.errstr) |
| 156 | |
| 157 | return super(NFSSR, self).detach(sr_uuid) |
| 158 | |
| 159 | |
| 160 | def create(self, sr_uuid, size): |
no test coverage detected