Browse Source

Initial commit

This populates the repository with a standard layout which
was adapted from nova-specs.

Change-Id: I75d80f9a80cc7e7a013c9229bb5b2b2cf7cf5ed6
Adam Spiers 2 years ago
parent
commit
b61b7b70ef

+ 10
- 0
.gitignore View File

@@ -0,0 +1,10 @@
1
+AUTHORS
2
+ChangeLog
3
+build
4
+.tox
5
+.venv
6
+*.egg*
7
+*.swp
8
+*.swo
9
+*.pyc
10
+.testrepository

+ 4
- 0
.testr.conf View File

@@ -0,0 +1,4 @@
1
+[DEFAULT]
2
+test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
3
+test_id_option=--load-list $IDFILE
4
+test_list_option=--list

+ 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

+ 134
- 0
README.rst View File

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

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

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

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

@@ -0,0 +1,54 @@
1
+.. openstack-resource-agents-specs documentation master file
2
+
3
+===================================================
4
+ OpenStack Pacemaker Resource Agents 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 openstack-resource-agents-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/

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

@@ -0,0 +1,32 @@
1
+==========================================================
2
+OpenStack Pacemaker Resource Agents Backlog Specifications
3
+==========================================================
4
+
5
+The spec backlog is a place for the team to record decisions about
6
+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
11
+problem.
12
+
13
+A spec that exists here is something that either needs a driver or
14
+implementor, or something that can't be done currently. If you would
15
+like to implement one of these specifications, fill out the missing
16
+sections and follow the standard process of submitting it to a release
17
+(See :doc:`../../readme`).
18
+
19
+Template:
20
+
21
+.. toctree::
22
+   :maxdepth: 1
23
+
24
+   Specification Template  <template>
25
+
26
+Approved (but not implemented) backlog specs:
27
+
28
+.. toctree::
29
+   :glob:
30
+   :maxdepth: 1
31
+
32
+   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
+Openstack Pacemaker Resource Agents 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

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

@@ -0,0 +1,34 @@
1
+.. _newton-priorities:
2
+
3
+=========================
4
+Newton Project Priorities
5
+=========================
6
+
7
+List of themes (in the form of use cases) the OpenStack HA community
8
+is prioritizing in Newton.
9
+
10
++-------------------------------------------+-----------------------+
11
+| Priority                                  | Primary Contacts      |
12
++===========================================+=======================+
13
+| `Highly Available VMs`_                   | `Adam Spiers`_        |
14
++-------------------------------------------+-----------------------+
15
+
16
+Highly Available VMs
17
+--------------------
18
+
19
+The OpenStack `Product Working Group`_ is maintaining a user story for
20
+`High Availability for Virtual Machines`_.  During and since the
21
+Austin summit, there has been a lot of discussion within the OpenStack
22
+HA community about how to converge on an upstream implementation which
23
+fulfils this user story, which has been captured in the
24
+`newton-instance-ha etherpad`_ and in the minutes of the `weekly HA
25
+IRC meetings`_.  The first step is to write a series of specs which
26
+will describe the architectural design and corresponding deliverables
27
+for each of the components which were agreed as necessary for a
28
+flexible, modular solution.
29
+
30
+.. _Adam Spiers: https://launchpad.net/~adam.spiers
31
+.. _High Availability for Virtual Machines: http://specs.openstack.org/openstack/openstack-user-stories/user-stories/proposed/ha_vm.html
32
+.. _Product Working Group: https://wiki.openstack.org/wiki/ProductTeam
33
+.. _weekly HA IRC meetings: https://wiki.openstack.org/wiki/Meetings/HATeamMeeting
34
+.. _newton-instance-ha etherpad: https://etherpad.openstack.org/p/newton-instance-ha

+ 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

+ 5
- 0
requirements.txt View File

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

+ 23
- 0
setup.cfg View File

@@ -0,0 +1,23 @@
1
+[metadata]
2
+name = openstack-resource-agents-specs
3
+summary = OpenStack Resource Agents for Pacemaker 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) 2013 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

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

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

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

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

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

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

+ 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 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