summaryrefslogtreecommitdiff
path: root/op-mode-definitions/raid.xml.in
blob: 85fbf4566587f145e2fcccb8a06c8aed9bb74109 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0"?>
<interfaceDefinition>
  <node name="add">
    <children>
      <tagNode name="raid">
        <properties>
          <help>Add a RAID set element</help>
          <completionHelp>
            <script>${vyos_completion_dir}/list_raidset.sh</script>
          </completionHelp>
        </properties>
        <children>
          <node name="by-id">
            <properties>
              <help>Add a member by disk id to a RAID set</help>
            </properties>
            <children>
              <tagNode name="member">
                <properties>
                  <help>Add a member to a RAID set</help>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/raid.py add --raid-set-name $3 --by-id --member $6</command>
              </tagNode>
            </children>
          </node>
          <tagNode name="member">
            <properties>
              <help>Add a member to a RAID set</help>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/raid.py add --raid-set-name $3 --member $5</command>
          </tagNode>
        </children>
      </tagNode>
    </children>
  </node>
  <node name="delete">
    <children>
      <tagNode name="raid">
        <properties>
          <help>Delete a RAID set element</help>
          <completionHelp>
            <script>${vyos_completion_dir}/list_raidset.sh</script>
          </completionHelp>
        </properties>
        <children>
          <node name="by-id">
            <properties>
              <help>Add a member by disk id to a RAID set</help>
            </properties>
            <children>
              <tagNode name="member">
                <properties>
                  <help>Delete a member from a RAID set</help>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/raid.py delete --raid-set-name $3 --by-id --member $6</command>
              </tagNode>
            </children>
          </node>
          <tagNode name="member">
            <properties>
              <help>Delete a member from a RAID set</help>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/raid.py delete --raid-set-name $3 --member $5</command>
          </tagNode>
        </children>
      </tagNode>
    </children>
  </node>
</interfaceDefinition>