debuggers.hg

view tools/control/web/tmpl/vd-vbdcr.tmpl @ 623:e5cb8bd7ebfe

bitkeeper revision 1.325 (3f0d278fx62UemAA1unbHTgIGvOJ4Q)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/rac61/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/sos22/xeno.bk
author sos22@labyrinth.cl.cam.ac.uk
date Thu Jul 10 08:45:03 2003 +0000 (2003-07-10)
parents 858e1659fdcb d746390f5bc4
children 73fab8c399fd
line source
1 Create Virtual Block Device
2 SECTION&XenoServers
3 BREADCRUMB&Virtual Disk Manager&vd.jsp
5 <!-- content -->
6 <img src="pixel.gif" class="block" width="1" height="12">
8 <table cellpadding="0" cellspacing="0" border="0">
9 <tbody>
10 INCLUDE&vdmenu.tmpl
11 <td valign="top">
13 <b>Create Virtual Block Device Results</b>
14 <br>
16 <%
17 HttpServletRequestWrapper hsrw = new HttpServletRequestWrapper(request);
19 if (hsrw.getParameter("vd") == null ||
20 hsrw.getParameter("vd").trim().equals(""))
21 {
22 %>
23 Error: No virtual disk chosen.<br>
24 <%
25 }
26 else if (hsrw.getParameter("domain") == null ||
27 hsrw.getParameter("domain").trim().equals(""))
28 {
29 %>
30 Error: No domain specified.<br>
31 <%
32 }
33 else if (hsrw.getParameter("vbd") == null ||
34 hsrw.getParameter("vbd").trim().equals(""))
35 {
36 %>
37 Error: No virtual block device number specified.<br>
38 <%
39 }
40 else
41 {
42 int domain = -1;
43 int vbd = -1;
45 try
46 {
47 domain = Integer.decode(hsrw.getParameter("domain")).intValue();
48 vbd = Integer.decode(hsrw.getParameter("vbd")).intValue();
49 Mode mode;
50 if (hsrw.getParameter("mode").equals("rw")) {
51 mode = Mode.READ_WRITE;
52 } else {
53 mode = Mode.READ_ONLY;
54 }
56 %>
57 output =<br>
58 <%= new CommandVbdCreate(hsrw.getParameter("vd"),
59 domain, vbd,
60 mode).execute() %>
61 <%
62 }
63 catch (NumberFormatException e)
64 {
65 if (domain == -1)
66 {
67 %>
68 Error: invalid domain specification.<br>
69 <%
70 }
71 else
72 {
73 %>
74 Error: invalid virtual block device number specification.<br>
75 <%
76 }
77 }
78 }
79 %>
81 <%
82 root.doFlushState();
83 %>
85 </td>
86 </tbody>
87 </table>
92 <!-- end content -->