예제 #1
0
 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})
예제 #2
0
 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})
예제 #3
0
    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)
예제 #4
0
    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)
예제 #5
0
    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()
예제 #6
0
    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()