summaryrefslogtreecommitdiff
path: root/op-mode-definitions/system-image.xml.in
blob: 7b5260b4e3e0162f2780687e29a41e1ef838464e (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<?xml version="1.0" encoding="UTF-8"?>
<interfaceDefinition>
  <node name="add">
    <properties>
      <help>Add an object</help>
    </properties>
    <children>
      <node name="system">
        <properties>
          <help>Add item to a system facility</help>
        </properties>
        <children>
          <tagNode name="image">
            <properties>
              <help>Add a new image to the system</help>
              <completionHelp>
                <list>/path/to/vyos-image.iso "http://example.com/vyos-image.iso" latest</list>
              </completionHelp>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}"</command>
            <children>
              <tagNode name="vrf">
                <properties>
                  <help>Download image via specified VRF</help>
                  <completionHelp>
                    <path>vrf name</path>
                  </completionHelp>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --vrf "${6}"</command>
                <children>
                  <tagNode name="username">
                    <properties>
                      <help>Username for authentication</help>
                    </properties>
                    <children>
                      <tagNode name="password">
                        <properties>
                          <help>Password to use with authentication</help>
                        </properties>
                        <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --vrf "${6}" --username "${8}" --password "${10}"</command>
                      </tagNode>
                    </children>
                  </tagNode>
                </children>
              </tagNode>
              <tagNode name="username">
                <properties>
                  <help>Username for authentication</help>
                </properties>
                <children>
                  <tagNode name="password">
                    <properties>
                      <help>Password to use with authentication</help>
                    </properties>
                    <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action add --image-path "${4}" --username "${6}" --password "${8}"</command>
                  </tagNode>
                </children>
              </tagNode>
            </children>
          </tagNode>
        </children>
      </node>
    </children>
  </node>
  <node name="set">
    <properties>
      <help>Install a new system</help>
    </properties>
    <children>
      <node name="system">
        <properties>
          <help>Set system operational parameters</help>
        </properties>
        <children>
          <node name="image">
            <properties>
              <help>Set system image parameters</help>
            </properties>
            <children>
              <node name="default-boot">
                <properties>
                  <help>Set default image to boot.</help>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action set</command>
              </node>
              <tagNode name="default-boot">
                <properties>
                  <help>Set default image to boot.</help>
                  <completionHelp>
                    <script>sudo ${vyos_op_scripts_dir}/image_manager.py --action list</script>
                  </completionHelp>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action set --image-name "${5}"</command>
              </tagNode>
            </children>
          </node>
        </children>
      </node>
    </children>
  </node>
  <node name="install">
    <properties>
      <help>Install a new system</help>
    </properties>
    <children>
      <node name="image">
        <properties>
          <help>Install new system image to hard drive</help>
        </properties>
        <command>sudo ${vyos_op_scripts_dir}/image_installer.py --action install</command>
      </node>
    </children>
  </node>
  <node name="delete">
    <properties>
      <help>Delete an object</help>
    </properties>
    <children>
      <node name="system">
        <properties>
          <help>Delete system objects</help>
        </properties>
        <children>
          <node name="image">
            <properties>
              <help>Remove an installed image from the system</help>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action delete</command>
          </node>
          <tagNode name="image">
            <properties>
              <help>Remove an installed image from the system</help>
              <completionHelp>
                <script>sudo ${vyos_op_scripts_dir}/image_manager.py --action list</script>
              </completionHelp>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action delete --image-name "${4}"</command>
          </tagNode>
        </children>
      </node>
    </children>
  </node>
  <node name="rename">
    <properties>
      <help>Rename an object</help>
    </properties>
    <children>
      <node name="system">
        <properties>
          <help>Rename a system object</help>
        </properties>
        <children>
          <tagNode name="image">
            <properties>
              <help>System image to rename</help>
              <completionHelp>
                <script>sudo ${vyos_op_scripts_dir}/image_manager.py --action list</script>
              </completionHelp>
            </properties>
            <children>
              <tagNode name="to">
                <properties>
                  <help>A new name for an image</help>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action rename --image-name "${4}" --image-new-name "${6}"</command>
              </tagNode>
            </children>
          </tagNode>
        </children>
      </node>
    </children>
  </node>
  <node name="show">
    <properties>
      <help>Rename an object</help>
    </properties>
    <children>
      <node name="system">
        <properties>
          <help>Show system information</help>
        </properties>
        <children>
          <node name="image">
            <properties>
              <help>Show installed VyOS images</help>
            </properties>
            <command>sudo ${vyos_op_scripts_dir}/image_info.py show_images_summary</command>
            <children>
              <node name="details">
                <properties>
                  <help>Show details about installed VyOS images</help>
                </properties>
                <command>sudo ${vyos_op_scripts_dir}/image_info.py show_images_details</command>
              </node>
            </children>
          </node>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>