Merge "Final changes for pike RC1"

This commit is contained in:
Jenkins 2017-08-10 20:45:42 +00:00 committed by Gerrit Code Review
commit 4a9566adf6
15 changed files with 6490 additions and 12 deletions

View File

@ -207,11 +207,18 @@ class LibraryService (data_service.DataService):
for (dirpath, dirnames, filenames) in os.walk( for (dirpath, dirnames, filenames) in os.walk(
cfg.CONF.policy_library_path): cfg.CONF.policy_library_path):
for filename in filenames: for filename in filenames:
count = _load_library_policy_file( name, extension = os.path.splitext(filename)
os.path.join(dirpath, filename)) if extension in ['.yaml', '.yml']:
if count > 0: fullpath = os.path.join(dirpath, filename)
file_count += 1 count = 0
policy_count += count try:
count = _load_library_policy_file(fullpath)
except Exception:
LOG.exception('Failed to load library policy file %s',
fullpath)
if count > 0:
file_count += 1
policy_count += count
LOG.debug( LOG.debug(
'%s library policies from %s files successfully loaded', '%s library policies from %s files successfully loaded',
policy_count, file_count) policy_count, file_count)

View File

@ -26,6 +26,8 @@ extensions = [
'sphinx.ext.todo', 'sphinx.ext.todo',
'openstackdocstheme', 'openstackdocstheme',
#'sphinx.ext.intersphinx', #'sphinx.ext.intersphinx',
'oslo_config.sphinxext',
'oslo_config.sphinxconfiggen',
] ]
# openstackdocstheme options # openstackdocstheme options
@ -65,7 +67,7 @@ modindex_common_prefix = ['congress.']
# Sphinx are currently 'default' and 'sphinxdoc'. # Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."] # html_theme_path = ["."]
html_theme = 'openstackdocs' html_theme = 'openstackdocs'
# html_static_path = ['static'] html_static_path = ['_static']
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project htmlhelp_basename = '%sdoc' % project
@ -85,6 +87,10 @@ latex_documents = [
# Example configuration for intersphinx: refer to the Python standard library. # Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None} #intersphinx_mapping = {'http://docs.python.org/': None}
# -- Options for oslo_config.sphinxconfiggen ---------------------------------
config_generator_config_file = '../../etc/congress-config-generator.conf'
sample_config_basename = '_static/congress'
[extensions] [extensions]
todo_include_todos=True todo_include_todos=True

View File

@ -0,0 +1,6 @@
=============
congress.conf
=============
.. show-options::
:config-file: etc/congress-config-generator.conf

View File

@ -0,0 +1,30 @@
=====================
Configuration Options
=====================
This section provides a list of all possible options for each
configuration file.
Configuration Reference
-----------------------
Congress uses the following configuration files.
.. toctree::
:glob:
:maxdepth: 1
*
Sample Configuration Files
--------------------------
The following are sample configuration files for Congress.
These are generated from code and reflect the current state of code
in the Congress repository.
.. toctree::
:glob:
:maxdepth: 1
samples/*

View File

@ -0,0 +1,8 @@
====================
Sample congress.conf
====================
This sample configuration can also be viewed in `the raw format
<../../_static/congress.conf.sample>`_.
.. literalinclude:: ../../_static/congress.conf.sample

View File

@ -12,6 +12,7 @@ Welcome to Congress!
Introduction <user/readme> Introduction <user/readme>
User Documentation <user/index> User Documentation <user/index>
Installation Documentation <install/index> Installation Documentation <install/index>
Configuration Documentation <configuration/index>
Administrator Documentation <admin/index> Administrator Documentation <admin/index>
Contributor Documentation <contributor/index> Contributor Documentation <contributor/index>

View File

@ -9,6 +9,7 @@ Congress User Documentation
cloudservices cloudservices
policy policy
enforcement enforcement
policy-library
api api
tutorial-tenant-sharing tutorial-tenant-sharing

View File

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

21
library/README.rst Normal file
View File

@ -0,0 +1,21 @@
==============
Policy Library
==============
Congress bundles a library of useful policies to help users get started.
For example, the ``library/volume_encryption/servers_unencrypted_volume.yaml``
identifies and warns on servers with unencrypted volumes attached.
.. literalinclude:: ../../../library/volume_encryption/servers_unencrypted_volume.yaml
The latest collection library policies can be found here:
https://github.com/openstack/congress/tree/master/library
To import a library policy YAML file into Congress, use the following CLI
command (python-congressclient version 1.8.0 or higher
https://pypi.python.org/pypi/python-congressclient/).
.. code-block:: console
$ openstack congress policy create-from-file <path-to-policy-yaml>

View File

@ -10,5 +10,4 @@ upgrade:
Congress will load pre-written policies for easy activation later Congress will load pre-written policies for easy activation later
by an administrator. by an administrator.
This option can be ignored if you do not want This option can be ignored if you do not want
Congress to load pre-written policies from files. Due to MySQL limitations, Congress to load pre-written policies from files.
the full path to each policy file cannot exceed 760 characters.

View File

@ -0,0 +1,20 @@
++./doctor_pushdriver.sh:main:13 sed -n 5p
++./doctor_pushdriver.sh:main:13 openstack congress datasource create doctor doctor -f value
+./doctor_pushdriver.sh:main:13 UUID=e16aca11-caa7-44ed-a4f8-95af4a3b9f6a
+./doctor_pushdriver.sh:main:15 openstack congress datasource row update doctor events '[{"id": "0123-4567-89ab", "time": "2016-02-22T11:48:55Z", "type": "compute.host.down", "details": {"hostname": "compute1", "status": "down", "monitor": "zabbix1", "monitor_event_id": "111"}}]'
+./doctor_pushdriver.sh:main:17 openstack congress datasource row list doctor events
+---------------+---------------+----------+--------+---------+------------------+
| time | type | hostname | status | monitor | monitor_event_id |
+---------------+---------------+----------+--------+---------+------------------+
| 2016-02-22T11 | compute.host. | compute1 | down | zabbix1 | 111 |
| :48:55Z | down | | | | |
+---------------+---------------+----------+--------+---------+------------------+
+./doctor_pushdriver.sh:main:19 openstack congress datasource row update e16aca11-caa7-44ed-a4f8-95af4a3b9f6a events '[{"id": "1123-4567-89ab", "time": "2016-02-22T11:48:55Z", "type": "compute.host.down", "details": {"hostname": "compute2", "status": "down", "monitor": "zabbix2", "monitor_event_id": "222"}}]'
+./doctor_pushdriver.sh:main:21 openstack congress datasource row list doctor events
+---------------+---------------+----------+--------+---------+------------------+
| time | type | hostname | status | monitor | monitor_event_id |
+---------------+---------------+----------+--------+---------+------------------+
| 2016-02-22T11 | compute.host. | compute2 | down | zabbix2 | 222 |
| :48:55Z | down | | | | |
+---------------+---------------+----------+--------+---------+------------------+
+./doctor_pushdriver.sh:main:23 openstack congress datasource delete doctor

View File

@ -12,7 +12,7 @@
############################################################################# #############################################################################
openstack congress version list openstack congress version list
UUID=`openstack congress datasource create --config username=admin --config tenant_name=admin --config auth_url=http://127.0.0.1:5000/v3 --config password=password --config poll_time=5 nova nova2 -f value | sed -n '5p'` UUID=`openstack congress datasource create --config username=admin --config tenant_name=admin --config auth_url=http://127.0.0.1/identity --config password=password --config poll_time=5 nova nova2 -f value | sed -n '5p'`
openstack congress datasource actions show nova2 openstack congress datasource actions show nova2
openstack congress datasource actions show $UUID openstack congress datasource actions show $UUID
openstack congress datasource list openstack congress datasource list
@ -94,7 +94,7 @@ openstack congress policy row list policy1 s
# TODO make action undoable. undo. # TODO make action undoable. undo.
openstack congress datasource delete nova openstack congress datasource delete nova
UUID=`openstack congress datasource create --config username=admin --config tenant_name=admin --config auth_url=http://127.0.0.1:5000/v3 --config password=password --config poll_time=5 nova nova -f value | sed -n '5p'` UUID=`openstack congress datasource create --config username=admin --config tenant_name=admin --config auth_url=http://127.0.0.1/identity --config password=password --config poll_time=5 nova nova -f value | sed -n '5p'`
openstack congress datasource row list nova flavors openstack congress datasource row list nova flavors
openstack congress policy rule create policy1 'q(10,10)' openstack congress policy rule create policy1 'q(10,10)'
openstack congress policy row list policy1 s # 0 tuples, could take a little time to realize openstack congress policy row list policy1 s # 0 tuples, could take a little time to realize

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ description-file =
README.rst README.rst
author = OpenStack author = OpenStack
author-email = openstack-dev@lists.openstack.org author-email = openstack-dev@lists.openstack.org
home-page = http://docs.openstack.org/developer/congress/ home-page = https://docs.openstack.org/congress/latest/
classifier = classifier =
Environment :: OpenStack Environment :: OpenStack
Intended Audience :: Information Technology Intended Audience :: Information Technology