Add XML files with admin API specification

No online docs are build from it since it doesn't really fit into our
document structure and new page will need to be created for it, but this
is at least a heads-up commit for easier parsing in order to build some
documentation (or python bindings) later on.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2015-04-15 16:23:25 +02:00
parent 55e0c840af
commit 878bf2a3c9
4 changed files with 30 additions and 5 deletions

1
.gitignore vendored
View File

@ -69,6 +69,7 @@
/docs/apibuild.py.stamp /docs/apibuild.py.stamp
/docs/devhelp/libvirt.devhelp /docs/devhelp/libvirt.devhelp
/docs/hvsupport.html.in /docs/hvsupport.html.in
/docs/libvirt-admin-*.xml
/docs/libvirt-api.xml /docs/libvirt-api.xml
/docs/libvirt-lxc-*.xml /docs/libvirt-lxc-*.xml
/docs/libvirt-qemu-*.xml /docs/libvirt-qemu-*.xml

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2014 Red Hat, Inc. ## Copyright (C) 2005-2015 Red Hat, Inc.
## ##
## This library is free software; you can redistribute it and/or ## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public ## modify it under the terms of the GNU Lesser General Public
@ -128,8 +128,16 @@ lxc_xml = \
libvirt-lxc-api.xml \ libvirt-lxc-api.xml \
libvirt-lxc-refs.xml libvirt-lxc-refs.xml
admin_xml = \
libvirt-admin-api.xml \
libvirt-admin-refs.xml
apidir = $(pkgdatadir)/api apidir = $(pkgdatadir)/api
api_DATA = libvirt-api.xml libvirt-qemu-api.xml libvirt-lxc-api.xml api_DATA = \
libvirt-api.xml \
libvirt-qemu-api.xml \
libvirt-lxc-api.xml \
libvirt-admin-api.xml
fig = \ fig = \
libvirt-net-logical.fig \ libvirt-net-logical.fig \
@ -149,7 +157,7 @@ EXTRA_DIST= \
hacking1.xsl hacking2.xsl wrapstring.xsl \ hacking1.xsl hacking2.xsl wrapstring.xsl \
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \ $(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \ $(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
$(xml) $(qemu_xml) $(lxc_xml) $(fig) $(png) $(css) \ $(xml) $(qemu_xml) $(lxc_xml) $(admin_xml) $(fig) $(png) $(css) \
$(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\ $(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\
$(internals_html_in) $(internals_html) \ $(internals_html_in) $(internals_html) \
sitemap.html.in aclperms.htmlinc \ sitemap.html.in aclperms.htmlinc \
@ -174,6 +182,7 @@ all-am: web
api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml api: $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml
qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml qemu_api: $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml lxc_api: $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
admin_api: $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \ web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \
$(dot_php) $(dot_php)
@ -274,6 +283,7 @@ $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
python_generated_files = \ python_generated_files = \
$(srcdir)/html/libvirt-libvirt-lxc.html \ $(srcdir)/html/libvirt-libvirt-lxc.html \
$(srcdir)/html/libvirt-libvirt-qemu.html \ $(srcdir)/html/libvirt-libvirt-qemu.html \
$(srcdir)/html/libvirt-libvirt-admin.html \
$(srcdir)/html/libvirt-virterror.html \ $(srcdir)/html/libvirt-virterror.html \
$(srcdir)/libvirt-api.xml \ $(srcdir)/libvirt-api.xml \
$(srcdir)/libvirt-refs.xml \ $(srcdir)/libvirt-refs.xml \
@ -281,6 +291,8 @@ python_generated_files = \
$(srcdir)/libvirt-lxc-refs.xml \ $(srcdir)/libvirt-lxc-refs.xml \
$(srcdir)/libvirt-qemu-api.xml \ $(srcdir)/libvirt-qemu-api.xml \
$(srcdir)/libvirt-qemu-refs.xml \ $(srcdir)/libvirt-qemu-refs.xml \
$(srcdir)/libvirt-admin-api.xml \
$(srcdir)/libvirt-admin-refs.xml \
$(NULL) $(NULL)
APIBUILD=$(srcdir)/apibuild.py APIBUILD=$(srcdir)/apibuild.py
@ -304,10 +316,12 @@ $(APIBUILD_STAMP): $(srcdir)/apibuild.py \
$(top_srcdir)/include/libvirt/libvirt-stream.h \ $(top_srcdir)/include/libvirt/libvirt-stream.h \
$(top_srcdir)/include/libvirt/libvirt-lxc.h \ $(top_srcdir)/include/libvirt/libvirt-lxc.h \
$(top_srcdir)/include/libvirt/libvirt-qemu.h \ $(top_srcdir)/include/libvirt/libvirt-qemu.h \
$(top_srcdir)/include/libvirt/libvirt-admin.h \
$(top_srcdir)/include/libvirt/virterror.h \ $(top_srcdir)/include/libvirt/virterror.h \
$(top_srcdir)/src/libvirt.c \ $(top_srcdir)/src/libvirt.c \
$(top_srcdir)/src/libvirt-lxc.c \ $(top_srcdir)/src/libvirt-lxc.c \
$(top_srcdir)/src/libvirt-qemu.c \ $(top_srcdir)/src/libvirt-qemu.c \
$(top_srcdir)/src/libvirt-admin.c \
$(top_srcdir)/src/util/virerror.c \ $(top_srcdir)/src/util/virerror.c \
$(top_srcdir)/src/util/virevent.c \ $(top_srcdir)/src/util/virevent.c \
$(top_srcdir)/src/util/virtypedparam.c $(top_srcdir)/src/util/virtypedparam.c
@ -326,9 +340,10 @@ maintainer-clean-local: clean-local
todo.html.in todo.html.in
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
rm -rf $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml
rm -rf $(APIBUILD_STAMP) rm -rf $(APIBUILD_STAMP)
rebuild: api qemu_api lxc_api all rebuild: api qemu_api lxc_api admin_api all
install-data-local: install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR) $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)

View File

@ -59,6 +59,11 @@ lxc_included_files = {
"libvirt-lxc.c": "Implementations for the LXC specific APIs", "libvirt-lxc.c": "Implementations for the LXC specific APIs",
} }
admin_included_files = {
"libvirt-admin.h": "header with admin specific API definitions",
"libvirt-admin.c": "Implementations for the admin specific APIs",
}
ignored_words = { ignored_words = {
"ATTRIBUTE_UNUSED": (0, "macro keyword"), "ATTRIBUTE_UNUSED": (0, "macro keyword"),
"ATTRIBUTE_SENTINEL": (0, "macro keyword"), "ATTRIBUTE_SENTINEL": (0, "macro keyword"),
@ -2021,6 +2026,8 @@ class docBuilder:
self.includes = includes + qemu_included_files.keys() self.includes = includes + qemu_included_files.keys()
elif name == "libvirt-lxc": elif name == "libvirt-lxc":
self.includes = includes + lxc_included_files.keys() self.includes = includes + lxc_included_files.keys()
elif name == "libvirt-admin":
self.includes = includes + admin_included_files.keys()
self.modules = {} self.modules = {}
self.headers = {} self.headers = {}
self.idx = index() self.idx = index()
@ -2560,7 +2567,7 @@ class docBuilder:
def rebuild(name): def rebuild(name):
if name not in ["libvirt", "libvirt-qemu", "libvirt-lxc"]: if name not in ["libvirt", "libvirt-qemu", "libvirt-lxc", "libvirt-admin"]:
self.warning("rebuild() failed, unknown module %s") % name self.warning("rebuild() failed, unknown module %s") % name
return None return None
builder = None builder = None
@ -2604,6 +2611,7 @@ if __name__ == "__main__":
rebuild("libvirt") rebuild("libvirt")
rebuild("libvirt-qemu") rebuild("libvirt-qemu")
rebuild("libvirt-lxc") rebuild("libvirt-lxc")
rebuild("libvirt-admin")
if warnings > 0: if warnings > 0:
sys.exit(2) sys.exit(2)
else: else:

View File

@ -2328,6 +2328,7 @@ exit 0
%{_datadir}/libvirt/api/libvirt-api.xml %{_datadir}/libvirt/api/libvirt-api.xml
%{_datadir}/libvirt/api/libvirt-qemu-api.xml %{_datadir}/libvirt/api/libvirt-qemu-api.xml
%{_datadir}/libvirt/api/libvirt-lxc-api.xml %{_datadir}/libvirt/api/libvirt-lxc-api.xml
%{_datadir}/libvirt/api/libvirt-admin-api.xml
%doc docs/*.html docs/html docs/*.gif %doc docs/*.html docs/html docs/*.gif