Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Docs: remove old HTML docs (sorry Dave)

The have been replaced by the docs in ocaml/doc.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
  • Loading branch information...
commit 1518b8c9ff84b1bc405180af84312b0bf287fbb0 1 parent bfbd9a2
@robhoes robhoes authored
View
2  Makefile
@@ -48,7 +48,7 @@ lib-uninstall:
omake DESTDIR=$(DESTDIR) lib-uninstall
.PHONY: sdk-install
-sdk-install:
+sdk-install: doc
omake sdk-install
.PHONY: clean
View
1  OMakefile
@@ -147,7 +147,6 @@ OCAML_PHASE3_NOXEN = \
ocaml/cdrommon/cdrommon \
ocaml/xapi/binpack \
ocaml/idl/datamodel \
- ocaml/idl/html_build \
ocaml/db_process/xapi-db-process \
ocaml/vncproxy/vncproxy \
ocaml/xapi/rrddump \
View
47 ocaml/idl/OMakefile
@@ -1,10 +1,5 @@
.SUBDIRS: ocaml_backend lua js_backend
-JQUERY=jquery-1.1.3.1.pack.js
-JQUERY_DISTFILE = $(CARBON_DISTFILES)/javascript/jquery/$(JQUERY)
-JQUERYTREEVIEWZIP = jquery.treeview.zip
-JQUERYTREEVIEWZIP_DISTFILE = $(CARBON_DISTFILES)/javascript/jquery/treeview/jquery.treeview.zip
-
PSTOPDF = $(shell bash -c "which pstopdf 2>/dev/null || which ps2pdf 2>/dev/null || which ps2pdf14 2>/dev/null || echo false")
OCAMLINCLUDES = ocaml_backend ../database
@@ -25,7 +20,7 @@ OCamlLibrary(datamodel, datamodel constants datamodel_utils datamodel_types api_
# -----------------------------------------------------------------------
DATAMODEL = datamodel
-DATAMODEL_FILES = constants datamodel_types api_errors api_messages dm_api datamodel datamodel_utils dtd_backend latex_backend dot_backend html_backend html_imagemap html_common html_main html_autogen html_types ocaml_backend/ref ../database/string_marshall_helper
+DATAMODEL_FILES = constants datamodel_types api_errors api_messages dm_api datamodel datamodel_utils dtd_backend latex_backend dot_backend ocaml_backend/ref ../database/string_marshall_helper
SHARED_TEX = coversheet.tex presentation.tex vm-lifecycle.tex wire-protocol.tex
SHARED_EPS = vm_lifecycle.eps
@@ -38,38 +33,11 @@ DOCDIR = $(ROOT)/ocaml/autogen/doc
OCamlProgram($(DATAMODEL), $(DATAMODEL_FILES) datamodel_main)
OCamlDocProgram(datamodel, $(DATAMODEL_FILES))
-OCamlProgram(html_build, $(DATAMODEL_FILES) html_build html_common html_types)
-
-.PHONY: xenapi-html-doc xenenterpriseapi-html-doc api-html-doc sdk-classes
-api-html-doc: xenapi-html-doc xenenterpriseapi-html-doc
-
-# XXX replace xenapi-html-doc and xenenterpriseapi-html-doc with implicit
-# targets instead of hardcoding
-
-#$(JQUERY) :
-# cp $(JQUERY_DISTFILE) .
-#
-#$(JQUERYTREEVIEWZIP) :
-# cp $(JQUERYTREEVIEWZIP_DISTFILE) .
-
-sdk-classes: sdk-classes.dot
- dot -Tps2 -Kneato -Goverlap=false sdk-classes.dot > sdk-classes.ps
- dot -Tgif -Kneato -Goverlap=false sdk-classes.dot > sdk-classes.gif
-
-xenapi-html-doc: datamodel xenapi-datamodel-graph.dot xenapi-datamodel-graph.gif xenapi-datamodel-graph.map
- mkdir -p $(DOCDIR)/model/oss
- cp xenapi-datamodel-graph.{map,gif} $(DOCDIR)/model/oss
- cp api.css userguide.css $(DOCDIR)/model/oss
- cp xensource_logo.png check.png $(DOCDIR)/model/oss
- ./datamodel -html $(DOCDIR)/model/oss
-
-xenenterpriseapi-html-doc: datamodel #xenapi-datamodel-graph.dot xenenterpriseapi-datamodel-graph.gif xenenterpriseapi-datamodel-graph.map
- mkdir -p $(DOCDIR)/model/xe
- cp xenenterpriseapi-datamodel-graph.map $(DOCDIR)/model/xe
- cp xenenterpriseapi-datamodel-graph.gif $(DOCDIR)/model/xe
- cp api.css userguide.css $(DOCDIR)/model/xe
- cp xensource_logo.png xensource_toplogo.gif check.png $(DOCDIR)/model/xe
- ./datamodel -closed -html $(DOCDIR)/model/xe
+
+#.PHONY: sdk-classes
+#sdk-classes: sdk-classes.dot
+# dot -Tps2 -Kneato -Goverlap=false sdk-classes.dot > sdk-classes.ps
+# dot -Tgif -Kneato -Goverlap=false sdk-classes.dot > sdk-classes.gif
xenapi-datamodel-graph.dot: datamodel
./datamodel -dot >$@
@@ -115,9 +83,6 @@ clean:
rm -rf *.cmi *.cma *.cmxa *.a *.cmo *.cmx *.o *.opt *.aux *.log *.fig *.run datamodel
rm -rf *.ps *.pdf *.dvi *.annot
rm -rf *datamodel.tex datamodel-dtd.xml datamodel-coversheet.tex
- rm -rf /tmp/docs
- rm -rf $(SDKWWW)/docs/html
- rm -f html_build js_backend/main
sdk-README.txt : sdk-README.html
lynx -dump sdk-README.html > sdk-README.txt
View
BIN  ocaml/idl/check.png
Deleted file not rendered
View
9 ocaml/idl/datamodel_main.ml
@@ -23,21 +23,19 @@ let _ =
let dot_mode = ref false
and latex_mode = ref false
and dtd_mode = ref false
- and html_mode = ref false
and closed = ref false (* shows release_closed *)
and all = ref false (* shows release_impl as well *)
and dirname = ref "" in
Arg.parse [ "-dot", Arg.Set dot_mode, "output dot graph";
"-latex", Arg.Set latex_mode, "output latex document";
- "-html", Arg.Set html_mode, "output HTML files to directory";
"-dtd", Arg.Set dtd_mode, "output XML DTD";
"-closed", Arg.Set closed, "output all OSS + closed API functions but not including internal ones";
"-all", Arg.Set all, "output all API functions, including internal ones"
]
(fun x -> dirname := x)
"compile XenSource API datamodel specification";
- let all_modes = [ !dot_mode; !latex_mode; !dtd_mode; !html_mode ] in
+ let all_modes = [ !dot_mode; !latex_mode; !dtd_mode ] in
let num_modes_set = List.length (List.filter (fun x->x) all_modes) in
@@ -84,9 +82,4 @@ let _ =
(fun _ -> true)
api in
List.iter print_endline (Dtd_backend.of_objs api);
- end;
-
- if !html_mode then begin
- Html_main.all ~title:(if !all then "Citrix XenServer Management API" else "Xen API")
- ("xen" ^ (if !all || !closed then "enterprise" else "") ^ "api-datamodel-graph") api
end
View
99 ocaml/idl/html/api.css
@@ -1,99 +0,0 @@
-html, body {
- height: 100%;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- padding: 0;
-}
-
-body{
- font-family: Verdana, helvetica, arial, sans-serif;
- background: #ffffff;
- color: #000000;
-}
-
-h1 {
- color: #c1602f;
-/* margin-top:4px; */
- margin-bottom:4px;
-
-}
-
-div.main {
- margin-top: 4px;
-}
-
-img {
- border: 0;
-}
-
-img.totheright {
- float: right;
- margin: 0;
- padding: 0;
-}
-div.banner {
- height: 69px;
- margin: 0;
- padding: 0;
-}
-div.bar {
- background: #000000;
- height: 30px;
- color: #ffffff;
- padding-left: 20px;
- padding-top:6px;
- font-weight: bold;
-}
-
-h1.banner {
- padding: 10px;
- margin:0;
- padding-left:20px;
- color: #000000;
-}
-#bar a {
- text-decoration:none;
- color: #ffffff;
-}
-
-a:hover {
- color: #d1805f;
-}
-a {
- color: #c1602f;
- font-weight: bold;
-}
-
-td.tableheader {
- background-color: #c1602f;
- color: white;
- font-weight: bold;
- width: 100%;
- padding: 4px;
-}
-td.tableheader_sub {
- background-color: #ffbc9b;
- color: black;
- padding: 4px;
-}
-div.tableheader {
- background-color: #c1602f;
- color: white;
- font-weight: bold;
- width: 100%;
- padding: 4px;
-}
-
-table {
- width: 100%;
-}
-
-.title{
- font: 250% "Verdana", "Helvetica", "sans-serif";
- vertical-align: middle;
-}
-
-span.type, span.id, span.key {
- font-family: Courier, "Courier New", monospace;
-}
View
39 ocaml/idl/html/apitreeview.css
@@ -1,39 +0,0 @@
-html, body {height:100%; margin: 0; padding: 0; }
-
-html>body {
- font-size: 16px;
- font-size: 68.75%;
-} /* Reset Base Font Size */
-
-body {
- font-family: Verdana, helvetica, arial, sans-serif;
- font-size: 68.75%;
- background: #fff;
- color: #333;
- padding-left: 20px;
-} /* Reset Font Size */
-
-.treeview, .treeview ul {
- padding: 0;
- margin: 0;
- list-style: none;
-}
-
-.treeview li {
- margin: 0;
- padding: 3px 0pt 3px 16px;
-}
-
-ul.dir li { padding: 2px 0 0 16px; }
-
-.treeview li { background: url(images/tv-item.gif) 0 0 no-repeat; }
-.treeview .collapsable { background-image: url(images/tv-collapsable.gif); }
-.treeview .expandable { background-image: url(images/tv-expandable.gif); }
-.treeview .last { background-image: url(images/tv-item-last.gif); }
-.treeview .lastCollapsable { background-image: url(images/tv-collapsable-last.gif); }
-.treeview .lastExpandable { background-image: url(images/tv-expandable-last.gif); }
-
-#treecontrol { margin: 1em 0; }
-
-div.left_pane { float: left; width: 200px; padding:10px; border-width: 1px; border-right: soldi #aaa }
-div.main_pane { float: left }
View
11 ocaml/idl/html/apitreeview.js
@@ -1,11 +0,0 @@
-$(document).ready(function(){
- $("#browser").Treeview({
- collapsed: true
-/*
- speed: "fast",
- collapsed: true,
- unique: true,
- store: true
-*/
- });
-});
View
12 ocaml/idl/html/browser.html
@@ -1,12 +0,0 @@
-<html>
-
-<frameset rows="105px,*" noresize="noresize" frameborder="0" framespacing="0" border="0" scrolling="no">
-<frame src="header.html">
-
- <frameset cols="25%,75%" frameborder="1" border="4" framespacing="4" scrolling="auto">
- <frame src="tree.html">
- <frame src="classes.html" name="detail">
- </frameset>
-
-</frameset>
-</html>
View
17 ocaml/idl/html/header.html
@@ -1,17 +0,0 @@
-<html>
-<head>
-<link rel="stylesheet" href="api.css" type="text/css" media="projection, screen"/>
-<style type="text/css">
-html, body {height:100%; margin: 0; padding: 0; }
-</style>
-</head>
-<body>
-<div class="banner">
- <img class="totheright" src="images/background_image.jpg"></img>
- <h1 class="banner">Citrix XenServer Management API</h1>
-</div>
-<div class="bar" id="bar">
-<a href="../../" target="_parent">SDK</a> | API
-</div>
-</body>
-</html>
View
BIN  ocaml/idl/html/images/background_image.jpg
Deleted file not rendered
View
19 ocaml/idl/html/overlay/API/Classes/VM/Fields/VCPUs_params.html
@@ -1,19 +0,0 @@
-<p>
-
-<p>
-VCPUs can be pinned with a setting like:
-</p>
-mask=1,2,3
-<p>
-The VM will run on physical CPUs 1 2 and 3.
-</p>
-
-<p>
-Scheduling can be altered with settings like:
-</p>
-weight=100
-cap=100
-<p>
-</p>
-
-</p>
View
26 ocaml/idl/html/overlay/API/conventions
@@ -1,26 +0,0 @@
-
-<p>
-
-
-<p>This page explains some of the conventions used in this documention.</p>
-
-<h1>Objects, fields and messages</h1>
-<p>Objects have both <i>fields</i> and <i>messages.</i> Messages are either <i>implicit</i> or <i>explicit</i> where an implicit message is one of:</p>
-<ul>
-<li> a constructor (usually called &quot;create&quot;);</li>
-<li> a destructor (usually called &quot;destroy&quot;);</li>
-<li> &quot;get_by_name_label&quot;;</li>
-<li> &quot;get_by_uuid&quot;</li>
-<li> &quot;get_record&quot;; and</li>
-<li> &quot;get_all&quot;.</li>
-</ul>
-<p>Explicit messages include all the rest, more class-specific messages (e.g. &quot;VM.start&quot;, &quot;VM.clone&quot;)</p>
-<p>Every field has at least one <i>accessor</i> depending both on its type and whether it is read-only or read-write. Accessors for a field named &quot;X&quot; would be a proper subset of:</p>
-<ul>
-<li> set_X: change the value of field X (only if it is read-write);</li>
-<li> get_X: retrieve the value of field X;</li>
-<li> add_to_X: add a key/value pair (only if field has type set or map); and</li>
-<li> remove_from_X: remove a key (only if a field has type set or map).</li>
-</ul>
-
-</p>
View
171 ocaml/idl/html_autogen.ml
@@ -1,171 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-open Printf
-open Stringext
-
-open Datamodel_types
-open Datamodel
-open Datamodel_utils
-open Dm_api
-open Html_common
-open Html_types
-
-let prefix = "../../../"
-
-(** Return an HTML fragment which links to all the fields and messages within a class *)
-let class_summary x =
- let description = div "description" [ Xml.PCData x.description ] in
-
- let fields = fields_of_obj x in
- let implicit_messages = List.filter from_object x.messages in
- let explicit_messages = List.filter custom x.messages in
-
- let field f =
- let ty, name = strings_of_field f in
- li [ span "type" [ Xml.PCData ty ];
- span "id" [ link_to_field ~prefix x f [ Xml.PCData name ] ];
- p [ Xml.PCData ( (if f.release.internal_deprecated_since = None
- then "" else "[deprecated]") ^ f.field_description ) ] ] in
- let implicit_m m =
- let ret, name, args = strings_of_message x m in
- li [ Xml.PCData ret;
- span "id" [ link_to_implicit_msg ~prefix m [ Xml.PCData name ] ];
- span "type" [ Xml.PCData args ];
- p [ Xml.PCData ( (if m.msg_release.internal_deprecated_since = None
- then "" else "[deprecated]") ^ m.msg_doc ) ] ] in
- let explicit_m m =
- let ret, name, args = strings_of_message x m in
- li [ span "type" [ Xml.PCData ret ];
- span "id" [ link_to_custom_msg ~prefix m [ Xml.PCData name ] ];
- span "type" [ Xml.PCData args ];
- p [ Xml.PCData ( (if m.msg_release.internal_deprecated_since = None
- then "" else "[deprecated]") ^ m.msg_doc ) ] ] in
- let dep =
- if x.obj_release.internal_deprecated_since = None
- then []
- else [ div "tableheader" [ Xml.PCData "Warning" ];
- ul [ li [ Xml.PCData "Class is deprecated" ] ] ] in
- p (dep @ [ description; div "tableheader" [ Xml.PCData "Fields" ];
- ul (List.map field fields);
- div "tableheader" [ Xml.PCData "Implicit messages" ];
- ul (List.map implicit_m implicit_messages);
- div "tableheader" [ Xml.PCData "Explicit messages" ];
- ul (List.map explicit_m explicit_messages) ])
-
-let field_summary obj f =
- let table = Xml.Element("table", [],
- [ tr [ td [ span "key" [ Xml.PCData "Type:" ] ]; td [ span "type" [ Xml.PCData (string_of_ty f.ty) ] ] ];
- tr [ td []; td [ info_of_ty f.ty ] ];
- tr [ td [ span "key" [ Xml.PCData "Name:" ] ]; td [ span "id" [ Xml.PCData (String.concat "_" f.full_name) ] ] ];
- tr [ td []; td [ Xml.PCData f.field_description ] ];
- ]) in
- let is_ro f = f.qualifier <> RW in
- let is_deprecated f = f.release.internal_deprecated_since <> None in
- let accessors = List.filter on_client_side (all_new_messages_of_field obj f) in
- let li_of_m m =
- let ret, name, args = strings_of_message obj m in
- li [ span "type" [ Xml.PCData ret ];
- span "id" [ Xml.PCData name ];
- span "type" [ Xml.PCData args ];
- p [ Xml.PCData m.msg_doc ] ] in
- let accessors = ul (List.map li_of_m accessors) in
-
- let ro_ness = Xml.PCData (if is_ro f then "Field is read-only" else "Field is read-write") in
- let deprecated_ness = Xml.PCData (if is_deprecated f then "Warning: Field is deprecated" else "") in
- p [ table; ro_ness; deprecated_ness;
- div "tableheader" [ Xml.PCData "Accessors" ];
- accessors ]
-
-let message_summary obj m =
- let hdr x = tr [ td ~colspan:"3" ~cls:"tableheader" [ Xml.PCData x ] ] in
- let param_hdr =
- let td = td ~cls:"tableheader_sub" in
- tr [ td [ Xml.PCData "name" ]; td [ Xml.PCData "type" ]; td [ Xml.PCData "description" ] ] in
- let error_hdr =
- let td = td ~cls:"tableheader_sub" in
- tr [ td [ Xml.PCData "name" ]; td [ Xml.PCData "arguments" ]; td [ Xml.PCData "description" ] ] in
- let result_hdr =
- [ hdr "Return value";
- tr [ td [ ]; td ~cls:"tableheader_sub" [ Xml.PCData "type" ]; td ~cls:"tableheader_sub" [ Xml.PCData "description" ] ] ] in
-
- let result = match m.msg_result, m.msg_custom_marshaller with
- | None, false -> []
- | None, true -> result_hdr @
-
- [ tr [ td [];
- td [ Xml.PCData "raw XMLRPC" ];
- td [ Xml.PCData "see notes below" ] ] ]
- | Some (ty, desc), _ -> result_hdr @
- [ tr [ td [ ];
- td [ Xml.PCData (string_of_ty ty) ];
- td [ Xml.PCData desc ] ] ] in
-
- let parameter p =
- tr [ td [ Xml.PCData p.param_name ];
- td [ Xml.PCData (string_of_ty p.param_type) ];
- td [ Xml.PCData p.param_doc ] ] in
-
- let error e =
- tr [ td [ Xml.PCData e.err_name ];
- td [ Xml.PCData (String.concat ", " e.err_params) ];
- td [ Xml.PCData e.err_doc ] ] in
-
- let deprecated =
- if m.msg_release.internal_deprecated_since = None
- then []
- else [ li [ Xml.PCData "Warning: Message is deprecated" ] ] in
- let sync =
- if m.msg_async
- then "Message has both a synchronous and asynchronous version"
- else "Message has only a synchronous version" in
- let tag = match m.msg_tag with
- | FromField(op, f) -> "Message is derived from field " ^ (String.concat "_" f.full_name)
- | FromObject op -> "This is an implicit message, derived from its class"
- | Custom -> "This is a custom message" in
-
- let table = Xml.Element("table", [],
- result
- @ [ hdr "Parameters" ]
- @ [ param_hdr ]
- @ (List.map parameter (expand_params obj m))
- @ [ hdr "Errors" ]
- @ [ error_hdr ]
- @ (List.map error m.msg_errors)
- ) in
- p [ p [ Xml.PCData m.msg_doc ];
- table;
- ul (deprecated @ [ li [ Xml.PCData sync ];
- li [ Xml.PCData tag ] ]) ]
-
-
-let go api =
- let objects = objects_of_api api in
- List.iter (fun x ->
- let html = class_summary x in
- let filename = filename_of_class ~ext:autogen x in
- write_html html filename;
- (* Fields *)
- List.iter (fun f ->
- let html = field_summary x f in
- let filename = filename_of_field ~ext:autogen x f in
- write_html html filename)
- (fields_of_obj x);
- (* Messages *)
- let custom = List.filter custom x.messages in
- let implicit = List.filter from_object x.messages in
- List.iter (fun m -> write_html (message_summary x m) (filename_of_custom_msg ~ext:autogen m)) custom;
- List.iter (fun m -> write_html (message_summary x m) (filename_of_implicit_msg ~ext:autogen m)) implicit
-
- ) objects
-
View
226 ocaml/idl/html_backend.ml
@@ -1,226 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-open Printf
-open Stringext
-open Pervasiveext
-
-open Datamodel_types
-open Datamodel
-open Datamodel_utils
-open Dm_api
-open Html_common
-
-
-let td ?cls ?colspan x =
- let cls = match cls with
- | None -> [ "class", "noborder" ] | Some c -> [ "class", c ] in
- let colspan = match colspan with
- | None -> [] | Some x -> [ "colspan", x ] in
- Xml.Element("td", cls @ colspan, x)
-let tr ?cls x =
- let cls = match cls with
- | None -> [] | Some c -> [ "class", c ] in
- Xml.Element("tr", cls, x)
-
-let hr = Xml.Element("hr", [], [])
-let p = Xml.Element("p", [], [])
-
-let link_to_classes () = href class_index [ Xml.PCData "[ classes ]" ]
-(*
- Xml.Element("img", [ "src", !diagram_basename ^ ".small.gif" ], [])
-]
-*)
-
-let rec string_of_ty = function
- | String -> "string"
- | Int -> "int"
- | Float -> "float"
- | Bool -> "bool"
- | DateTime -> "datetime"
- | Enum (name, _) -> sprintf "enum %s" name
- | Set t -> sprintf "Set[%s]" (string_of_ty t)
- | Map (a, b) -> sprintf "Map[%s&rarr;%s]" (string_of_ty a) (string_of_ty b)
- | Ref x -> x
- | Record x -> sprintf "Record[%s]" x
-
-let derived_from_field f x = match x.msg_tag with
- | FromField(_, f') -> f = f'
- | _ -> false
-
-let custom x = match x.msg_tag with
- | Custom -> true
- | _ -> false
-
-let from_object x = match x.msg_tag with
- | FromObject (Private _) -> false
- | FromObject _ -> true
- | _ -> false
-
-let stripe =
- let toggle = ref false in
- fun ?(change=false) xs ->
- if change then toggle := not(!toggle);
- tr ~cls:(if !toggle then "even" else "odd") xs
-
-let message_args m =
- let params = List.map (fun p -> hyperlink_of_ty p.param_type @ [ Xml.PCData p.param_name ]) m.msg_params in
- let params =
- if List.length params > 1
- then List.map (fun x -> x @ [ Xml.PCData "; " ]) (List.rev (List.tl (List.rev params))) @
- [ List.hd (List.rev params) ]
- else params in
- [ Xml.PCData "(" ] @ (List.concat params) @ [ Xml.PCData ")" ]
-
-let decl_of_message m =
- (default [] (may (fun (t, _) -> hyperlink_of_ty t) m.msg_result)) @
- [ Xml.PCData m.msg_name ] @ (message_args m)
-
-let check = img "check.png"
-
-let opensource release =
- td ( (*if List.mem "3.0.3" release.opensource then [ check ] else*) [])
-let enterprise release =
- td ( (*if List.mem "closed" release.internal then [ check ] else*) [])
-let implementation release =
- td ( (*if List.mem "implementation" release.internal then [ check ] else*) [])
-
-let message m =
- let param p =
- stripe [ td [ Xml.PCData "" ];
- td ~cls:"field" ((hyperlink_of_ty p.param_type) @ [ Xml.PCData p.param_name] );
- td ~colspan:"4" [ Xml.PCData p.param_doc ] ] in
- let header =
- stripe ~change:true
- [ td ~cls:"field"
- (match m.msg_result with Some (t, _) -> hyperlink_of_ty t | None -> [ Xml.PCData "void" ]);
- td ~cls:"bold" [ Xml.PCData m.msg_name ];
- td ~cls:"field" (message_args m);
- opensource m.msg_release;
- enterprise m.msg_release;
- implementation m.msg_release;
- ] in
- let descr =
- stripe [ td [ Xml.PCData "" ]; td ~colspan:"5" [ Xml.PCData m.msg_doc ] ] in
- [ header ] @ (List.map param m.msg_params) @ [ descr ]
-
-let rec content all_m =
- let message ?(cls="message") m =
- let summary = decl_of_message m in
- stripe [ td [ Xml.PCData "" ]; td ~cls ~colspan:"5" summary ] in function
- | Field fld ->
- let field =
- stripe ~change:true [ td ~cls:"field" (hyperlink_of_ty fld.ty);
- td ~cls:"bold" [ Xml.PCData (String.concat "/" fld.full_name) ];
- td [ Xml.PCData fld.field_description ];
- opensource fld.release;
- enterprise fld.release;
- implementation fld.release;
- ] in
- let derived_ms = List.filter (derived_from_field fld) all_m in
- field :: (List.map (message ~cls:"derived") derived_ms)
- | Namespace (name, contents) ->
- List.concat (List.map (content all_m) contents)
-
-let obj x =
- let section x = tr [
- td ~cls:"section" ~colspan:"3" [ Xml.PCData x ];
- td ~cls:"section" [ Xml.PCData "" (* "OSS" *) ];
- td ~cls:"section" [ Xml.PCData "" (* "XE" *) ];
- td ~cls:"section" [ Xml.PCData "" (* "impl" *) ];
- ] in
- let description = div "description" [ Xml.PCData x.description ] in
- let contents = List.concat (List.map (content x.messages) x.contents) in
- let messages = List.concat (List.map message (List.filter custom x.messages)) in
- let obj_messages = List.concat (List.map message (List.filter from_object x.messages)) in
- let table = Xml.Element("table", [ "class", "bigtable" ],
- [
- section "Implicit messages" ] @
- obj_messages @
- [ section "Fields" ] @
- contents @
- [ section "Custom messages" ] @
- messages) in
- html x.name ([ link_to_classes (); description; table; link_to_classes ()])
-
-let of_enum name kv_list =
- let heading = h1 ("enum " ^ name) in
- let table =
- let pairs = List.map
- (fun (k, v) -> stripe ~change:true [ td ~cls:"field" [ Xml.PCData k ];
- td [ Xml.PCData v ] ]) kv_list in
- Xml.Element("table", [ "class", "bigtable" ], pairs) in
- html name [ link_to_classes(); heading; table; link_to_classes() ]
-
-(** A tree of links used for building a navigation bar down the left *)
-type tree =
- | Leaf of (Xml.xml list)
- | Node of string * (tree list)
-
-let images_file = "images/file.gif"
-let images_folder = "images/folder.gif"
-
-let rec nested_uls_of_tree = function
- | Leaf x -> li (img images_file :: x)
- | Node (label, []) ->
- li [ img images_folder; Xml.PCData label ]
- | Node (label, children) ->
- li [ img images_folder; Xml.PCData label;
- ul (List.map nested_uls_of_tree children) ]
-
-(*
-let rec trees_from_disk (path: string) =
- let is_dir x = try (Unix.stat x).Unix.st_kind = Unix.S_DIR with _ -> false in
- let ls x = List.filter (fun x -> not(String.startswith ".") x) (Sys.readdir x) in
- List.map (fun x ->
- if is_dir
- then Node(x, trees_from_disk (path ^ "/" ^ x))
- else Leaf
-
-*)
-(*
-let treeview api =
- let objects = objects_of_api api in
- let tree_of_enums =
- let all_types = Types.of_objects objects in
- List.concat (List.map (function Enum (name, _) -> [ Leaf [ Xml.PCData name ] ]
- | _ -> []) all_types) in
- let tree_of_obj x =
- Node (x.name,
- [ Node ("Implicit messages",
- List.map (fun m -> Leaf [ Xml.PCData (string_of_message m) ]) (List.filter from_object x.messages));
- Node ("Fields",
- List.map (fun f -> Leaf [ Xml.PCData (string_of_field f) ]) (fields_of_obj x));
- Node ("Custom messages",
- List.map (fun m -> Leaf [ Xml.PCData (string_of_message m) ]) (List.filter custom x.messages));
- ]) in
-
- let tree =
- Node ("API",
- [ Node ("Enums", tree_of_enums);
- Node ("Classes", List.map tree_of_obj objects) ]) in
-
- let html_tree = Xml.Element("ul", [ "id", "browser"; "class", "dir" ],
- [ nested_uls_of_tree tree ]) in
-
- html ~hdr:false ~scripts:[ "apitreeview.js" ] "API" [ html_tree ]
-*)
-
-let go api =
- let objects = objects_of_api api in
-(* List.iter (fun x -> write_html (obj x) (filename_of_object x)) objects; *)
- (* consider all enums *)
- let all_types = Types.of_objects objects in
- List.iter (function Enum (name, kv_list) ->
- write_html (of_enum name kv_list) (name ^ ".html")
- | _ -> ()) all_types
View
170 ocaml/idl/html_build.ml
@@ -1,170 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-(* Merge two trees of HTML fragments together into one, create navigation aids *)
-
-
-open Printf
-open Stringext
-open Listext
-
-open Html_common
-
-
-(** A tree of resources *)
-type tree =
- | Leaf
- | Node of (string * tree) list
-
-let chop x = try Filename.chop_extension x with _ -> x
-let is_dir x = try (Unix.stat x).Unix.st_kind = Unix.S_DIR with _ -> false
-
-(** Reads a tree from disk. Each file has its extension chopped: the intention is to
- merge these files together into one single page *)
-let rec tree_from_disk (path: string) =
- let ls x = List.filter (fun x -> not(String.startswith "." x)) (Array.to_list (Sys.readdir x)) in
- if is_dir path
- then Node(List.map (fun x -> (chop x), tree_from_disk (Filename.concat path x)) (ls path))
- else Leaf
-
-let rec merge (a: tree) (b: tree) = match a, b with
- | Leaf, Leaf -> Leaf
- | Node a, Node b ->
- let keys = List.setify (List.map fst (a @ b)) in
- Node(List.map (fun key -> key, (match List.mem_assoc key a, List.mem_assoc key b with
- | true, true -> merge (List.assoc key a) (List.assoc key b)
- | true, false -> List.assoc key a
- | false, true -> List.assoc key b
- | false, false -> failwith "tree merge internal")) keys)
- | _, _ -> failwith "tree merge cannot merge a Leaf with a Node"
-
-let output sources dest (a: tree) =
-
- let rec dots x = if x = 0 then "" else "../" ^ (dots (x-1)) in
-
- let findall path name =
- let tosearch = List.map (fun x -> Filename.concat x path) sources in
- let one dir =
- try
- let all = List.filter (fun x -> chop x = name) (Array.to_list (Sys.readdir dir)) in
- let all = List.map (Filename.concat dir) all in
- List.filter (fun x -> not(is_dir x)) all
- with _ -> [] in
- List.concat (List.map one tosearch) in
-
- let merge path files =
- (* Should order the files. Autogen first obviously *)
- let ordered =
- if List.exists (String.endswith autogen) files
- then
- let auto = List.find (String.endswith autogen) files
- and rest = List.sort compare (List.filter (fun x -> not(String.endswith autogen x)) files) in
- auto :: rest
- else files in
-
- let breadcrumbs =
- let us = Filename.basename (chop (List.hd files) ^ ".html") in
- let parts = us :: (List.rev (String.split '/' path)) in
- let parts = List.filter (fun x -> x <> "") parts in
- let links = List.mapi (fun idx dir ->
- if dir = _Classes
- then dots (idx + 1) ^ "classes.html"
- else dots idx ^ dir) parts in
- let links = List.filter (fun (label, _) -> not(List.mem label [ _Implicit; _Explicit; _Fields ])) (List.combine parts links) in
- let hrefs = List.map (fun (label, link) ->
- href link [ Xml.PCData label ]) links in
-
- (* add a between / *)
- div "breadcrumbs" (List.rev (List.tl (List.concat (List.map (fun x -> [ Xml.PCData "/"; x ]) hrefs)))) in
- let parse x =
- try
- Xml.parse_file x
- with Xml.Error e ->
- failwith (Printf.sprintf "Caught XML error parsing %s: %s" x (Xml.error e)) in
-
- let main = List.map parse ordered in
- let rel = dots (List.length (List.filter (fun x -> x <> "") (String.split '/' path)) + 1) in
- html ~rel ~hdr:false path
- [ div "main"
- (breadcrumbs :: main) ] in
-
- let rec walk path = function
- | Leaf -> ()
- | Node [] -> ()
- | Node ((name, Leaf) :: rest) ->
- (* Find resources, build *)
- let resources = findall path name in
- let merged = merge path resources in
- write_html merged (dest ^ "/" ^ path ^ "/" ^ name ^ ".html");
- walk path (Node rest)
- | Node ((name, subtree) :: rest) ->
- walk (Filename.concat path name) subtree;
- walk path (Node rest) in
-
- walk "/" a
-
-let images_file = "images/file.gif"
-let images_folder = "images/folder.gif"
-
-let nested_uls_of_tree t =
- let href path label =
- Xml.Element("a", [ "href", String.concat "/" (List.rev ((label ^ ".html") :: path)); "target", "detail" ],
- [ Xml.PCData label ]) in
- let rec tree path label = function
- | Leaf -> li [ img images_file; href path label ]
- | Node children -> li [ img images_folder; Xml.PCData label; ul (List.map (child (label :: path)) children) ]
- and child path (label, t) = tree path label t in
- match t with
- | Node children -> ul (List.map (child ["API"]) children)
- | Leaf -> failwith "Bizarrely shaped tree"
-let html_of_tree t =
- let html_tree = Xml.Element("ul", [ "id", "browser"; "class", "dir" ],
- [ li [ img images_folder;
- Xml.PCData "API";
- nested_uls_of_tree t ]
- ]) in
-
- html ~hdr:false ~css:[ "apitreeview.css" ] ~scripts:[ "apitreeview.js" ] "API" [ html_tree ]
-
-
-let _ =
- let autogen = ref ""
- and manual = ref ""
- and output_dir = ref ""
- and tree = ref "" in
-
- Arg.parse [ "-autogen", Arg.Set_string autogen, "path to the autogen files";
- "-manual", Arg.Set_string manual, "path to the manually-created files";
- "-output", Arg.Set_string output_dir, "path to the output dir";
- "-tree", Arg.Set_string tree, "path to navigator tree";
- ]
- (fun x -> Printf.fprintf stderr "Ignoring argument: %s" x)
- "build API HTML reference docs";
- if !autogen = ""
- then failwith "Must set an autogen directory";
- if !manual = ""
- then failwith "Must set a manual directory";
- if !output_dir = ""
- then failwith "Must set an output directory";
-
- let a = tree_from_disk !autogen in
- let b = tree_from_disk !manual in
- let all = merge a b in
- output [ !autogen; !manual ] !output_dir all;
-
- if !tree <> ""
- then write_html (html_of_tree all) !tree;
-
- print_endline "done"
-
-
View
195 ocaml/idl/html_common.ml
@@ -1,195 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-open Pervasiveext
-
-let document_title = ref "Citrix XenServer Management API"
-
-let class_index = "classes.html"
-let intro = "index.html"
-let tree = "tree.html"
-let overlay = "overlay" (* used to incorporate user stuff into the documentation *)
-
-let js_files = [ "jquery-1.1.3.1.pack.js";
- "jquery.treeview.pack.js" ]
-
-let diagram_basename = ref ""
-
-(* let filename_of_object x = x.Datamodel_types.name ^ ".html" *)
-let href x y = Xml.Element("a", [ "href", x ], y)
-(* let link_to_object x y = href (filename_of_object x) y *)
-
-let write_html doc filename =
- ignore(Unix.system (Printf.sprintf "mkdir -p %s" (Filename.dirname filename)));
- let oc = open_out filename in
- let txt = Xml.to_string_fmt doc in
- output_string oc txt;
- close_out oc
-
-let link_to_css css =
- Xml.Element("link", [ "type", "text/css";
- "rel", "stylesheet";
- "href", css;
- "media", "all" ], [Xml.PCData ""])
-
-let javascript uri =
- Xml.Element("script", [ "src", uri;
- "type", "text/javascript" ], [Xml.PCData ""])
-
-let li contents =
- Xml.Element("li", [], contents)
-
-let ul contents =
- Xml.Element("ul", [], contents)
-
-let flat_list contents =
- ul (List.map (fun x -> li [ x ]) contents)
-
-let div cls contents = Xml.Element("div", [ "class", cls ], contents)
-let span cls contents = Xml.Element("span", [ "class", cls ], contents)
-
-let h1 txt = Xml.Element("h1", [], [ Xml.PCData txt ])
-
-let img src = Xml.Element("img", [ "src", src ], [])
-
-let header title =
- let logo = img "xensource_toplogo.gif"
- and text = Xml.Element("p", [], [ Xml.PCData (!document_title ^ ": " ^ title) ]) in
- div "title" [ logo; text ]
-
-let html ?(rel="") ?(hdr=true) ?(css=[]) ?(scripts=[]) title body =
- let head =
- let js_files = List.map (fun x -> rel ^ x) js_files in
- let scripts = List.map (fun x -> rel ^ x) scripts in
- Xml.Element("head", [], [
- Xml.Element("title", [], [ Xml.PCData title ]);
- Xml.Element("meta", [ "http-equiv", "content-type";
- "content", "application/xhtml+xml; charset=utf-8" ], []);
- link_to_css (rel ^ "api.css") ]
- @ (List.map link_to_css css)
- @ (List.map javascript (js_files @ scripts))) in
- Xml.Element("html", [],
- [ head;
- Xml.Element("body", [], if hdr then header title :: body else body) ])
-
-let td ?cls ?colspan x =
- let cls = match cls with
- | Some c -> [ "class", c ] | None -> [] in
- let colspan = match colspan with
- | None -> [] | Some x -> [ "colspan", x ] in
- Xml.Element("td", cls @ colspan, x)
-let tr ?cls x =
- let cls = match cls with
- | None -> [] | Some c -> [ "class", c ] in
- Xml.Element("tr", cls, x)
-
-let hr = Xml.Element("hr", [], [])
-let p ?cls x = Xml.Element("p", (match cls with Some x -> [ "class", x ] | _ -> []), x)
-
-let _API = "API"
-let _Classes = "Classes"
-let _Enums = "Enums"
-let _Implicit = "Implicit"
-let _Explicit = "Explicit"
-let _Fields = "Fields"
-
-let autogen = "autogen"
-
-open Printf
-let filename_of_class ?(ext="html") x = sprintf "%s/%s/%s/index.%s" _API _Classes x.Datamodel_types.name ext
-let filename_of_field ?(ext="html") obj f = sprintf "%s/%s/%s/%s/%s.%s" _API _Classes obj.Datamodel_types.name _Fields (String.concat "_" f.Datamodel_types.full_name) ext
-let filename_of_enum ?(ext="html") name = sprintf "%s/%s/%s.%s" _API _Enums name ext
-let filename_of_implicit_msg ?(ext="html") m = sprintf "%s/%s/%s/%s/%s.%s" _API _Classes m.Datamodel_types.msg_obj_name _Implicit m.Datamodel_types.msg_name ext
-let filename_of_custom_msg ?(ext="html") m = sprintf "%s/%s/%s/%s/%s.%s" _API _Classes m.Datamodel_types.msg_obj_name _Explicit m.Datamodel_types.msg_name ext
-
-(* For creating links within the document *)
-let link_to_class x = href (filename_of_class x)
-let link_to_field ?(prefix="") obj f = href (prefix ^ (filename_of_field obj f))
-let link_to_implicit_msg ?(prefix="") x = href (prefix ^ (filename_of_implicit_msg x))
-let link_to_custom_msg ?(prefix="") x = href (prefix ^ (filename_of_custom_msg x))
-let link_to_enum name = href (filename_of_enum name)
-
-open Datamodel_types
-
-let rec string_of_ty = function
- | String -> "string"
- | Int -> "int"
- | Float -> "float"
- | Bool -> "bool"
- | DateTime -> "datetime"
- | Enum (name, _) -> sprintf "enum %s" name
- | Set t -> sprintf "Set[%s]" (string_of_ty t)
- | Map (a, b) -> sprintf "Map[%s,%s]" (string_of_ty a) (string_of_ty b)
- | Ref x -> x
- | Record x -> sprintf "Record[%s]" x
-
-let rec hyperlink_of_ty =
- let prim x = [ Xml.PCData x ] in
- let href x = href (sprintf "%s/%s/%s.html" _API _Classes x) [ Xml.PCData x ] in function
- | String -> prim "string" | Int -> prim "int" | Float -> prim "float"
- | Bool -> prim "bool" | DateTime -> prim "datetime"
- | Enum (name, _) -> [ link_to_enum name [ Xml.PCData name ] ]
- | Set t -> [ Xml.PCData "Set[" ] @ (hyperlink_of_ty t) @ [ Xml.PCData "]" ]
- | Map (a, b) -> [ Xml.PCData "Map[" ] @ (hyperlink_of_ty a) @ [ Xml.PCData "," ] @ (hyperlink_of_ty b) @ [ Xml.PCData "]" ]
- | Ref x -> [ href x ]
- | Record x -> [ Xml.PCData "Record["; href x; Xml.PCData "]" ]
-
-open Datamodel_utils
-
-let expand_params obj m =
- (* Consider expanding the arguments if this is a constructor *)
- let params =
- if m.msg_tag = FromObject Make
- then
- let fields = List.filter (fun x -> x.qualifier <> DynamicRO) (fields_of_obj obj) in
- List.map (fun f -> {param_type=f.ty; param_name=(String.concat "_" f.full_name); param_doc=f.field_description; param_release=f.release; param_default=None}) fields
- else m.msg_params in
- (* Consider adding in a session reference if required *)
- let params =
- if m.msg_session
- then {param_type=Ref Datamodel._session; param_name="session_id"; param_doc="valid session reference"; param_release=m.msg_release; param_default=None} :: params
- else params in
- params
-
-let strings_of_message obj m =
- let r = default "void" (may (fun (t, _) -> string_of_ty t) m.msg_result) in
- let arg p = string_of_ty p.param_type ^ " " ^ p.param_name in
- let params = expand_params obj m in
- r, m.msg_name, "(" ^ (String.concat ", " (List.map arg params)) ^ ")"
-
-let string_of_message obj m =
- let return, name, args = strings_of_message obj m in
- sprintf "%s %s%s" return name args
-
-let strings_of_field f =
- string_of_ty f.ty, String.concat "_" f.full_name
-
-let string_of_field f =
- let ty, name = strings_of_field f in
- ty ^ " " ^ name
-
-(** True if a message came from a field (get/set) *)
-let derived_from_field f x = match x.msg_tag with
- | FromField(_, f') -> f = f'
- | _ -> false
-
-(** True if a message was 'custom' *)
-let custom x = match x.msg_tag with
- | Custom -> true
- | _ -> false
-
-(** True if a message was derived from a class ('implicit') *)
-let from_object x = match x.msg_tag with
- | FromObject (Private _) -> false
- | FromObject _ -> true
- | _ -> false
View
35 ocaml/idl/html_imagemap.ml
@@ -1,35 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-(** Generate the clickable imagemap *)
-
-open Html_common
-
-let parse_imagemap map image =
- let doc = Xml.parse_file map in
- let name = match doc with
- | Xml.Element("map", attr, _) ->
- List.assoc "name" attr
- | _ -> failwith "Failed to extract name from imagemap" in
- [ Xml.Element("img", [ "src", image; "usemap", "#" ^ name ], []); doc ]
-
-let imagemap api =
-(* let objects = Dm_api.objects_of_api api in*)
-(* let list = flat_list (List.map (fun x -> link_to_object x [ Xml.PCData x.name ]) objects) in*)
- let map = parse_imagemap (!diagram_basename ^ ".map") (!diagram_basename ^ ".gif") in
- let title = [ h1 "Class relationship diagram";
- p [ Xml.PCData "Click on a class to view the associated fields and messages" ] ] in
- html ~hdr:false "Class index" (title @ map)
-
-let go api =
- write_html (imagemap api) class_index
View
29 ocaml/idl/html_main.ml
@@ -1,29 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-open Printf
-open Stringext
-
-open Datamodel_types
-open Datamodel
-open Datamodel_utils
-open Dm_api
-open Html_common
-
-let all ?(title="XenEnterprise Management API") dotbase api =
- diagram_basename := dotbase;
- document_title := title;
-
- Html_imagemap.go api;
- Html_autogen.go api
-
View
34 ocaml/idl/html_types.ml
@@ -1,34 +0,0 @@
-(*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; version 2.1 only. with the special
- * exception on linking described in file LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *)
-(* Generate some extra information about types of fields and message parameters *)
-
-open Datamodel_types
-open Html_common
-open Printf
-
-(** A quick description of the type *)
-let info_of_ty = function
- | String -> Xml.PCData "UTF-8 encoded character data"
- | Int -> Xml.PCData "64-bit integer"
- | Float -> Xml.PCData "IEEE-754 floating point number"
- | Bool -> Xml.PCData "boolean"
- | DateTime -> Xml.PCData "ISO-8601 encoded date (e.g 2008-01-01T12:34:00Z)"
- | Enum (name, kv) ->
- Xml.Element("table", [ "class", "enum" ],
- (tr [ td [ Xml.PCData "Value" ]; td [ Xml.PCData "Description" ] ])::
- List.map (fun (k, v) -> tr [ td [ Xml.PCData k ]; td [ Xml.PCData v ] ]) kv)
- | Set t -> Xml.PCData (sprintf "an unordered set of entities of type: %s" (string_of_ty t))
- | Map (a, b) -> Xml.PCData (sprintf "mapping from %s to %s" (string_of_ty a) (string_of_ty b))
- | Ref x -> Xml.PCData (x ^ " reference")
- | Record x -> Xml.PCData (sprintf "all the fields of an object of type %s" x)
View
668 ocaml/idl/testinclude.tex
@@ -1,668 +0,0 @@
-\newpage\section{Session Management}
-
-\subsection{Session.Login}
-
-{\bf Overview:}
-Attempt to authenticate the user, returning a session\_id if successful
-
- \noindent {\bf Signature:}
-\begin{verbatim} session_id Session.Login (string uname, string pwd)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt string } & uname & Username for login. \\ \hline
-
-{\tt string } & pwd & Password for login. \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-session\_id
-}
-
-
-ID of newly created session
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{Session.Logout}
-
-{\bf Overview:}
-Log out of a session
-
- \noindent {\bf Signature:}
-\begin{verbatim} void Session.Logout (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-
-
-\newpage\section{VM Management}
-
-\subsection{VM.Install}
-
-{\bf Overview:}
-Install a new VM
-
- \noindent {\bf Signature:}
-\begin{verbatim} vm_id VM.Install (session_id s, vm_config config)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_config } & config & An XML String specifying initial configuration for the VM. \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-vm\_id
-}
-
-
-The ID of the installed VM.
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.GetConfig}
-
-{\bf Overview:}
-Return the XML Config file specifying the current state of a VM.
-
- \noindent {\bf Signature:}
-\begin{verbatim} vm_config VM.GetConfig (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM whose config is being requested. \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-vm\_config
-}
-
-
-The XML Config file for the specified VM.
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.Delete}
-
-{\bf Overview:}
-Delete the VM and its associated configuration and disk images from storage
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.Delete (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to delete \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.SetUnstartable}
-
-{\bf Overview:}
-Prevents the VM from being started.
- This is useful for making template-VMs that are only used for cloning.
- (This function can only be called when the specified VM is in the Halted State).
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.SetUnstartable (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to set as unstartable \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.ClearUnstartable}
-
-{\bf Overview:}
-Undoes the effect of VM.SetUnstartable, allowing a VM to be started subsequently.
- (This function can only be called when the VM is in the Halted State).
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.ClearUnstartable (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to set as unstartable \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.Clone}
-
-{\bf Overview:}
-Clones the specified VM, making a new VM.
- (This function can only be called when the VM is in the Halted State).
-
- \noindent {\bf Signature:}
-\begin{verbatim} vm_id VM.Clone (session_id s, vm_id vm, string new_name)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to be cloned \\ \hline
-
-{\tt string } & new\_name & The name of the cloned VM \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-vm\_id
-}
-
-
-The ID of the newly created VM.
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.Start}
-
-{\bf Overview:}
-Start the specified VM.
- (This function can only be called with the VM is in the Halted State).
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.Start (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to start \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.Shutdown}
-
-{\bf Overview:}
-Cleanly shutdown the specified VM.
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.Shutdown (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to shutdown \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.Destroy}
-
-{\bf Overview:}
-Destroy the specified VM without attempting a clean shutdown
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.Destroy (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to destroy \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.Reboot}
-
-{\bf Overview:}
-Reboot the specified VM
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.Reboot (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to reboot \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.Hibernate}
-
-{\bf Overview:}
-Hibernate the specified VM
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.Hibernate (session_id s, vm_id vm, bool live)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to hibernate \\ \hline
-
-{\tt bool } & live & If set to true, perform a live hibernate; otherwise pause the VM before commencing hibernate \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{VM.UnHibernate}
-
-{\bf Overview:}
-Arouse the specified VM from hibernation and revivify it
-
- \noindent {\bf Signature:}
-\begin{verbatim} void VM.UnHibernate (session_id s, vm_id vm)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt vm\_id } & vm & The VM to unhibernate \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-
-
-\newpage\section{Host Management}
-
-\subsection{Host.ListAllVMs}
-
-{\bf Overview:}
-List all VMs installed on the specified host.
-
- \noindent {\bf Signature:}
-\begin{verbatim} List<vm_id> Host.ListAllVMs (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-List<vm\_id>
-}
-
-
-List of VMs installed on specified host
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{Host.ListRunningVMs}
-
-{\bf Overview:}
-List all VMs currently running on the specified host.
-
- \noindent {\bf Signature:}
-\begin{verbatim} List<vm_id> Host.ListRunningVMs (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-List<vm\_id>
-}
-
-
-List of VMs currently running on the specified host.
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{Host.GetConfig}
-
-{\bf Overview:}
-Get the host configuration as an XML string.
-
- \noindent {\bf Signature:}
-\begin{verbatim} XML Host.GetConfig (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-XML
-}
-
-
-An XML string representing the host confiruation.
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{Host.Disable}
-
-{\bf Overview:}
-Puts the host into a state in which no new VMs can be started.
-
- \noindent {\bf Signature:}
-\begin{verbatim} void Host.Disable (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{Host.Shutdown}
-
-{\bf Overview:}
-Shutdown the host. (This function can only be called if there are no currently running VMs ont he host and it is disabled.)
-
- \noindent {\bf Signature:}
-\begin{verbatim} void Host.Shutdown (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{Host.GetVersion}
-
-{\bf Overview:}
-Return a string specifying version of Xen and support tools running on the host
-
- \noindent {\bf Signature:}
-\begin{verbatim} string Host.GetVersion (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-string
-}
-
-
-Version string
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-
-
-\newpage\section{Task Management}
-
-\subsection{Async.Task.GetStatus}
-
-{\bf Overview:}
-Poll a running asynchronous RPC invocation and query its status
-
- \noindent {\bf Signature:}
-\begin{verbatim} XML Async.Task.GetStatus (session_id s, task_id task)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task\_id } & task & The ID of the RPC call to poll \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-XML
-}
-
-
-XML string describing status of specified asynchronous RPC invocation
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-\subsection{Async.Task.GetAllTasks}
-
-{\bf Overview:}
-List all asynchronous RPC calls currently executing
-
- \noindent {\bf Signature:}
-\begin{verbatim} List<task_id> Async.Task.GetAllTasks (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-List<task\_id>
-}
-
-
-A list of tasks currently executing. Note that
-tasks are associated with users rather than sessions. Thus, if you logout and
-login again with a different session but the same user, this function will still
-return the user's running tasks.
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-
-
-
View
26 ocaml/idl/xenenterpriseapi-datamodel-graph.map
@@ -1,26 +0,0 @@
-<map id="g" name="g">
-<area shape="rect" href="API/Classes/task" title="an asynchronous server&#45;side task" alt="" coords="432,247,504,295" />
-<area shape="rect" href="API/Classes/event" title="allows event registration and reading" alt="" coords="432,324,504,372" />
-<area shape="rect" href="API/Classes/pool" title="a Resource Pool" alt="" coords="316,285,388,333" />
-<area shape="rect" href="API/Classes/session" title="an authenticated session" alt="" coords="111,253,183,301" />
-<area shape="rect" href="API/Classes/user" title="a user" alt="" coords="7,241,79,289" />
-<area shape="rect" href="API/Classes/host" title="a physical host" alt="" coords="224,268,296,316" />
-<area shape="rect" href="API/Classes/VM" title="a Virtual Machine" alt="" coords="610,335,682,383" />
-<area shape="rect" href="API/Classes/VM_metrics" title="dynamic VM configuration information" alt="" coords="711,337,804,385" />
-<area shape="rect" href="API/Classes/VM_guest_metrics" title="dynamic information from inside the guest" alt="" coords="716,463,844,511" />
-<area shape="rect" href="API/Classes/crashdump" title="VM crashdump" alt="" coords="686,271,776,319" />
-<area shape="rect" href="API/Classes/console" title="location information for a guest&#39;s console" alt="" coords="643,485,715,533" />
-<area shape="rect" href="API/Classes/PBD" title="the connection between an SR and a host" alt="" coords="294,176,366,224" />
-<area shape="rect" href="API/Classes/host_metrics" title="dynamic host information" alt="" coords="138,344,236,392" />
-<area shape="rect" href="API/Classes/host_cpu" title="a physical CPU on a host" alt="" coords="167,173,244,221" />
-<area shape="rect" href="API/Classes/network" title="an ethernet network" alt="" coords="396,397,471,445" />
-<area shape="rect" href="API/Classes/VIF" title="a network interface for a Virtual Machine" alt="" coords="508,401,580,449" />
-<area shape="rect" href="API/Classes/VIF_metrics" title="IO stats and configuration information for a virtual interface" alt="" coords="502,517,595,565" />
-<area shape="rect" href="API/Classes/PIF" title="a network interface for a physical host" alt="" coords="290,367,362,415" />
-<area shape="rect" href="API/Classes/PIF_metrics" title="IO stats and configuration information for a physical interface" alt="" coords="234,471,324,519" />
-<area shape="rect" href="API/Classes/SR" title="Storage Repository, a container for virtual disk images (VDIs)" alt="" coords="388,116,460,164" />
-<area shape="rect" href="API/Classes/VDI" title="a virtual disk image" alt="" coords="495,149,567,197" />
-<area shape="rect" href="API/Classes/SM" title="storage manager plugin module" alt="" coords="380,7,452,55" />
-<area shape="rect" href="API/Classes/VBD" title="a virtual block device" alt="" coords="583,217,655,265" />
-<area shape="rect" href="API/Classes/VBD_metrics" title="IO stats and configuration information for a virtual block device" alt="" coords="644,129,743,177" />
-</map>
View
54 ocaml/idl/xensource_logo.eps
0 additions, 54 deletions not shown
View
BIN  ocaml/idl/xensource_logo.gif
Deleted file not rendered
View
BIN  ocaml/idl/xensource_logo.png
Deleted file not rendered
View
BIN  ocaml/idl/xensource_toplogo.gif
Deleted file not rendered
Please sign in to comment.
Something went wrong with that request. Please try again.