def lookup(self, path): try: path_components = utils.validate_lun_path(path) return utils.get_lun_info(*path_components) except ValueError: wok_log.error("Fetching LUN info failed, %s", path) raise NotFoundError("GS390XSTG00008", {'path': path})
def delete(self, path): if utils.is_lun_scan_enabled(): wok_log.error("Lun scan is enabled. Cannot add/remote LUNs manually.") raise InvalidOperation("GS390XSTG00009") path_components = utils.validate_lun_path(path) utils.remove_lun(*path_components)
def delete(self, path): if utils.is_lun_scan_enabled(): wok_log.error( "Lun scan is enabled. Cannot add/remote LUNs manually.") raise InvalidOperation("GS390XSTG00009") path_components = utils.validate_lun_path(path) utils.remove_lun(*path_components)
def delete(self, path): if utils.is_lun_scan_enabled()['current']: wok_log.error( "Lun scan is enabled. Cannot add/remote LUNs manually.") raise InvalidOperation("GS390XSTG00009") path_components = utils.validate_lun_path(path) try: fc_lock.acquire() utils.remove_lun(*path_components) except OperationFailed as e: wok_log.error("Removing LUN failed") raise OperationFailed("GS390XSTG00002", {'err': e}) finally: fc_lock.release()