|
| 1 | +#!/usr/bin/env python3 |
| 2 | +# |
| 3 | +# Copyright (C) 2026 Vates SAS |
| 4 | +# |
| 5 | +# This program is free software: you can redistribute it and/or modify |
| 6 | +# it under the terms of the GNU General Public License as published by |
| 7 | +# the Free Software Foundation, either version 3 of the License, or |
| 8 | +# (at your option) any later version. |
| 9 | +# This program is distributed in the hope that it will be useful, |
| 10 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +# GNU General Public License for more details. |
| 13 | +# |
| 14 | +# You should have received a copy of the GNU General Public License |
| 15 | +# along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 16 | + |
| 17 | +import argparse |
| 18 | + |
| 19 | +from xcp_storage.backends.linstor.manager import LinstorManager |
| 20 | + |
| 21 | +# ============================================================================== |
| 22 | + |
| 23 | +if __name__ == "__main__": |
| 24 | + parser = argparse.ArgumentParser() |
| 25 | + |
| 26 | + parser.add_argument("-u", "--uri", required=False) |
| 27 | + |
| 28 | + action_group = parser.add_mutually_exclusive_group(required=True) |
| 29 | + action_group.add_argument("--remove-skip-disks", action="store_true") |
| 30 | + |
| 31 | + args = parser.parse_args() |
| 32 | + |
| 33 | + linstor_manager = LinstorManager(args.uri) |
| 34 | + if args.remove_skip_disks: |
| 35 | + linstor_manager.remove_controller_skip_disks() |
0 commit comments