Browse Source

Define repository structure

Change-Id: Ie2d6f4391f8d711aa057c6cc3ff6fd475ee73754
Witold Bedyk 1 year ago
parent
commit
ad544f387e

+ 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

+ 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

+ 35
- 0
README.rst View File

@@ -0,0 +1,35 @@
1
+========================
2
+Team and repository tags
3
+========================
4
+
5
+.. image:: https://governance.openstack.org/tc/badges/monasca-specs.svg
6
+    :target: https://governance.openstack.org/tc/reference/tags/index.html
7
+
8
+ .. Change things from this point on
9
+
10
+======
11
+README
12
+======
13
+
14
+Monasca Specifications
15
+======================
16
+
17
+
18
+This git repository is used to hold priorities and approved design
19
+specifications for additions to the Monasca project. Reviews of the specs are
20
+done in gerrit, using a similar workflow to how we review and merge changes to
21
+the code itself.
22
+
23
+The layout of this repository is::
24
+
25
+  priorities/<release>/
26
+  specs/<release>/
27
+
28
+Where there are two sub-directories in ``specs``:
29
+
30
+specs/<release>/approved
31
+  specifications approved, but not yet implemented
32
+
33
+specs/<release>/implemented
34
+  implemented specifications
35
+

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

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

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

@@ -0,0 +1,156 @@
1
+.. monasca-specs documentation master file
2
+
3
+=====================
4
+Monasca Project Plans
5
+=====================
6
+
7
+Priorities
8
+==========
9
+
10
+At the beginning of each release cycle we agree what the whole community wants
11
+to focus on for the upcoming release. This is the output of those discussions:
12
+
13
+.. toctree::
14
+   :glob:
15
+   :maxdepth: 1
16
+
17
+   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/queens/index
29
+
30
+There are also some approved backlog specifications that are looking for
31
+owners:
32
+
33
+.. toctree::
34
+   :glob:
35
+   :maxdepth: 1
36
+
37
+   specs/backlog/index
38
+
39
+Process
40
+=======
41
+
42
+The lifecycle of a specification
43
+--------------------------------
44
+
45
+Developers proposing a specification should propose a new file in the
46
+``approved`` directory. monasca-specs-core will review the change in the usual
47
+manner for the OpenStack project and eventually it will get merged if a
48
+consensus is reached. As the developer of an approved specification, it is your
49
+responsibility to assign tasks to your story. Developers are then free to
50
+propose code reviews to implement their specification. These reviews should be
51
+sure to reference the Storyboard story and task in their commit message for
52
+tracking purposes.
53
+
54
+Once all code for the feature is merged into Monasca, the Storyboard story is
55
+marked complete.
56
+
57
+Periodically, someone from monasca-specs-core will move implemented
58
+specifications from the ``approved`` directory to the ``implemented``
59
+directory. Whilst individual developers are welcome to propose this move for
60
+their implemented specifications, we have generally just done this in a batch
61
+at the end of the release cycle. It is important to create redirects when this
62
+is done so that existing links to the approved specification are not broken.
63
+Redirects aren't symbolic links, they are defined in a file which sphinx
64
+consumes.
65
+
66
+This directory structure allows you to see what we thought about doing,
67
+decided to do and actually got done. Users interested in functionality in a
68
+given release should only refer to the ``implemented`` directory.
69
+
70
+Example specifications
71
+----------------------
72
+
73
+You can find an example spec in ``specs/<release_name>-template.rst``.
74
+
75
+Backlog specifications
76
+----------------------
77
+
78
+Additionally, we allow the proposal of specifications that do not have a
79
+developer assigned to them. These are proposed for review in the same manner as
80
+above, but are added to::
81
+
82
+  specs/backlog/approved
83
+
84
+Specifications in this directory indicate the original author has either
85
+become unavailable or has indicated that they are not going to implement the
86
+specification. The specifications found here are available as projects for
87
+people looking to get involved with Monasca. If you are interested in
88
+claiming a spec, start by posting a review for the specification that moves it
89
+from this directory to the next active release. Please set yourself as the new
90
+`primary assignee` and maintain the original author in the `other contributors`
91
+list.
92
+
93
+Working with gerrit and specification unit tests
94
+------------------------------------------------
95
+
96
+For more information about working with gerrit, see
97
+http://docs.openstack.org/infra/manual/developers.html#development-workflow
98
+
99
+To validate that the specification is syntactically correct (i.e. get more
100
+confidence in the Jenkins result), please execute the following command::
101
+
102
+  $ tox
103
+
104
+After running ``tox``, the documentation will be available for viewing in HTML
105
+format in the ``doc/build/`` directory.
106
+
107
+Specification review policies
108
+=============================
109
+
110
+There are a number of review policies which monasca-specs-core will apply when
111
+reviewing proposed specifications. They are:
112
+
113
+Trivial specifications
114
+----------------------
115
+
116
+Proposed changes which are trivial (very small amounts of code) and don't
117
+change any of our public APIs are sometimes not required to provide a
118
+specification. In these cases a Storyboard story is considered sufficient.
119
+These proposals are approved during the `Open Discussion` portion of the
120
+weekly Monasca IRC meeting. If you think your proposed feature is trivial and
121
+meets these requirements, we recommend you bring it up for discussion there
122
+before writing a full specification.
123
+
124
+Previously approved specifications
125
+----------------------------------
126
+
127
+`Specifications are only approved for a single release`. If your specification
128
+was previously approved but not implemented (or not completely implemented),
129
+then you must seek re-approval for the specification. You can re-propose your
130
+specification by doing the following:
131
+
132
+* Copy (not move) your specification to the right directory for the current
133
+  release.
134
+* Update the document to comply with the new template.
135
+* If there are no functional changes to the specification (only template
136
+  changes) then add the `Previously-approved: <release>` tag to your commit
137
+  message.
138
+* Send for review.
139
+* monasca-specs-core will merge specifications which meet these requirements
140
+  with a single +2.
141
+
142
+Specifications which depend on merging code in other OpenStack projects
143
+-----------------------------------------------------------------------
144
+
145
+For specifications `that depend on code in other OpenStack projects merging`
146
+we will not approve the Monasca specification until the code in that other
147
+project has merged. To indicate your specification is in this state, please
148
+use the Depends-On git commit message tag. The correct format is
149
+`Depends-On: <change id of other work>`. monasca-specs-core can approve the
150
+specification at any time, but it won't merge until the code we need to land
151
+in the other project has merged as well.
152
+
153
+Indices and tables
154
+==================
155
+
156
+* :ref:`search`

+ 1
- 0
doc/source/priorities View File

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

+ 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

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

@@ -0,0 +1,21 @@
1
+==============================
2
+Monasca Backlog Specifications
3
+==============================
4
+
5
+These specifications are ideas and features that are desirable but do not have
6
+anyone working on them.
7
+
8
+Template:
9
+
10
+.. toctree::
11
+   :maxdepth: 1
12
+
13
+   Specification Template  <template>
14
+
15
+Approved (but not implemented) backlog specs:
16
+
17
+.. toctree::
18
+   :glob:
19
+   :maxdepth: 1
20
+
21
+..   approved/*

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

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

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

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

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

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

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

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

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

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

+ 12
- 0
priorities/queens-priorities.rst View File

@@ -0,0 +1,12 @@
1
+.. _queens-priorities:
2
+
3
+=========================
4
+Queens Project Priorities
5
+=========================
6
+
7
+List of priorities the Monasca drivers team is prioritizing in Queens.
8
+
9
++--------------------------------------+----------------------+----------+
10
+| Title                                | Owners               | Priority |
11
++======================================+======================+==========+
12
++--------------------------------------+----------------------+----------+

+ 9
- 0
requirements.txt View File

@@ -0,0 +1,9 @@
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
+oslosphinx>=4.7.0 # Apache-2.0
5
+pbr!=2.1.0,>=2.0.0 # Apache-2.0
6
+sphinx>=1.6.2 # BSD
7
+testrepository>=0.0.18 # Apache-2.0/BSD
8
+testtools>=1.4.0 # MIT
9
+yasfb>=0.5.1,!=0.6.0

+ 23
- 0
setup.cfg View File

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

+ 29
- 0
setup.py View File

@@ -0,0 +1,29 @@
1
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License");
4
+# you may not use this file except in compliance with the License.
5
+# You may obtain a copy of the License at
6
+#
7
+#    http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
+# implied.
13
+# See the License for the specific language governing permissions and
14
+# limitations under the License.
15
+
16
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
17
+import setuptools
18
+
19
+# In python < 2.7.4, a lazy loading of package `pbr` will break
20
+# setuptools if some other modules registered functions in `atexit`.
21
+# solution from: http://bugs.python.org/issue15881#msg170215
22
+try:
23
+    import multiprocessing  # noqa
24
+except ImportError:
25
+    pass
26
+
27
+setuptools.setup(
28
+    setup_requires=['pbr>=2.0.0'],
29
+    pbr=True)

+ 0
- 0
specs/.gitignore View File


+ 378
- 0
specs/queens-template.rst View File

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

+ 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
+doc8>=0.6.0 # Apache-2.0

+ 35
- 0
tox.ini View File

@@ -0,0 +1,35 @@
1
+[tox]
2
+minversion = 2.8
3
+envlist = docs,pep8
4
+skipsdist = True
5
+
6
+[testenv]
7
+usedevelop = True
8
+install_command = pip install -U {opts} {packages}
9
+setenv =
10
+   VIRTUAL_ENV={envdir}
11
+deps = -r{toxinidir}/requirements.txt
12
+       -r{toxinidir}/test-requirements.txt
13
+
14
+[testenv:venv]
15
+commands = {posargs}
16
+
17
+[testenv:docs]
18
+commands = python setup.py build_sphinx
19
+
20
+[testenv:pep8]
21
+description = Runs set of linters against codebase (checkniceness)
22
+commands = {[testenv:checkniceness]commands}
23
+
24
+[testenv:checkniceness]
25
+description = Validates (pep-like) documenation
26
+skip_install = True
27
+usedevelop = False
28
+commands = doc8 --file-encoding utf-8 {toxinidir}/doc
29
+
30
+[testenv:spelling]
31
+deps =
32
+   -r{toxinidir}/requirements.txt
33
+   sphinxcontrib-spelling
34
+   PyEnchant
35
+commands = sphinx-build -b spelling doc/source doc/build/spelling

Loading…
Cancel
Save