Browse Source

Initialization of the freezer-specs repo

Change-Id: Icdad039d6368a8fb61b4a58c3f351997f9af200a
changes/65/316865/2
Pierre-Arthur MATHIEU 3 years ago
parent
commit
8b2d3579fc

+ 29
- 0
.gitignore View File

@@ -0,0 +1,29 @@
1
+__pycache__
2
+dist
3
+build
4
+.venv
5
+tests/scenario/.vagrant
6
+.idea
7
+.autogenerated
8
+.coverage
9
+cover/
10
+coverage.xml
11
+*.sw?
12
+.tox
13
+*.egg
14
+*.egg-info
15
+*.py[co]
16
+.DS_Store
17
+*.log
18
+.testrepository
19
+subunit.log
20
+.eggs
21
+AUTHORS
22
+ChangeLog
23
+
24
+# Django files that get created during the test runs
25
+.secret_key_store
26
+*.lock
27
+
28
+# Coverage data
29
+.coverage.*

+ 9
- 0
.testr.conf View File

@@ -0,0 +1,9 @@
1
+[DEFAULT]
2
+test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
3
+             OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
4
+             OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
5
+             ${PYTHON:-python} -m subunit.run discover -s ${OS_TEST_PATH:-./tests/} -t . $LISTOPT $IDOPTION
6
+
7
+test_id_option=--load-list $IDFILE
8
+test_list_option=--list
9
+group_regex=([^\.]+\.)+

+ 3
- 0
LICENSE View File

@@ -0,0 +1,3 @@
1
+This work is licensed under a Creative Commons Attribution 3.0 Unported License.
2
+
3
+http://creativecommons.org/licenses/by/3.0/legalcode

+ 141
- 0
README.rst View File

@@ -0,0 +1,141 @@
1
+=======
2
+README
3
+=======
4
+
5
+OpenStack Freezer Specifications
6
+=============================
7
+
8
+
9
+This git repository is used to hold approved design specifications for
10
+additions to the Freezer project.  Reviews of the specs are done in gerrit,
11
+using a similar workflow to how we review and merge changes to the code itself.
12
+For specific policies around specification review, refer to the end of this
13
+document.
14
+
15
+The layout of this repository is::
16
+
17
+  specs/<release>/
18
+
19
+Where there are two sub-directories:
20
+
21
+  specs/<release>/approved: specifications approved but not yet implemented
22
+  specs/<release>/implemented: implemented specifications
23
+
24
+The lifecycle of a specification
25
+--------------------------------
26
+
27
+Developers proposing a specification should propose a new file in the
28
+``approved`` directory. freezer-core will review the change in the usual
29
+manner for the OpenStack project, and eventually it will get merged if a
30
+consensus is reached. At this time the Launchpad blueprint is also approved.
31
+The developer is then free to propose code reviews to implement their
32
+specification. These reviews should be sure to reference the Launchpad
33
+blueprint in their commit message for tracking purposes.
34
+
35
+Once all code for the feature is merged into Freezer, the Launchpad blueprint
36
+is marked complete. As the developer of an approved specification it is your
37
+responsibility to mark your blueprint complete when all of the required
38
+patches have merged.
39
+
40
+Periodically, someone from freezer-core will move implemented specifications
41
+from the ``approved`` directory to the ``implemented`` directory. Whilst
42
+individual developers are welcome to propose this move for their implemented
43
+specifications, we have generally just done this in a batch at the end of the
44
+release cycle. It is important to create redirects when this is done so that
45
+existing links to the approved specification are not broken. Redirects aren't
46
+symbolic links, they are defined in a file which sphinx consumes. An example
47
+is at ``specs/kilo/redirects``.
48
+
49
+This directory structure allows you to see what we thought about doing,
50
+decided to do, and actually got done. Users interested in functionality in a
51
+given release should only refer to the ``implemented`` directory.
52
+
53
+Example specifications
54
+----------------------
55
+
56
+You can find an example spec in ``specs/template.rst``.
57
+
58
+Backlog specifications
59
+----------------------
60
+
61
+Additionally, we allow the proposal of specifications that do not have a
62
+developer assigned to them. These are proposed for review in the same manner as
63
+above, but are added to::
64
+
65
+  specs/backlog/approved
66
+
67
+Specifications in this directory indicate the original author has either
68
+become unavailable, or has indicated that they are not going to implement the
69
+specification. The specifications found here are available as projects for
70
+people looking to get involved with Freezer. If you are interested in
71
+claiming a spec, start by posting a review for the specification that moves it
72
+from this directory to the next active release. Please set yourself as the new
73
+`primary assignee` and maintain the original author in the `other contributors`
74
+list.
75
+
76
+Design documents for releases prior to Newton
77
+-------------------------------------------
78
+
79
+Prior to the Juno development cycle, this repository was not used for spec
80
+reviews.  Reviews prior to Juno were completed entirely through `Launchpad
81
+blueprints <http://blueprints.launchpad.net/freezer>`_
82
+
83
+Please note, Launchpad blueprints are still used for tracking the
84
+current status of blueprints. For more information, see
85
+https://wiki.openstack.org/wiki/Blueprints
86
+
87
+Working with gerrit and specification unit tests
88
+------------------------------------------------
89
+
90
+For more information about working with gerrit, see
91
+http://docs.openstack.org/infra/manual/developers.html#development-workflow
92
+
93
+To validate that the specification is syntactically correct (i.e. get more
94
+confidence in the Jenkins result), please execute the following command::
95
+
96
+  $ tox
97
+
98
+After running ``tox``, the documentation will be available for viewing in HTML
99
+format in the ``doc/build/`` directory.
100
+
101
+Specification review policies
102
+=============================
103
+
104
+There are a number of review policies which freezer-core will apply when
105
+reviewing proposed specifications. They are:
106
+
107
+Trivial specifications
108
+----------------------
109
+
110
+Proposed changes which are trivial (very small amounts of code) and don't
111
+change any of our public APIs are sometimes not required to provide a
112
+specification. In these cases a Launchpad blueprint is considered sufficient.
113
+These proposals are approved during the `Open Discussion` portion of the
114
+weekly Freezer IRC meeting. If you think your proposed feature is trivial and
115
+meets these requirements, we recommend you bring it up for discussion there
116
+before writing a full specification.
117
+
118
+Previously approved specifications
119
+----------------------------------
120
+
121
+`Specifications are only approved for a single release`. If your specification
122
+was previously approved but not implemented (or not completely implemented),
123
+then you must seek re-approval for the specification. You can re-propose your
124
+specification by doing the following:
125
+
126
+* Copy (not move) your specification to the right directory for the current release.
127
+* Update the document to comply with the new template.
128
+* If there are no functional changes to the specification (only template changes) then add the `Previously-approved: <release>` tag to your commit message.
129
+* Send for review.
130
+* freezer-core will merge specifications which meet these requirements with a single +2.
131
+
132
+Specifications which depend on merging code in other OpenStack projects
133
+-----------------------------------------------------------------------
134
+
135
+For specifications `that depend on code in other OpenStack projects merging`
136
+we will not approve the Freezer specification until the code in that other
137
+project has merged. The best example of this is Cinder and Neutron drivers. To
138
+indicate your specification is in this state, please use the Depends-On git
139
+commit message tag. The correct format is `Depends-On: <change id of other
140
+work>`. freezer-core can approve the specification at any time, but it wont
141
+merge until the code we need to land in the other project has merged as well.

+ 276
- 0
doc/source/conf.py View File

@@ -0,0 +1,276 @@
1
+# -*- coding: utf-8 -*-
2
+#
3
+# Tempest documentation build configuration file, created by
4
+# sphinx-quickstart on Tue May 21 17:43:32 2013.
5
+#
6
+# This file is execfile()d with the current directory set to its containing dir.
7
+#
8
+# Note that not all possible configuration values are present in this
9
+# autogenerated file.
10
+#
11
+# All configuration values have a default; values that are commented out
12
+# serve to show the default.
13
+
14
+import datetime
15
+import sys
16
+import os
17
+
18
+# If extensions (or modules to document with autodoc) are in another directory,
19
+# add these directories to sys.path here. If the directory is relative to the
20
+# documentation root, use os.path.abspath to make it absolute, like shown here.
21
+sys.path.insert(0, os.path.abspath('.'))
22
+
23
+# -- General configuration -----------------------------------------------------
24
+
25
+# If your documentation needs a minimal Sphinx version, state it here.
26
+#needs_sphinx = '1.0'
27
+
28
+# Add any Sphinx extension module names here, as strings. They can be extensions
29
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30
+extensions = ['redirect',
31
+              'sphinx.ext.autodoc',
32
+              'sphinx.ext.todo',
33
+              'sphinx.ext.viewcode',
34
+              'oslosphinx',
35
+              'yasfb',
36
+             ]
37
+
38
+# Feed configuration for yasfb
39
+feed_base_url = 'http://specs.openstack.org/openstack/freezer-specs'
40
+feed_author = 'OpenStack Freezer Team'
41
+
42
+todo_include_todos = True
43
+
44
+# Add any paths that contain templates here, relative to this directory.
45
+templates_path = ['_templates']
46
+
47
+# The suffix of source filenames.
48
+source_suffix = '.rst'
49
+
50
+# The encoding of source files.
51
+#source_encoding = 'utf-8-sig'
52
+
53
+# The master toctree document.
54
+master_doc = 'index'
55
+
56
+# General information about the project.
57
+project = u'Freezer Specs'
58
+copyright = u'%s, OpenStack Freezer Team' % datetime.date.today().year
59
+
60
+# The language for content autogenerated by Sphinx. Refer to documentation
61
+# for a list of supported languages.
62
+#language = None
63
+
64
+# There are two options for replacing |today|: either, you set today to some
65
+# non-false value, then it is used:
66
+#today = ''
67
+# Else, today_fmt is used as the format for a strftime call.
68
+#today_fmt = '%B %d, %Y'
69
+
70
+# List of patterns, relative to source directory, that match files and
71
+# directories to ignore when looking for source files.
72
+exclude_patterns = [
73
+    '_build',
74
+]
75
+
76
+# The reST default role (used for this markup: `text`) to use for all documents.
77
+#default_role = None
78
+
79
+# If true, '()' will be appended to :func: etc. cross-reference text.
80
+#add_function_parentheses = True
81
+
82
+# If true, the current module name will be prepended to all description
83
+# unit titles (such as .. function::).
84
+add_module_names = False
85
+
86
+# If true, sectionauthor and moduleauthor directives will be shown in the
87
+# output. They are ignored by default.
88
+show_authors = False
89
+
90
+# The name of the Pygments (syntax highlighting) style to use.
91
+pygments_style = 'sphinx'
92
+
93
+# A list of ignored prefixes for module index sorting.
94
+modindex_common_prefix = ['freezer-specs.']
95
+
96
+# -- Options for man page output ----------------------------------------------
97
+man_pages = []
98
+
99
+# -- Options for HTML output ---------------------------------------------------
100
+
101
+# The theme to use for HTML and HTML Help pages.  See the documentation for
102
+# a list of builtin themes.
103
+html_theme = 'nature'
104
+
105
+# Theme options are theme-specific and customize the look and feel of a theme
106
+# further.  For a list of options available for each theme, see the
107
+# documentation.
108
+#html_theme_options = {}
109
+
110
+# Add any paths that contain custom themes here, relative to this directory.
111
+#html_theme_path = []
112
+
113
+# The name for this set of Sphinx documents.  If None, it defaults to
114
+# "<project> v<release> documentation".
115
+#html_title = None
116
+
117
+# A shorter title for the navigation bar.  Default is the same as html_title.
118
+#html_short_title = None
119
+
120
+# The name of an image file (relative to this directory) to place at the top
121
+# of the sidebar.
122
+#html_logo = None
123
+
124
+# The name of an image file (within the static path) to use as favicon of the
125
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
126
+# pixels large.
127
+#html_favicon = None
128
+
129
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
130
+# using the given strftime format.
131
+git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1"
132
+html_last_updated_fmt = os.popen(git_cmd).read()
133
+
134
+# If true, SmartyPants will be used to convert quotes and dashes to
135
+# typographically correct entities.
136
+#html_use_smartypants = True
137
+
138
+# Custom sidebar templates, maps document names to template names.
139
+#html_sidebars = {}
140
+
141
+# Additional templates that should be rendered to pages, maps page names to
142
+# template names.
143
+#html_additional_pages = {}
144
+
145
+# If false, no module index is generated.
146
+html_domain_indices = False
147
+
148
+# If false, no index is generated.
149
+html_use_index = False
150
+
151
+# If true, the index is split into individual pages for each letter.
152
+#html_split_index = False
153
+
154
+# If true, links to the reST sources are added to the pages.
155
+#html_show_sourcelink = True
156
+
157
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
158
+#html_show_sphinx = True
159
+
160
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
161
+#html_show_copyright = True
162
+
163
+# If true, an OpenSearch description file will be output, and all pages will
164
+# contain a <link> tag referring to it.  The value of this option must be the
165
+# base URL from which the finished HTML is served.
166
+#html_use_opensearch = ''
167
+
168
+# This is the file name suffix for HTML files (e.g. ".xhtml").
169
+#html_file_suffix = None
170
+
171
+# Output file base name for HTML help builder.
172
+htmlhelp_basename = 'Freezer-Specsdoc'
173
+
174
+
175
+# -- Options for LaTeX output --------------------------------------------------
176
+
177
+latex_elements = {
178
+# The paper size ('letterpaper' or 'a4paper').
179
+#'papersize': 'letterpaper',
180
+
181
+# The font size ('10pt', '11pt' or '12pt').
182
+#'pointsize': '10pt',
183
+
184
+# Additional stuff for the LaTeX preamble.
185
+#'preamble': '',
186
+}
187
+
188
+# Grouping the document tree into LaTeX files. List of tuples
189
+# (source start file, target name, title, author, documentclass [howto/manual]).
190
+latex_documents = [
191
+  ('index', 'Freezer-specs.tex', u'Freezer Specs',
192
+   u'OpenStack Freezer Team', 'manual'),
193
+]
194
+
195
+# The name of an image file (relative to this directory) to place at the top of
196
+# the title page.
197
+#latex_logo = None
198
+
199
+# For "manual" documents, if this is true, then toplevel headings are parts,
200
+# not chapters.
201
+#latex_use_parts = False
202
+
203
+# If true, show page references after internal links.
204
+#latex_show_pagerefs = False
205
+
206
+# If true, show URL addresses after external links.
207
+#latex_show_urls = False
208
+
209
+# Documents to append as an appendix to all manuals.
210
+#latex_appendices = []
211
+
212
+# If false, no module index is generated.
213
+#latex_domain_indices = True
214
+
215
+# -- Options for Texinfo output ------------------------------------------------
216
+
217
+# Grouping the document tree into Texinfo files. List of tuples
218
+# (source start file, target name, title, author,
219
+#  dir menu entry, description, category)
220
+texinfo_documents = [
221
+  ('index', 'Freezer-specs', u'Freezer Design Specs',
222
+   u'OpenStack Freezer Team', 'freezer-specs', 'Design specifications for the Freezer project.',
223
+   'Miscellaneous'),
224
+]
225
+
226
+# Documents to append as an appendix to all manuals.
227
+#texinfo_appendices = []
228
+
229
+# If false, no module index is generated.
230
+#texinfo_domain_indices = True
231
+
232
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
233
+#texinfo_show_urls = 'footnote'
234
+
235
+
236
+# -- Options for Epub output ---------------------------------------------------
237
+
238
+# Bibliographic Dublin Core info.
239
+epub_title = u'Freezer Specs'
240
+epub_author = u'OpenStack Freezer Team'
241
+epub_publisher = u'OpenStack Freezer Team'
242
+epub_copyright = u'2014, OpenStack Freezer Team'
243
+
244
+# The language of the text. It defaults to the language option
245
+# or en if the language is not set.
246
+#epub_language = ''
247
+
248
+# The scheme of the identifier. Typical schemes are ISBN or URL.
249
+#epub_scheme = ''
250
+
251
+# The unique identifier of the text. This can be a ISBN number
252
+# or the project homepage.
253
+#epub_identifier = ''
254
+
255
+# A unique identification for the text.
256
+#epub_uid = ''
257
+
258
+# A tuple containing the cover image and cover page html template filenames.
259
+#epub_cover = ()
260
+
261
+# HTML files that should be inserted before the pages created by sphinx.
262
+# The format is a list of tuples containing the path and title.
263
+#epub_pre_files = []
264
+
265
+# HTML files shat should be inserted after the pages created by sphinx.
266
+# The format is a list of tuples containing the path and title.
267
+#epub_post_files = []
268
+
269
+# A list of files that should not be packed into the epub file.
270
+#epub_exclude_files = []
271
+
272
+# The depth of the table of contents in toc.ncx.
273
+#epub_tocdepth = 3
274
+
275
+# Allow duplicate toc entries.
276
+#epub_tocdup = True

+ 54
- 0
doc/source/index.rst View File

@@ -0,0 +1,54 @@
1
+.. freezer-specs documentation master file
2
+
3
+============================
4
+OpenStack Freezer Project Plans
5
+============================
6
+
7
+Priorities
8
+==========
9
+
10
+During each design summit, we agree what the whole community wants to focus
11
+on for the upcoming release. This is the output of those discussions:
12
+
13
+.. toctree::
14
+   :glob:
15
+   :maxdepth: 1
16
+
17
+   priorities/newton-priorities
18
+
19
+Specifications
20
+==============
21
+
22
+Here you can find the specs, and spec template, for each release:
23
+
24
+.. toctree::
25
+   :glob:
26
+   :maxdepth: 1
27
+
28
+   specs/newton/index
29
+
30
+There are also some approved backlog specifications that are looking for owners:
31
+
32
+.. toctree::
33
+   :glob:
34
+   :maxdepth: 1
35
+
36
+   specs/backlog/index
37
+
38
+Process
39
+=======
40
+
41
+Documentation for freezer-specs process:
42
+
43
+.. toctree::
44
+   :maxdepth: 1
45
+
46
+   How to submit a spec <readme>
47
+
48
+For more details, look at spec template for the specific release, and see the
49
+wiki page on Blueprints: https://wiki.openstack.org/wiki/Blueprints
50
+
51
+Indices and tables
52
+==================
53
+
54
+* :ref:`search`

+ 1
- 0
doc/source/priorities View File

@@ -0,0 +1 @@
1
+../../priorities/

+ 1
- 0
doc/source/readme.rst View File

@@ -0,0 +1 @@
1
+.. include:: ../../README.rst

+ 50
- 0
doc/source/redirect.py View File

@@ -0,0 +1,50 @@
1
+# A simple sphinx plugin which creates HTML redirections from old names
2
+# to new names. It does this by looking for files named "redirect" in
3
+# the documentation source and using the contents to create simple HTML
4
+# redirection pages for changed filenames.
5
+
6
+import os.path
7
+
8
+from sphinx.application import ENV_PICKLE_FILENAME
9
+from sphinx.util.console import bold
10
+
11
+
12
+def setup(app):
13
+    from sphinx.application import Sphinx
14
+    if not isinstance(app, Sphinx):
15
+        return
16
+    app.connect('build-finished', emit_redirects)
17
+
18
+
19
+def process_redirect_file(app, path, ent):
20
+    parent_path = path.replace(app.builder.srcdir, app.builder.outdir)
21
+    with open(os.path.join(path, ent)) as redirects:
22
+        for line in redirects.readlines():
23
+            from_path, to_path = line.rstrip().split(' ')
24
+            from_path = from_path.replace('.rst', '.html')
25
+            to_path = to_path.replace('.rst', '.html')
26
+
27
+            redirected_filename = os.path.join(parent_path, from_path)
28
+            redirected_directory = os.path.dirname(redirected_filename)
29
+            if not os.path.exists(redirected_directory):
30
+                os.makedirs(redirected_directory)
31
+            with open(redirected_filename, 'w') as f:
32
+                f.write('<html><head><meta http-equiv="refresh" content="0; '
33
+                        'url=%s" /></head></html>'
34
+                        % to_path)
35
+
36
+
37
+def emit_redirects(app, exc):
38
+    app.builder.info(bold('scanning %s for redirects...') % app.builder.srcdir)
39
+
40
+    def process_directory(path):
41
+        for ent in os.listdir(path):
42
+            p = os.path.join(path, ent)
43
+            if os.path.isdir(p):
44
+                process_directory(p)
45
+            elif ent == 'redirects':
46
+                app.builder.info('   found redirects at %s' % p)
47
+                process_redirect_file(app, path, ent)
48
+
49
+    process_directory(app.builder.srcdir)
50
+    app.builder.info('...done')

+ 1
- 0
doc/source/specs/backlog/approved View File

@@ -0,0 +1 @@
1
+../../../../specs/backlog/approved/

+ 31
- 0
doc/source/specs/backlog/index.rst View File

@@ -0,0 +1,31 @@
1
+===========================
2
+Nova Backlog Specifications
3
+===========================
4
+
5
+The Nova spec backlog is a place for the team to record decisions
6
+about technical problems and proposed solutions. A backlog spec should
7
+contain at least a clear problem description, as well as a general
8
+description of the proposed or desired solution. This serves as a
9
+marker to record the team's acceptance of a problem as in-scope for
10
+the project, as well as a reasonable direction for solving the problem.
11
+
12
+A spec that exists here is something that either needs a driver or
13
+implementor, or something that can't be done currently. If you would
14
+like to implement one of these specifications, fill out the missing
15
+sections and follow the standard process of submitting it to a release
16
+(See :doc:`../../readme`).
17
+
18
+Template:
19
+
20
+.. toctree::
21
+   :maxdepth: 1
22
+
23
+   Specification Template  <template>
24
+
25
+Approved (but not implemented) backlog specs:
26
+
27
+.. toctree::
28
+   :glob:
29
+   :maxdepth: 1
30
+
31
+   approved/*

+ 1
- 0
doc/source/specs/backlog/template.rst View File

@@ -0,0 +1 @@
1
+../../../../specs/backlog-template.rst

+ 1
- 0
doc/source/specs/newton/approved View File

@@ -0,0 +1 @@
1
+../../../../specs/newton/approved/

+ 1
- 0
doc/source/specs/newton/implemented View File

@@ -0,0 +1 @@
1
+../../../../specs/newton/implemented/

+ 26
- 0
doc/source/specs/newton/index.rst View File

@@ -0,0 +1,26 @@
1
+==========================
2
+Nova Newton Specifications
3
+==========================
4
+
5
+Template:
6
+
7
+.. toctree::
8
+   :maxdepth: 1
9
+
10
+   Specification Template (Newton release) <template>
11
+
12
+Newton implemented specs:
13
+
14
+.. toctree::
15
+   :glob:
16
+   :maxdepth: 1
17
+
18
+   implemented/*
19
+
20
+Newton approved (but not implemented) specs:
21
+
22
+.. toctree::
23
+   :glob:
24
+   :maxdepth: 1
25
+
26
+   approved/*

+ 1
- 0
doc/source/specs/newton/redirects View File

@@ -0,0 +1 @@
1
+../../../../specs/newton/redirects

+ 1
- 0
doc/source/specs/newton/template.rst View File

@@ -0,0 +1 @@
1
+../../../../specs/newton-template.rst

+ 59
- 0
priorities/newton-priorities.rst View File

@@ -0,0 +1,59 @@
1
+.. _newton-priorities:
2
+
3
+=========================
4
+Newton Project Priorities
5
+=========================
6
+
7
+List of themes (in the form of use cases) the freezer development team will
8
+prioritize in Newton.
9
+
10
++-------------------------------------------+-----------------------+
11
+| Priority                                  | Primary Contacts      |
12
++===========================================+=======================+
13
+| `Hardening and testing`                   | `Jonas Pfannschmidt`_ |
14
++-------------------------------------------+-----------------------+
15
+| `Agent refactoring`_                      | `Saad zaher`_         |
16
++-------------------------------------------+-----------------------+
17
+| `Documentation improvement`_              | `Guillermo Garcia`_   |
18
++-------------------------------------------+-----------------------+
19
+| `Disaster recovery`_                      | `Fabrizio Fresco`_    |
20
++-------------------------------------------+-----------------------+
21
+
22
+.. _Jonas Pfannschmidt: https://launchpad.net/~jonas-pfannschmidt
23
+.. _Saad zaher: https://launchpad.net/~szaher
24
+.. _Fabrizio Fresco: https://launchpad.net/~felipe
25
+.. _Guillermo Garcia: https://launchpad.net/~sirmemogarcia
26
+
27
+
28
+Hardening and testing
29
+--------
30
+
31
+In Newton, we want to increase as much as possible the test coverage for
32
+Freezer.
33
+This include better and more unit tests and tempest tests.
34
+
35
+Agent refactoring
36
+---------
37
+
38
+In Newton, we want to make our freezer-agent pluggable for four of its core
39
+internal parts:
40
+
41
+* Pluggable storage: In order to support more storage backend
42
+* Pluggable snapshot: In order to support more snapshoting technique (like xfs,
43
+  brtfs, ...)
44
+* Pluggable application: Through a system of hooks, we want to facilitate the
45
+  support of new application aware backups.
46
+* Pluggable engine: In order to support other ways of processing data.
47
+
48
+Disaster recovery
49
+----------------
50
+
51
+In Newton we will kick off freezer-dr in order to provide tooling to support
52
+disaster recovery cases where backup/restore is not able to provide a good enough RTO.
53
+
54
+Documentation improvement
55
+------------------
56
+
57
+In Newton, we will refactor our documentation. This includes mooving it away
58
+from the READMEs, refactoring and updating the content as well as improving the
59
+developper documentation.

+ 1
- 0
priorities/priority-blueprints-to-review.yaml View File

@@ -0,0 +1 @@
1
+# List of blueprints that are project priorities and are ready for code review

+ 6
- 0
requirements.txt View File

@@ -0,0 +1,6 @@
1
+oslosphinx
2
+pbr>=1.6  # Apache-2.0
3
+sphinx>=1.1.2,<1.2
4
+testrepository>=0.0.18
5
+testtools>=0.9.34
6
+yasfb>=0.5.1

+ 23
- 0
setup.cfg View File

@@ -0,0 +1,23 @@
1
+[metadata]
2
+name = freezer-specs
3
+summary = OpenStack Freezer Project Development Specs
4
+description-file =
5
+    README.rst
6
+author = OpenStack
7
+author-email = openstack-dev@lists.openstack.org
8
+home-page = http://www.openstack.org/
9
+classifier =
10
+    Intended Audience :: Developers
11
+    License :: OSI Approved :: Apache Software License
12
+    Operating System :: POSIX :: Linux
13
+
14
+[build_sphinx]
15
+all_files = 1
16
+build-dir = doc/build
17
+source-dir = doc/source
18
+
19
+[pbr]
20
+warnerrors = True
21
+
22
+[wheel]
23
+universal = 1

+ 22
- 0
setup.py View File

@@ -0,0 +1,22 @@
1
+#!/usr/bin/env python
2
+# Copyright (c) 2016 Hewlett-Packard Development Company, L.P.
3
+#
4
+# Licensed under the Apache License, Version 2.0 (the "License");
5
+# you may not use this file except in compliance with the License.
6
+# You may obtain a copy of the License at
7
+#
8
+#    http://www.apache.org/licenses/LICENSE-2.0
9
+#
10
+# Unless required by applicable law or agreed to in writing, software
11
+# distributed under the License is distributed on an "AS IS" BASIS,
12
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+# implied.
14
+# See the License for the specific language governing permissions and
15
+# limitations under the License.
16
+
17
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
18
+import setuptools
19
+
20
+setuptools.setup(
21
+    setup_requires=['pbr'],
22
+    pbr=True)

+ 1
- 0
specs/backlog-template.rst View File

@@ -0,0 +1 @@
1
+newton-template.rst

+ 365
- 0
specs/newton-template.rst View File

@@ -0,0 +1,365 @@
1
+..
2
+ This work is licensed under a Creative Commons Attribution 3.0 Unported
3
+ License.
4
+
5
+ http://creativecommons.org/licenses/by/3.0/legalcode
6
+
7
+==========================================
8
+Example Spec - The title of your blueprint
9
+==========================================
10
+
11
+Include the URL of your launchpad blueprint:
12
+
13
+https://blueprints.launchpad.net/freezer/+spec/example
14
+
15
+Introduction paragraph -- why are we doing anything? A single paragraph of
16
+prose that operators can understand. The title and this first paragraph
17
+should be used as the subject line and body of the commit message
18
+respectively.
19
+
20
+Some notes about the freezer-spec and blueprint process:
21
+
22
+* Not all blueprints need a spec. For more information see
23
+  http://docs.openstack.org/developer/nova/devref/kilo.blueprints.html#when-is-a-blueprint-needed
24
+
25
+* The aim of this document is first to define the problem we need to solve,
26
+  and second agree the overall approach to solve that problem.
27
+
28
+* This is not intended to be extensive documentation for a new feature.
29
+  For example, there is no need to specify the exact configuration changes,
30
+
31
+  nor the exact details of any DB model changes. But you should still define
32
+  that such changes are required, and be clear on how that will affect
33
+  upgrades.
34
+
35
+* You should aim to get your spec approved before writing your code.
36
+  While you are free to write prototypes and code before getting your spec
37
+  approved, its possible that the outcome of the spec review process leads
38
+  you towards a fundamentally different solution than you first envisaged.
39
+
40
+* But, API changes are held to a much higher level of scrutiny.
41
+  As soon as an API change merges, we must assume it could be in production
42
+  somewhere, and as such, we then need to support that API change forever.
43
+  To avoid getting that wrong, we do want lots of details about API changes
44
+  upfront.
45
+
46
+Some notes about using this template:
47
+
48
+* Your spec should be in ReSTructured text, like this template.
49
+
50
+* Please wrap text at 79 columns.
51
+
52
+* The filename in the git repository should match the launchpad URL, for
53
+  example a URL of: https://blueprints.launchpad.net/freezer/+spec/awesome-thing
54
+  should be named awesome-thing.rst
55
+
56
+* Please do not delete any of the sections in this template.  If you have
57
+  nothing to say for a whole section, just write: None
58
+
59
+* For help with syntax, see http://sphinx-doc.org/rest.html
60
+
61
+* To test out your formatting, build the docs using tox and see the generated
62
+  HTML file in doc/build/html/specs/<path_of_your_file>
63
+
64
+* If you would like to provide a diagram with your spec, ascii diagrams are
65
+  required.  http://asciiflow.com/ is a very nice tool to assist with making
66
+  ascii diagrams.  The reason for this is that the tool used to review specs is
67
+  based purely on plain text.  Plain text will allow review to proceed without
68
+  having to look at additional files which can not be viewed in gerrit.  It
69
+  will also allow inline feedback on the diagram itself.
70
+
71
+
72
+Problem description
73
+===================
74
+
75
+A detailed description of the problem. What problem is this blueprint
76
+addressing?
77
+
78
+Use Cases
79
+---------
80
+
81
+What use cases does this address? What impact on actors does this change have?
82
+Ensure you are clear about the actors in each use case: Developer, End User,
83
+Deployer etc.
84
+
85
+Proposed change
86
+===============
87
+
88
+Here is where you cover the change you propose to make in detail. How do you
89
+propose to solve this problem?
90
+
91
+If this is one part of a larger effort make it clear where this piece ends. In
92
+other words, what's the scope of this effort?
93
+
94
+At this point, if you would like to just get feedback on if the problem and
95
+proposed change fit in freezer, you can stop here and post this for review to get
96
+preliminary feedback. If so please say:
97
+Posting to get preliminary feedback on the scope of this spec.
98
+
99
+Alternatives
100
+------------
101
+
102
+What other ways could we do this thing? Why aren't we using those? This doesn't
103
+have to be a full literature review, but it should demonstrate that thought has
104
+been put into why the proposed solution is an appropriate one.
105
+
106
+Data model impact
107
+-----------------
108
+
109
+Changes which require modifications to the data model often have a wider impact
110
+on the system.  The community often has strong opinions on how the data model
111
+should be evolved, from both a functional and performance perspective. It is
112
+therefore important to capture and gain agreement as early as possible on any
113
+proposed changes to the data model.
114
+
115
+Questions which need to be addressed by this section include:
116
+
117
+* What new data objects and/or database schema changes is this going to
118
+  require?
119
+
120
+* What database migrations will accompany this change.
121
+
122
+* How will the initial set of new data objects be generated, for example if you
123
+  need to take into account existing backups/jobs/... , or modify other
124
+  existing data describe how that will work.
125
+
126
+REST API impact
127
+---------------
128
+
129
+Each API method which is either added or changed should have the following
130
+
131
+* Specification for the method
132
+
133
+  * A description of what the method does suitable for use in
134
+    user documentation
135
+
136
+  * Method type (POST/PUT/GET/DELETE)
137
+
138
+  * Normal http response code(s)
139
+
140
+  * Expected error http response code(s)
141
+
142
+    * A description for each possible error code should be included
143
+      describing semantic errors which can cause it such as
144
+      inconsistent parameters supplied to the method, or when an
145
+      instance is not in an appropriate state for the request to
146
+      succeed. Errors caused by syntactic problems covered by the JSON
147
+      schema definition do not need to be included.
148
+
149
+  * URL for the resource
150
+
151
+    * URL should not include underscores, and use hyphens instead.
152
+
153
+  * Parameters which can be passed via the url
154
+
155
+  * JSON schema definition for the request body data if allowed
156
+
157
+    * Field names should use snake_case style, not CamelCase or MixedCase
158
+      style.
159
+
160
+  * JSON schema definition for the response body data if any
161
+
162
+    * Field names should use snake_case style, not CamelCase or MixedCase
163
+      style.
164
+
165
+* Example use case including typical API samples for both data supplied
166
+  by the caller and the response
167
+
168
+* Discuss any policy changes, and discuss what things a deployer needs to
169
+  think about when defining their policy.
170
+
171
+Reuse of existing predefined parameter types such as regexps for
172
+passwords and user defined names is highly encouraged.
173
+
174
+Security impact
175
+---------------
176
+
177
+Describe any potential security impact on the system.  Some of the items to
178
+consider include:
179
+
180
+* Does this change touch sensitive data such as tokens, keys, or user data?
181
+
182
+* Does this change alter the API in a way that may impact security, such as
183
+  a new way to access sensitive information or a new way to login?
184
+
185
+* Does this change involve cryptography or hashing?
186
+
187
+* Does this change require the use of sudo or any elevated privileges?
188
+
189
+* Does this change involve using or parsing user-provided data? This could
190
+  be directly at the API level or indirectly such as changes to a cache layer.
191
+
192
+* Can this change enable a resource exhaustion attack, such as allowing a
193
+  single API interaction to consume significant server resources? Some examples
194
+  of this include launching subprocesses for each connection, or entity
195
+  expansion attacks in XML.
196
+
197
+For more detailed guidance, please see the OpenStack Security Guidelines as
198
+a reference (https://wiki.openstack.org/wiki/Security/Guidelines).  These
199
+guidelines are a work in progress and are designed to help you identify
200
+security best practices.  For further information, feel free to reach out
201
+to the OpenStack Security Group at openstack-security@lists.openstack.org.
202
+
203
+Notifications impact
204
+--------------------
205
+
206
+Please specify any changes to notifications. Be that an extra notification,
207
+changes to an existing notification, or removing a notification.
208
+
209
+Other end user impact
210
+---------------------
211
+
212
+Aside from the API, are there other ways a user will interact with this
213
+feature?
214
+
215
+* Does this change have an impact on python-freezerclient? What does the user
216
+  interface there look like?
217
+
218
+* Does this change have an impact on freezer-web-ui? What does the user
219
+  interface there look like?
220
+
221
+* Does this change have an impact on freezeri-dr?
222
+
223
+Performance Impact
224
+------------------
225
+
226
+Describe any potential performance impact on the system, for example
227
+how often will new code be called, and is there a major change to the calling
228
+pattern of existing code.
229
+
230
+Examples of things to consider here include:
231
+
232
+* A small change in a utility function or a commonly used decorator can have a
233
+  large impacts on performance.
234
+
235
+* Calls which result in a database queries can have a profound impact on
236
+  performance when called in critical sections of the code.
237
+
238
+* Will the change include any locking, and if so what considerations are there
239
+  on holding the lock?
240
+
241
+Other deployer impact
242
+---------------------
243
+
244
+Discuss things that will affect how you deploy and configure OpenStack
245
+that have not already been mentioned, such as:
246
+
247
+* What config options are being added? Should they be more generic than
248
+  proposed? Are the default values ones which will work well in real
249
+  deployments?
250
+
251
+* Is this a change that takes immediate effect after its merged, or is it
252
+  something that has to be explicitly enabled?
253
+
254
+* If this change is a new binary, how would it be deployed?
255
+
256
+* Please state anything that those doing continuous deployment, or those
257
+  upgrading from the previous release, need to be aware of. Also describe
258
+  any plans to deprecate configuration values or features.  For example, if we
259
+  change the directory name that instances are stored in, how do we handle
260
+  instance directories created before the change landed?  Do we move them?  Do
261
+  we have a special case in the code? Do we assume that the operator will
262
+  recreate all the instances in their cloud?
263
+
264
+Developer impact
265
+----------------
266
+
267
+Discuss things that will affect other developers working on OpenStack.
268
+
269
+Implementation
270
+==============
271
+
272
+Assignee(s)
273
+-----------
274
+
275
+Who is leading the writing of the code? Or is this a blueprint where you're
276
+throwing it out there to see who picks it up?
277
+
278
+If more than one person is working on the implementation, please designate the
279
+primary author and contact.
280
+
281
+Primary assignee:
282
+  <launchpad-id or None>
283
+
284
+Other contributors:
285
+  <launchpad-id or None>
286
+
287
+Work Items
288
+----------
289
+
290
+Work items or tasks -- break the feature up into the things that need to be
291
+done to implement it. Those parts might end up being done by different people,
292
+but we're mostly trying to understand the timeline for implementation.
293
+
294
+
295
+Dependencies
296
+============
297
+
298
+* Include specific references to specs and/or blueprints in freezer, or in
299
+  other projects, that this one either depends on or is related to.
300
+
301
+* If this requires functionality of another project that is not currently used
302
+  by Freezer (such as the glance v2 API when we previously only required v1),
303
+  document that fact.
304
+
305
+* Does this feature require any new library dependencies or code otherwise not
306
+  included in OpenStack? Or does it depend on a specific version of library?
307
+
308
+
309
+Testing
310
+=======
311
+
312
+Please discuss the important scenarios needed to test here, as well as
313
+specific edge cases we should be ensuring work correctly.
314
+
315
+Please discuss how the change will be tested. We especially want to know what
316
+tempest tests will be added. It is assumed that unit test coverage will be
317
+added so that doesn't need to be mentioned explicitly, but discussion of why
318
+you think unit tests are sufficient and we don't need to add more tempest
319
+tests would need to be included.
320
+
321
+Is this untestable in gate given current limitations (specific hardware /
322
+software configurations available)? If so, are there mitigation plans (3rd
323
+party testing, gate enhancements, etc).
324
+
325
+
326
+Documentation Impact
327
+====================
328
+
329
+Please describe how and where this change will be documented.
330
+
331
+
332
+References
333
+==========
334
+
335
+Please add any useful references here. You are not required to have any
336
+reference. Moreover, this specification should still make sense when your
337
+references are unavailable. Examples of what you could include are:
338
+
339
+* Links to mailing list or IRC discussions
340
+
341
+* Links to notes from a summit session
342
+
343
+* Links to relevant research, if appropriate
344
+
345
+* Related specifications as appropriate (e.g.  if it's an EC2 thing, link the
346
+  EC2 docs)
347
+
348
+* Anything else you feel it is worthwhile to refer to
349
+
350
+
351
+History
352
+=======
353
+
354
+Optional section for Mitaka intended to be used each time the spec
355
+is updated to describe new design, API or any database schema
356
+updated. Useful to let reader understand what's happened along the
357
+time.
358
+
359
+.. list-table:: Revisions
360
+   :header-rows: 1
361
+
362
+   * - Release Name
363
+     - Description
364
+   * - Mitaka
365
+     - Introduced

+ 0
- 0
specs/newton/redirects View File


+ 5
- 0
test-requirements.txt View File

@@ -0,0 +1,5 @@
1
+# The order of packages is significant, because pip processes them in the order
2
+# of appearance. Changing the order has an impact on the overall integration
3
+# process, which may cause wedges in the gate later.
4
+
5
+hacking>=0.10.0,<0.11

+ 0
- 0
tests/__init__.py View File


+ 32
- 0
tests/test_directories.py View File

@@ -0,0 +1,32 @@
1
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
2
+# not use this file except in compliance with the License. You may obtain
3
+# a copy of the License at
4
+#
5
+#      http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+# Unless required by applicable law or agreed to in writing, software
8
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
+# License for the specific language governing permissions and limitations
11
+# under the License.
12
+
13
+import glob
14
+import os
15
+
16
+import testtools
17
+
18
+
19
+class TestDirectories(testtools.TestCase):
20
+
21
+    def test_directories(self):
22
+        releases = [x.split('/')[1] for x in glob.glob('specs/*/')]
23
+        for release in releases:
24
+            files = os.listdir("specs/%s/" % release)
25
+            valid = ['redirects', 'implemented', 'approved']
26
+            for name in files:
27
+                if name.startswith('.'):
28
+                    continue
29
+                self.assertIn(name, valid,
30
+                              "Found unexpected file in "
31
+                              "'specs/%s', specs should be submitted to "
32
+                              "'specs/%s/approved'" % (release, release))

+ 127
- 0
tests/test_titles.py View File

@@ -0,0 +1,127 @@
1
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
2
+# not use this file except in compliance with the License. You may obtain
3
+# a copy of the License at
4
+#
5
+#      http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+# Unless required by applicable law or agreed to in writing, software
8
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
+# License for the specific language governing permissions and limitations
11
+# under the License.
12
+
13
+import glob
14
+import re
15
+
16
+import docutils.core
17
+import testtools
18
+
19
+
20
+# Used for new sections introduced during a release.
21
+# - "History" introduced in Liberty should be
22
+# mandatory for M.
23
+OPTIONAL_SECTIONS = ("History",)
24
+
25
+
26
+class TestTitles(testtools.TestCase):
27
+    def _get_title(self, section_tree):
28
+        section = {
29
+            'subtitles': [],
30
+        }
31
+        for node in section_tree:
32
+            if node.tagname == 'title':
33
+                section['name'] = node.rawsource
34
+            elif node.tagname == 'section':
35
+                subsection = self._get_title(node)
36
+                section['subtitles'].append(subsection['name'])
37
+        return section
38
+
39
+    def _get_titles(self, spec):
40
+        titles = {}
41
+        for node in spec:
42
+            if node.tagname == 'section':
43
+                # Note subsection subtitles are thrown away
44
+                section = self._get_title(node)
45
+                titles[section['name']] = section['subtitles']
46
+        return titles
47
+
48
+    def _check_titles(self, filename, expect, actual):
49
+        missing_sections = [x for x in expect.keys() if (
50
+            x not in actual.keys()) and (x not in OPTIONAL_SECTIONS)]
51
+        extra_sections = [x for x in actual.keys() if x not in expect.keys()]
52
+
53
+        msgs = []
54
+        if len(missing_sections) > 0:
55
+            msgs.append("Missing sections: %s" % missing_sections)
56
+        if len(extra_sections) > 0:
57
+            msgs.append("Extra sections: %s" % extra_sections)
58
+
59
+        for section in expect.keys():
60
+            missing_subsections = [x for x in expect[section]
61
+                                   if x not in actual.get(section, {})]
62
+            # extra subsections are allowed
63
+            if len(missing_subsections) > 0:
64
+                msgs.append("Section '%s' is missing subsections: %s"
65
+                            % (section, missing_subsections))
66
+
67
+        if len(msgs) > 0:
68
+            self.fail("While checking '%s':\n  %s"
69
+                      % (filename, "\n  ".join(msgs)))
70
+
71
+    def _check_lines_wrapping(self, tpl, raw):
72
+        code_block = False
73
+        for i, line in enumerate(raw.split("\n")):
74
+            # NOTE(ndipanov): Allow code block lines to be longer than 79 ch
75
+            if code_block:
76
+                if not line or line.startswith(" "):
77
+                    continue
78
+                else:
79
+                    code_block = False
80
+            if "::" in line:
81
+                code_block = True
82
+            if "http://" in line or "https://" in line:
83
+                continue
84
+            # Allow lines which do not contain any whitespace
85
+            if re.match("\s*[^\s]+$", line):
86
+                continue
87
+            self.assertTrue(
88
+                len(line) < 80,
89
+                msg="%s:%d: Line limited to a maximum of 79 characters." %
90
+                (tpl, i + 1))
91
+
92
+    def _check_no_cr(self, tpl, raw):
93
+        matches = re.findall('\r', raw)
94
+        self.assertEqual(
95
+            len(matches), 0,
96
+            "Found %s literal carriage returns in file %s" %
97
+            (len(matches), tpl))
98
+
99
+    def _check_trailing_spaces(self, tpl, raw):
100
+        for i, line in enumerate(raw.split("\n")):
101
+            trailing_spaces = re.findall(" +$", line)
102
+            self.assertEqual(len(trailing_spaces), 0,
103
+                    "Found trailing spaces on line %s of %s" % (i + 1, tpl))
104
+
105
+    def test_template(self):
106
+        releases = [x.split('/')[1] for x in glob.glob('specs/*/')]
107
+        self.assertTrue(len(releases), "Not able to find spec directories")
108
+        for release in releases:
109
+            with open("specs/%s-template.rst" % release) as f:
110
+                template = f.read()
111
+            spec = docutils.core.publish_doctree(template)
112
+            template_titles = self._get_titles(spec)
113
+
114
+            files = glob.glob("specs/%s/*/*" % release)
115
+            for filename in files:
116
+                self.assertTrue(filename.endswith(".rst"),
117
+                                "spec %s must use 'rst' extension."
118
+                                % filename)
119
+                with open(filename) as f:
120
+                    data = f.read()
121
+
122
+                spec = docutils.core.publish_doctree(data)
123
+                titles = self._get_titles(spec)
124
+                self._check_titles(filename, template_titles, titles)
125
+                self._check_lines_wrapping(filename, data)
126
+                self._check_no_cr(filename, data)
127
+                self._check_trailing_spaces(filename, data)

+ 33
- 0
tox.ini View File

@@ -0,0 +1,33 @@
1
+[tox]
2
+# Hold back to 1.4, since that's what's in Fedora 20 repos
3
+# and we don't need anything newer for freezer-specs tests
4
+minversion = 1.4
5
+envlist = docs,py27,pep8
6
+skipsdist = True
7
+
8
+[testenv]
9
+usedevelop = True
10
+setenv = VIRTUAL_ENV={envdir}
11
+install_command = pip install -U {opts} {packages}
12
+deps = -r{toxinidir}/requirements.txt
13
+whitelist_externals = find
14
+commands =
15
+  find . -type f -name "*.pyc" -delete
16
+  python setup.py testr --slowest --testr-args='{posargs}'
17
+
18
+[testenv:venv]
19
+commands = {posargs}
20
+
21
+[testenv:docs]
22
+commands =
23
+  find . -type f -name "*.pyc" -delete
24
+  python setup.py build_sphinx
25
+
26
+[testenv:pep8]
27
+deps = -r{toxinidir}/test-requirements.txt
28
+commands =
29
+  flake8 {posargs}
30
+
31
+[flake8]
32
+ignore = E128
33
+exclude = .venv,.git,.tox,doc,.eggs

Loading…
Cancel
Save