Revision be350355

b/docs/Makefile
1
# Makefile for Sphinx documentation
2
#
3

  
4
# You can set these variables from the command line.
5
SPHINXOPTS    =
6
SPHINXBUILD   = sphinx-build
7
PAPER         =
8
BUILDDIR      = _build
9

  
10
# Internal variables.
11
PAPEROPT_a4     = -D latex_paper_size=a4
12
PAPEROPT_letter = -D latex_paper_size=letter
13
ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14
# the i18n builder cannot share the environment and doctrees with the others
15
I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16

  
17
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
18

  
19
help:
20
	@echo "Please use \`make <target>' where <target> is one of"
21
	@echo "  html       to make standalone HTML files"
22
	@echo "  dirhtml    to make HTML files named index.html in directories"
23
	@echo "  singlehtml to make a single large HTML file"
24
	@echo "  pickle     to make pickle files"
25
	@echo "  json       to make JSON files"
26
	@echo "  htmlhelp   to make HTML files and a HTML help project"
27
	@echo "  qthelp     to make HTML files and a qthelp project"
28
	@echo "  devhelp    to make HTML files and a Devhelp project"
29
	@echo "  epub       to make an epub"
30
	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
31
	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
32
	@echo "  text       to make text files"
33
	@echo "  man        to make manual pages"
34
	@echo "  texinfo    to make Texinfo files"
35
	@echo "  info       to make Texinfo files and run them through makeinfo"
36
	@echo "  gettext    to make PO message catalogs"
37
	@echo "  changes    to make an overview of all changed/added/deprecated items"
38
	@echo "  linkcheck  to check all external links for integrity"
39
	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
40

  
41
clean:
42
	-rm -rf $(BUILDDIR)/*
43

  
44
html:
45
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
46
	@echo
47
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
48

  
49
dirhtml:
50
	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
51
	@echo
52
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
53

  
54
singlehtml:
55
	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
56
	@echo
57
	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
58

  
59
pickle:
60
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
61
	@echo
62
	@echo "Build finished; now you can process the pickle files."
63

  
64
json:
65
	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
66
	@echo
67
	@echo "Build finished; now you can process the JSON files."
68

  
69
htmlhelp:
70
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
71
	@echo
72
	@echo "Build finished; now you can run HTML Help Workshop with the" \
73
	      ".hhp project file in $(BUILDDIR)/htmlhelp."
74

  
75
qthelp:
76
	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
77
	@echo
78
	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
79
	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
80
	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/snf-occi.qhcp"
81
	@echo "To view the help file:"
82
	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/snf-occi.qhc"
83

  
84
devhelp:
85
	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
86
	@echo
87
	@echo "Build finished."
88
	@echo "To view the help file:"
89
	@echo "# mkdir -p $$HOME/.local/share/devhelp/snf-occi"
90
	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/snf-occi"
91
	@echo "# devhelp"
92

  
93
epub:
94
	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
95
	@echo
96
	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
97

  
98
latex:
99
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
100
	@echo
101
	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
102
	@echo "Run \`make' in that directory to run these through (pdf)latex" \
103
	      "(use \`make latexpdf' here to do that automatically)."
104

  
105
latexpdf:
106
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
107
	@echo "Running LaTeX files through pdflatex..."
108
	$(MAKE) -C $(BUILDDIR)/latex all-pdf
109
	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
110

  
111
text:
112
	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
113
	@echo
114
	@echo "Build finished. The text files are in $(BUILDDIR)/text."
115

  
116
man:
117
	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
118
	@echo
119
	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
120

  
121
texinfo:
122
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
123
	@echo
124
	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
125
	@echo "Run \`make' in that directory to run these through makeinfo" \
126
	      "(use \`make info' here to do that automatically)."
127

  
128
info:
129
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
130
	@echo "Running Texinfo files through makeinfo..."
131
	make -C $(BUILDDIR)/texinfo info
132
	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
133

  
134
gettext:
135
	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
136
	@echo
137
	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
138

  
139
changes:
140
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
141
	@echo
142
	@echo "The overview file is in $(BUILDDIR)/changes."
143

  
144
linkcheck:
145
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
146
	@echo
147
	@echo "Link check complete; look for any errors in the above output " \
148
	      "or in $(BUILDDIR)/linkcheck/output.txt."
149

  
150
doctest:
151
	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
152
	@echo "Testing of doctests in the sources finished, look at the " \
153
	      "results in $(BUILDDIR)/doctest/output.txt."
b/docs/conf.py
1
import sys, os
2

  
3
extensions = []
4

  
5
# Add any paths that contain templates here, relative to this directory.
6
templates_path = ['_templates']
7

  
8
# The suffix of source filenames.
9
source_suffix = '.rst'
10

  
11
# The encoding of source files.
12
#source_encoding = 'utf-8-sig'
13

  
14
# The master toctree document.
15
master_doc = 'index'
16

  
17
# General information about the project.
18
project = u'snf-occi'
19
copyright = u'2012, GRNET'
20

  
21
# The version info for the project you're documenting, acts as replacement for
22
# |version| and |release|, also used in various other places throughout the
23
# built documents.
24
#
25
# The short X.Y version.
26
version = '0.1'
27
# The full version, including alpha/beta/rc tags.
28
release = '0.1'
29

  
30
# The language for content autogenerated by Sphinx. Refer to documentation
31
# for a list of supported languages.
32
#language = None
33

  
34
# There are two options for replacing |today|: either, you set today to some
35
# non-false value, then it is used:
36
#today = ''
37
# Else, today_fmt is used as the format for a strftime call.
38
#today_fmt = '%B %d, %Y'
39

  
40
# List of patterns, relative to source directory, that match files and
41
# directories to ignore when looking for source files.
42
exclude_patterns = ['_build']
43

  
44
# The reST default role (used for this markup: `text`) to use for all documents.
45
#default_role = None
46

  
47
# If true, '()' will be appended to :func: etc. cross-reference text.
48
#add_function_parentheses = True
49

  
50
# If true, the current module name will be prepended to all description
51
# unit titles (such as .. function::).
52
#add_module_names = True
53

  
54
# If true, sectionauthor and moduleauthor directives will be shown in the
55
# output. They are ignored by default.
56
#show_authors = False
57

  
58
# The name of the Pygments (syntax highlighting) style to use.
59
pygments_style = 'sphinx'
60

  
61
# A list of ignored prefixes for module index sorting.
62
#modindex_common_prefix = []
63

  
64

  
65
# -- Options for HTML output ---------------------------------------------------
66

  
67
# The theme to use for HTML and HTML Help pages.  See the documentation for
68
# a list of builtin themes.
69
html_theme = 'nature'
70

  
71
# Theme options are theme-specific and customize the look and feel of a theme
72
# further.  For a list of options available for each theme, see the
73
# documentation.
74
#html_theme_options = {}
75

  
76
# Add any paths that contain custom themes here, relative to this directory.
77
#html_theme_path = []
78

  
79
# The name for this set of Sphinx documents.  If None, it defaults to
80
# "<project> v<release> documentation".
81
#html_title = None
82

  
83
# A shorter title for the navigation bar.  Default is the same as html_title.
84
#html_short_title = None
85

  
86
# The name of an image file (relative to this directory) to place at the top
87
# of the sidebar.
88
#html_logo = None
89

  
90
# The name of an image file (within the static path) to use as favicon of the
91
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
92
# pixels large.
93
#html_favicon = None
94

  
95
# Add any paths that contain custom static files (such as style sheets) here,
96
# relative to this directory. They are copied after the builtin static files,
97
# so a file named "default.css" will overwrite the builtin "default.css".
98
html_static_path = ['_static']
99

  
100
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
101
# using the given strftime format.
102
#html_last_updated_fmt = '%b %d, %Y'
103

  
104
# If true, SmartyPants will be used to convert quotes and dashes to
105
# typographically correct entities.
106
#html_use_smartypants = True
107

  
108
# Custom sidebar templates, maps document names to template names.
109
#html_sidebars = {}
110

  
111
# Additional templates that should be rendered to pages, maps page names to
112
# template names.
113
#html_additional_pages = {}
114

  
115
# If false, no module index is generated.
116
#html_domain_indices = True
117

  
118
# If false, no index is generated.
119
#html_use_index = True
120

  
121
# If true, the index is split into individual pages for each letter.
122
#html_split_index = False
123

  
124
# If true, links to the reST sources are added to the pages.
125
#html_show_sourcelink = True
126

  
127
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
128
#html_show_sphinx = True
129

  
130
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
131
#html_show_copyright = True
132

  
133
# If true, an OpenSearch description file will be output, and all pages will
134
# contain a <link> tag referring to it.  The value of this option must be the
135
# base URL from which the finished HTML is served.
136
#html_use_opensearch = ''
137

  
138
# This is the file name suffix for HTML files (e.g. ".xhtml").
139
#html_file_suffix = None
140

  
141
# Output file base name for HTML help builder.
142
htmlhelp_basename = 'snf-occidoc'
143

  
144

  
145
# -- Options for LaTeX output --------------------------------------------------
146

  
147
latex_elements = {
148
# The paper size ('letterpaper' or 'a4paper').
149
#'papersize': 'letterpaper',
150

  
151
# The font size ('10pt', '11pt' or '12pt').
152
#'pointsize': '10pt',
153

  
154
# Additional stuff for the LaTeX preamble.
155
#'preamble': '',
156
}
157

  
158
# Grouping the document tree into LaTeX files. List of tuples
159
# (source start file, target name, title, author, documentclass [howto/manual]).
160
latex_documents = [
161
  ('index', 'snf-occi.tex', u'snf-occi Documentation',
162
   u'John Giannelos', 'manual'),
163
]
164

  
165
# The name of an image file (relative to this directory) to place at the top of
166
# the title page.
167
#latex_logo = None
168

  
169
# For "manual" documents, if this is true, then toplevel headings are parts,
170
# not chapters.
171
#latex_use_parts = False
172

  
173
# If true, show page references after internal links.
174
#latex_show_pagerefs = False
175

  
176
# If true, show URL addresses after external links.
177
#latex_show_urls = False
178

  
179
# Documents to append as an appendix to all manuals.
180
#latex_appendices = []
181

  
182
# If false, no module index is generated.
183
#latex_domain_indices = True
184

  
185

  
186
# -- Options for manual page output --------------------------------------------
187

  
188
# One entry per manual page. List of tuples
189
# (source start file, name, description, authors, manual section).
190
man_pages = [
191
    ('index', 'snf-occi', u'snf-occi Documentation',
192
     [u'John Giannelos'], 1)
193
]
194

  
195
# If true, show URL addresses after external links.
196
#man_show_urls = False
197

  
198

  
199
# -- Options for Texinfo output ------------------------------------------------
200

  
201
# Grouping the document tree into Texinfo files. List of tuples
202
# (source start file, target name, title, author,
203
#  dir menu entry, description, category)
204
texinfo_documents = [
205
  ('index', 'snf-occi', u'snf-occi Documentation',
206
   u'John Giannelos', 'snf-occi', 'One line description of project.',
207
   'Miscellaneous'),
208
]
209

  
210
# Documents to append as an appendix to all manuals.
211
#texinfo_appendices = []
212

  
213
# If false, no module index is generated.
214
#texinfo_domain_indices = True
215

  
216
# How to display URL addresses: 'footnote', 'no', or 'inline'.
217
#texinfo_show_urls = 'footnote'
218

  
219
intersphinx_mapping = {
220
    'python': ('http://docs.python.org/', None),
221
    'django': ('https://docs.djangoproject.com/en/dev/',
222
               'https://docs.djangoproject.com/en/dev/_objects/')
223
}
b/docs/index.rst
1
.. snf-occi documentation master file, created by
2
   sphinx-quickstart on Mon Mar 26 13:45:54 2012.
3
   You can adapt this file completely to your liking, but it should at least
4
   contain the root `toctree` directive.
5

  
6
Welcome to snf-occi's documentation!
7
====================================
8

  
9
snf-occi implements OCCI specifications to synnefo's API in order to achieve greater interoperability in common tasks refering cyclades management.
10

  
11
.. toctree::
12
   :maxdepth: 2
13

  
14
About OCCI
15
----------
16
Current OCCI specification consists of the following three documents:
17

  
18
* `OCCI Core <http://ogf.org/documents/GFD.183.pdf>`_
19
* `OCCI Infrastructure <http://ogf.org/documents/GFD.184.pdf>`_
20
* `OCCI HTTP rendering <http://ogf.org/documents/GFD.185.pdf>`_
21

  
22
OCCI and Cyclades
23
-----------------
24
OCCI implementation in Cyclades is going to be based in the **OCCI Infrastructure** specifications, in which common Cloud IaaS components are described. Below you can see the matching components between OCCI and Cyclades:
25

  
26
+----------------+------------------+
27
|OCCI            |Cyclades          |
28
+================+==================+
29
|Compute linked  |Synnefo servers   |
30
|to Storage      |                  |
31
+----------------+------------------+
32
|Mixin           |Synnefo images    |
33
|                |                  |
34
+----------------+------------------+
35
|Mixin           |Synnefo flavors   |
36
+----------------+------------------+
37
|Network         |Network and       |
38
|                |NetworkInterfaces |
39
|                |from              |
40
|                |synnefo.db.models |
41
+----------------+------------------+
42
|NetworkInterface|NetworkLink in    |
43
|                |synnefo.db.models |
44
+----------------+------------------+
45
 
46
**Note:** Metadata info in synnefo's servers cannot be represented (clearly) using OCCI's components.
47

  
48

  
49
Call mapping from OCCI to Cyclades API
50
---------------------------------------
51
Due to OCCI's structure there cannot be straightforward mapping to Cyclades/OpenStack API. The missing elements are:
52

  
53
* Networking capabilities using current Cyclades API (networking is supported, but not in OCCI's format)
54
* OCCI seperates the compute resource from the storage or image/flavor. As a result synnefo's servers cannot be represented only with OCCI's Compute.
55

  
56
OCCI operations-Mapping
57
***********************
58

  
59
Below you can see the required procedures/operations for OCCI compatibility, and their mappings to Cyclades API (if possible).
60
   
61
* Handling the query interface
62
   * Query interface must be found under path /-/
63
   * Retrieve all registered Kinds, Actions and Mixins
64
   * Add a mixin definition
65
   * Remove a mixin definition
66

  
67
* Operation on paths in the name-space 
68
   * Retrieving the state of the name-space hierarchy
69
   * Retrieving all Resource instances below a path
70
   * Deletion of all Resource instances below a path
71

  
72
* Operations on Mixins and Kinds
73
   * Retrieving all Resource instances belonging to Mixin or Kind
74
   * Triggering actions to all instances of a Mixin or a Kind
75
   * Associate resource instances with a Mixin or a Kind
76
   * Full update of a Mixin collection
77
   * Dissociate resource instances from a Mixin
78

  
79
* Operations on Resource instances
80
   * Creating a resource instance
81
       * Compute: api.server.create_server()
82
       * Network: -
83
       * Storage: -
84
   * Retrieving a resource instance
85
       * Compute: api.server.get_server_details()
86
       * Network: -
87
       * Storage: -
88
   * Partial update of a resource instance
89
       * Compute: api.actions.resize()
90
       * Network: -
91
       * Storage: -
92
   * Full update of a resource instance
93
       * Compute: -
94
       * Network: -
95
       * Storage: -
96
   * Delete a resource instance
97
       * Compute: api.server.delete_server()
98
       * Network: -
99
       * Storage: -
100
   * Triggering an action on a resource instance
101
       * Compute: api.actions.start(), api.actions.shutdown(), api.actions.reboot()
102
       * Network: -
103
       * Storage: -
104

  
105
* Handling Link instances **(not well-defined in Cyclades API)**
106
      * Inline creation of a Link instance
107
      * Retrieving Resource instances with defined Links
108
      * Creating of Link Resource instance
109

  
110

  
111
OCCI client/server library
112
==========================
113

  
114
occi-py is a generic library implementation of the Open Cloud Computing Interface (OCCI). It aims to provide a high-level interface for the integration of OCCI to other new or existing applications. 
115

  
116
Features:
117
---------
118

  
119
* It includes a REST API service with the OCCI specifications already implemented
120
* It only requires a custom backend to interact with Cyclades
121
* Being a python wsgi application, occi-py is easily deployed with Django or with its default web-server (tornado).
122

  
123
Package on pypi: `OCCI 0.6 <http://pypi.python.org/pypi/occi/0.6>`_
124

  
125

  
126

  
127
Indices and tables
128
==================
129

  
130
* :ref:`genindex`
131
* :ref:`search`
132

  

Also available in: Unified diff