From 4aabff41930c63f9faba022c7a5d149e9fbfa34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89douard=20Thuleau?= Date: Fri, 13 Apr 2018 16:11:46 +0200 Subject: [PATCH] [config] use generated code from Contrail API client lib - Patch I72c8307d308ef048c099fc40a55b7b01fd67d653 move some python genereteds files, update scons file to follow that change - use the generated code from the contrail API client lib instead of re-generate it in the API server - move generated API documentation to the contrail API client lib Depends-On: I62fcdc0bedc96d2dc8a98ccb91f978ce2792025a Depends-On: If97d6bfb29432588b4a5b54cb8c10c82a581b2ca Depends-On: If3d5bd7ed9db1f09b0aef3173806c1e23060dab7 Partial-Bug: #1711447 Closes-Bug: #1764278 (cherry picked from commit af57ec25a600ffd21cfc861fb6098833e8c1fc71) Change-Id: I4e9b4bea70dbc1fbf56b906395130fe62a445a0f --- src/config/api-server/SConscript | 66 +- src/config/api-server/doc/SConscript | 39 - src/config/api-server/doc/source/Makefile | 153 -- src/config/api-server/doc/source/__init__.py | 0 src/config/api-server/doc/source/conf.py | 258 --- src/config/api-server/doc/source/index.rst | 55 - .../api-server/doc/source/library_details.rst | 155 -- .../doc/source/library_reference.rst | 19 - .../api-server/doc/source/rest_details.rst | 561 ------- .../source/themes/contrail/static/rtd.css_t | 1448 ----------------- .../doc/source/themes/contrail/theme.conf | 64 - .../doc/source/themes/rtd/static/rtd.css_t | 1438 ---------------- .../doc/source/themes/rtd/theme.conf | 64 - .../doc/source/tutorial_with_library.rst | 97 -- .../doc/source/tutorial_with_rest.rst | 108 -- src/config/api-server/requirements.txt | 2 +- .../vnc_cfg_api_server/provision_defaults.py | 2 +- .../api-server/vnc_cfg_api_server/utils.py | 4 +- .../vnc_cfg_api_server/vnc_cfg_api_server.py | 7 +- .../vnc_cfg_api_server/vnc_cfg_types.py | 4 +- .../vnc_cfg_api_server/vnc_quota.py | 4 +- .../api-server/vnc_cfg_api_server/vnc_rbac.py | 2 +- .../contrail_issu/test-requirements.txt | 2 +- src/config/device-manager/SConscript | 2 +- .../device-manager/test-requirements.txt | 2 +- .../ansible-playbooks/requirements.txt | 2 +- .../ansible-playbooks/test-requirements.txt | 2 +- src/config/fabric-ansible/requirements.txt | 2 +- .../fabric-ansible/test-requirements.txt | 2 +- .../schema-transformer/test-requirements.txt | 2 +- src/config/svc-monitor/test-requirements.txt | 2 +- src/config/test/SConscript | 9 +- .../vnc_openstack/test-requirements.txt | 2 +- src/container/cni/test-requirements.txt | 2 +- src/container/kube-cni/test-requirements.txt | 2 +- .../tests/vnc/test_vnc_ingress.py | 2 +- .../kube-manager/test-requirements.txt | 2 +- .../mesos-manager/test-requirements.txt | 2 +- src/storage/stats-daemon/SConscript | 5 +- 39 files changed, 35 insertions(+), 4559 deletions(-) delete mode 100644 src/config/api-server/doc/SConscript delete mode 100644 src/config/api-server/doc/source/Makefile delete mode 100644 src/config/api-server/doc/source/__init__.py delete mode 100644 src/config/api-server/doc/source/conf.py delete mode 100644 src/config/api-server/doc/source/index.rst delete mode 100644 src/config/api-server/doc/source/library_details.rst delete mode 100644 src/config/api-server/doc/source/library_reference.rst delete mode 100644 src/config/api-server/doc/source/rest_details.rst delete mode 100644 src/config/api-server/doc/source/themes/contrail/static/rtd.css_t delete mode 100644 src/config/api-server/doc/source/themes/contrail/theme.conf delete mode 100644 src/config/api-server/doc/source/themes/rtd/static/rtd.css_t delete mode 100644 src/config/api-server/doc/source/themes/rtd/theme.conf delete mode 100644 src/config/api-server/doc/source/tutorial_with_library.rst delete mode 100644 src/config/api-server/doc/source/tutorial_with_rest.rst diff --git a/src/config/api-server/SConscript b/src/config/api-server/SConscript index 9b396497730..b244364ac2e 100644 --- a/src/config/api-server/SConscript +++ b/src/config/api-server/SConscript @@ -1,5 +1,3 @@ -# -*- mode: python; -*- - # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # @@ -8,32 +6,6 @@ import os Import('CfgmEnv') env = CfgmEnv.Clone() -autogen_infra_sources = [ - '#/src/contrail-api-client/generateds/generateDS.py', - '#/src/contrail-api-client/generateds/TypeGenerator.py', - '#/src/contrail-api-client/generateds/ccmap.py', - '#/src/contrail-api-client/generateds/idl_parser.py', - '#/src/contrail-api-client/generateds/ifmap_global.py', - '#/src/contrail-api-client/generateds/ifmap_model.py', - '#/src/contrail-api-client/generateds/ifmap_frontend.py', - ] - -autogen_sources = [ - '#src/contrail-api-client/schema/all_cfg.xsd', - '#src/contrail-api-client/schema/vnc_cfg.xsd', - '#src/contrail-api-client/schema/bgp_schema.xsd', - '#src/contrail-api-client/schema/ietf-l3vpn-schema.xsd', - '#src/contrail-api-client/schema/smi-base.xsd', - ] - -generated_dependencies = [ - env['TOP'] + '/api-lib/vnc_api/gen/__init__.py', - env['TOP'] + '/api-lib/vnc_api/gen/resource_xsd.py', - env['TOP'] + '/api-lib/vnc_api/gen/resource_common.py', - env['TOP'] + '/api-lib/vnc_api/gen/resource_client.py', - env['TOP'] + '/api-lib/vnc_api/gen/vnc_api_client_gen.py', - ] - setup_sources = [ '.coveragerc', '.pylintrc', @@ -46,7 +18,6 @@ setup_sources = [ 'test-requirements.txt', 'tox.ini', 'vnc_cfg_api_server', - 'doc', ] setup_sources_rules = [] @@ -54,41 +25,16 @@ for file in setup_sources: setup_sources_rules.append( env.Install(Dir('.'), "#controller/src/config/api-server/" + file)) -autogen_script = File('#src/contrail-api-client/generateds/generateDS.py').path -autogen_cmd = '%s -f -o %s -g ifmap-frontend' % (autogen_script, Dir('vnc_cfg_api_server/gen/resource').path) - -generated_files = ['vnc_cfg_api_server/gen/__init__.py'] -env.Append(ENV = {'HEAT_BUILDTOP' : Dir(env['TOP']).abspath}) - -generated_rule = env.Command(generated_files, - '#/src/contrail-api-client/schema/all_cfg.xsd', - autogen_cmd + ' $SOURCE') - -generateds_rule = env.Install("vnc_cfg_api_server/gen", "#src/contrail-api-client/api-lib/generatedssuper.py") -cfixture_rule = env.Install("vnc_cfg_api_server/gen", "#src/contrail-api-client/api-lib/cfixture.py") - -doc_sources_rules = SConscript(dirs=['doc'], exports = 'CfgmEnv') - -sandesh_trace_pkg = env.SandeshGenPy('traces.sandesh', 'vnc_cfg_api_server/sandesh/', False) - -sdist_depends = [generated_rule, generateds_rule, cfixture_rule] -sdist_depends.extend(setup_sources_rules) -sdist_depends.extend(doc_sources_rules) -sdist_depends.extend(sandesh_trace_pkg) +sandesh_trace_pkg = env.SandeshGenPy( + 'traces.sandesh', 'vnc_cfg_api_server/sandesh/', False) +sdist_depends = setup_sources_rules + sandesh_trace_pkg cd_cmd = 'cd ' + Dir('.').path + ' && ' -# TODO: deprecate sdist_gen = env.Command('dist/contrail-api-server-0.1dev.tar.gz', 'setup.py', cd_cmd + 'python setup.py sdist') -env.Default(sdist_gen) - -# generated files depend on autogeneration infra parts - -env.Depends(generated_rule, [autogen_infra_sources, autogen_sources, generated_dependencies]) - -# install everything before building distribution env.Depends(sdist_gen, sdist_depends) +env.Default(sdist_gen) # Documentation doc_files = [] @@ -119,7 +65,3 @@ env.Alias('install', env.Install( env['INSTALL_MESSAGE_DOC'] + '/contrail-api/', doc_files)) env.SetupPyTestSuite(sdist_gen, use_tox=True) - -# Local Variables: -# mode: python -# End: diff --git a/src/config/api-server/doc/SConscript b/src/config/api-server/doc/SConscript deleted file mode 100644 index 29d8e6aa576..00000000000 --- a/src/config/api-server/doc/SConscript +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. -# - -# -*- mode: python; -*- - -Import('CfgmEnv') -env = CfgmEnv.Clone() - -import os -import shutil - -doc_sources_rules = [] - -sphinxapidocs = ['gen.rst', 'modules.rst'] -if os.path.exists('/usr/bin/sphinx-apidoc'): - apidoc_rule = env.Command(sphinxapidocs, '', 'SPHINX_APIDOC_OPTIONS="members,show-inheritance" sphinx-apidoc -f -o ' + Dir('.').path + ' ' + Dir('../vnc_cfg_api_server/gen').path + ' ' + Dir('.').path) - env.Depends(apidoc_rule, File(env['TOP'] + '/config/api-server/vnc_cfg_api_server/gen/__init__.py')) - - userdoc_rule = env.Install(Dir('.'), Glob('#controller/src/config/api-server/doc/source/*')) - schema_rule = env.Install(Dir('.'), Glob('#src/contrail-api-client/schema/*.xsd')) - gendoc_rule = env.Install(Dir('.'), env['TOP'] + '/api-lib/vnc_api/gen/contrail_openapi.rst') - openapi_rule = env.Install(Dir('.'), env['TOP'] + '/api-lib/vnc_api/gen/contrail_openapi.json') - - html_gen_rule = env.Command('contrail-config', ['Makefile', 'conf.py'], - 'make -C ' + Dir('.').path + ' html') - env.Depends(html_gen_rule, - [apidoc_rule, gendoc_rule, userdoc_rule, schema_rule, openapi_rule]) - - - doc_sources_rules.append(env.Install("../vnc_cfg_api_server", Dir('.'))) - env.Depends(doc_sources_rules, html_gen_rule) - -env.Requires(doc_sources_rules, File(env['TOP'] + '/config/api-server/vnc_cfg_api_server/vnc_cfg_api_server.py')) - -if 'install' in BUILD_TARGETS: - env.Alias('install', env.Install(env['INSTALL_DOC']+'/contrail-config', doc_sources_rules)) - -Return('doc_sources_rules') diff --git a/src/config/api-server/doc/source/Makefile b/src/config/api-server/doc/source/Makefile deleted file mode 100644 index 4fafb2f23e6..00000000000 --- a/src/config/api-server/doc/source/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = contrail-config - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/vnc_api.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/vnc_api.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/vnc_api" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/vnc_api" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/src/config/api-server/doc/source/__init__.py b/src/config/api-server/doc/source/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/config/api-server/doc/source/conf.py b/src/config/api-server/doc/source/conf.py deleted file mode 100644 index 14baab95b0a..00000000000 --- a/src/config/api-server/doc/source/conf.py +++ /dev/null @@ -1,258 +0,0 @@ -# -*- coding: utf-8 -*- -# -# vnc_api documentation build configuration file, created by -# sphinx-quickstart on Sun Mar 10 23:39:27 2013. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys, os - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -sys.path.insert(0, os.path.abspath('../vnc_cfg_api_server')) -sys.path.insert(0, os.path.abspath('../')) -sys.path.insert(0, os.path.abspath('../../../api-lib')) -sys.path.insert(0, os.path.abspath('../../../sandesh/library/python')) - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.ifconfig'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'vnc_api' -copyright = u'2013, Juniper Networks Inc.' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -data = '0.99' -try: - with open("../../../../../../src/contrail-common/base/version.info", "r") as f: - data=f.read().replace('\n', '') -except: - pass - -version = data -# The full version, including alpha/beta/rc tags. -release = data - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'contrail' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ["themes"] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static', 'contrail_openapi.json'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'vnc_apidoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'vnc_api.tex', u'vnc\\_api Documentation', - u'Juniper Networks Inc.', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'vnc_api', u'vnc_api Documentation', - [u'Juniper Networks Inc.'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'vnc_api', u'vnc_api Documentation', - u'Juniper Networks Inc.', 'vnc_api', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/src/config/api-server/doc/source/index.rst b/src/config/api-server/doc/source/index.rst deleted file mode 100644 index b277150df9e..00000000000 --- a/src/config/api-server/doc/source/index.rst +++ /dev/null @@ -1,55 +0,0 @@ -.. vnc_api documentation master file, created by - sphinx-quickstart on Sun Mar 10 23:39:27 2013. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Juniper Contrail Configuration API Model -======================================== - -Contrail configuration is expressed in terms of objects which have the following characteristics - * Each object is identified by a UUID and a fully qualified name (FQ name). - * Each object has a parent object (except for top level objects e.g. global-system-config, domain, virtual-machine, etc.) - + E.g. a domain object is parent of project objects - * An object can have any number of child objects - + E.g. a project object can have one or more virtual-network objects and/or one or more network-policy objects as children - * An object can refer to other objects (and conversely, can be referred to by other objects). We say that if an object Obj1 has reference to Obj2, then it means Obj2 has 'back-reference' from Obj1. - + E.g. a virtual-network object can refer to one or more network-policy objects. A network-policy object can be referred to by one or more virtual-network objects. - * There can be metadata attached to the reference between two objects. - + E.g. a reference from virtual-network object to network-ipam object can have one or more subnets as metadata on the link - * An object can have any number of property elements. These elements can be of simple types (integer, boolean, string) or complex types that contain other data types. - * There are APIs to create/delete/update/read/list these objects. The list API can take various filters. Read and list APIs can also take the list of fields to be returned. - * It is possible to atomically update a specific field in the object without affecting any other fields. Similarly, it is possible to atomically add or delete a reference without affecting anything else. - - -Juniper Contrail Configuration API Interfaces -============================================= - -The Juniper Contrail configuration API server enables the manipulation of configuration -elements exposed by the Contrail API server. Interaction with the API server is possible using the following interfaces. - * REST interface: This interface can be accessed using a command line tool (e.g. cURL) or through a browser with an extension to parse/send JSON data. - * Contrail Python VNC API: This interface internally uses the same REST API, but provides an easy to use interface in a python client. The API is also available in other languages (e.g. java, go, etc). - -This document provides: - * Tutorials for using the REST and library interfaces - * General examples to work on different configuration elements - * Tips to use the system effectively - * Reference to the package, module and classes involved - -.. toctree:: - :maxdepth: 3 - - tutorial_with_rest.rst - tutorial_with_library.rst - rest_details.rst - library_details.rst - library_reference.rst - contrail_openapi.rst - .. modules.rst - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - diff --git a/src/config/api-server/doc/source/library_details.rst b/src/config/api-server/doc/source/library_details.rst deleted file mode 100644 index ff89a02dbf8..00000000000 --- a/src/config/api-server/doc/source/library_details.rst +++ /dev/null @@ -1,155 +0,0 @@ -Library API Details -=================== - -Connecting to API server ------------------------- - -To make any configuration changes, you first need to connect to API server and get a VNC API handle. This can be done by creating a VncApi object by passing all necessary arguments to its constructor. Example:: - - vnc_api = VncApi(username='admin', password=, tenant_name='admin', - api_server_host='10.84.10.10', api_server_port='8082', - api_server_url='/', conf_file=, user_info=None, - auth_token=None, auth_host=None, auth_port=None, - auth_protocol = None, auth_url=None, auth_type=None, - wait_for_connect=False, api_server_use_ssl=False, - domain_name=None): - - -Introduction ------------- - -The configuration API library provides a means of accessing and manipulating configuration -elements of the system through an object representation. The library API can be classified into two categories: - * those that manipulate an object locally (client-side) - * those that reflect/get an object's content onto/from the configuration API server. - -The configuration element types (also referred to as object types) have a hierarchical relationship -described in :doc:`vnc_cfg.xsd` schema. The class definitions of all object types are available at -:mod:`vnc_cfg_api_server.gen.resource_common` module. - -All objects have: - * a fully-qualified name which is an array of strings representing ancestor names from root - * an id-perms property which provide unix file-like permissions for the owner, group and others - * zero or more properties which represent information relevant only to the object - * zero or more references to other objects - * zero or more back references from other objects (computed automatically by the server) - * methods - + to construct an instance - - >>> example_obj = ExampleType('name', = ) - - + accessors for properties - - >>> print example_obj.get_() - >>> example_obj.set_() - - + accessors for referenced objectes - - >>> print example_obj.get__refs() - >>> example_obj.add_(reference_obj) - - + getters for back-references (i.e. objects referring to this) - - >>> print example_obj.get__back_refs() - - + getters for children objects - - >>> print example_obj.get_s() - - These methods do not communicate with the API server - -The main library class VncApi insert-ref-here has methods for every -object type to: - - * create an object - - >>> vnc_lib.example_type_create(example_obj) - - * read an object - - >>> example_obj = vnc_lib.example_type_read(id = ) - >>> example_obj = vnc_lib.example_type_read(fq_name = ['example-root', ... ,'example-parent', 'example-name']) - - * update an object - - >>> vnc_lib.example_type_update(example_obj) - - * delete an object - - >>> vnc_lib.example_type_delete(id = ) - >>> vnc_lib.example_type_delete(fq_name = ['example-root', ... ,'example-parent', 'example-name']) - - * list objects (an optional delete=True parameter returns detail instead of summary) - - >>> vnc_lib.example_types_list(parent_id = ) - >>> vnc_lib.example_types_list(parent_fq_name = ['example-root', ... ,'example-parent']) - >>> vnc_lib.example_types_list(obj_uuids = [, ]) - >>> vnc_lib.example_types_list(back_ref_id = ) - - These CRUD methods communicate with the API server. - -The API server for most objects acts purely as a data store. However properties for some object types -are allocated by the API server itself. These include - * default gateway in case of subnet (if not specified by user) - * ip address for instance-ip objects (if not specified by user) - -Exceptions ----------- -Errors from API server (http status codes and response content) are translated -to exception objects and raised. The different types of exceptions are defined at -cfgm_common.exceptions module - -Tips ----- -Online documentation of the vnc_api module can be found by: - - >>> help(vnc_api) - Help on module vnc_api.vnc_api in vnc_api: - NAME - vnc_api.vnc_api - FILE - /usr/lib/python2.7/site-packages/vnc_api/vnc_api.py - DESCRIPTION - This is the main module in VNS Config API library. It handles connection to API server, - exposes configuration elements as objects and allows for manipulating objects locally - and updating API server - CLASSES - vnc_api.gen.vnc_api_client_gen.VncApiClientGen(__builtin__.object) - VncApi - class VncApi(vnc_api.gen.vnc_api_client_gen.VncApiClientGen) - | Method resolution order: - | VncApi - | vnc_api.gen.vnc_api_client_gen.VncApiClientGen - | __builtin__.object - | - | Methods defined here: - | - | __init__(self, username=None, password=None, tenant_name=None, api_server_host=None, api_server_port=None, api_server_url=None) - | - -Online documentation of object methods etc. with standard ``dir`` and ``help`` python commands - - >>> dir(vn_blue_obj) - ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_type', 'add_network_ipam', 'add_network_policy', 'del_network_ipam', 'del_network_policy', 'dump', 'factory', 'fq_name', 'from_fq_name', 'get_access_control_lists', 'get_floating_ip_pools', 'get_fq_name', 'get_fq_name_str', 'get_id_perms', 'get_instance_ip_back_refs', 'get_network_ipam_refs', 'get_network_policy_refs', 'get_parent_fq_name', 'get_parent_fq_name_str', 'get_project_back_refs', 'get_route_target_list', 'get_routing_instances', 'get_type', 'get_virtual_machine_interface_back_refs', 'name', 'network_ipam_refs', 'network_policy_refs', 'parent_name', 'set_id_perms', 'set_network_ipam', 'set_network_ipam_list', 'set_network_policy', 'set_network_policy_list', 'set_route_target_list', 'uuid'] - - >>> help(vn_blue_obj) - Help on VirtualNetwork in module vnc_api.gen.resource_common object: - class VirtualNetwork(__builtin__.object) - | Represents virtual-network configuration representation. - | - | Child of :class:`.Project` object - | - | Properties of: - | * route-target-list (:class:`.RouteTargetList` type) - | * id-perms (:class:`.IdPermsType` type) - | - | References to: - | * list of (:class:`.NetworkIpam` object, :class:`.VnSubnetsType` attribute) - | * list of (:class:`.NetworkPolicy` object, :class:`.VirtualNetworkPolicyType` attribute) - | - | Referred by: - | * list of :class:`.Project` objects - | * list of :class:`.VirtualMachineInterface` objects - | * list of :class:`.InstanceIp` objects - | - diff --git a/src/config/api-server/doc/source/library_reference.rst b/src/config/api-server/doc/source/library_reference.rst deleted file mode 100644 index 0a53be16fdd..00000000000 --- a/src/config/api-server/doc/source/library_reference.rst +++ /dev/null @@ -1,19 +0,0 @@ -Library API reference -===================== - -.. toctree:: - :maxdepth: 4 - -:mod:`resource_common` Module ------------------------------ - -.. automodule:: gen.resource_common - :members: - :show-inheritance: - -:mod:`resource_xsd` Module --------------------------- - -.. automodule:: gen.resource_xsd - :members: - :show-inheritance: diff --git a/src/config/api-server/doc/source/rest_details.rst b/src/config/api-server/doc/source/rest_details.rst deleted file mode 100644 index 10fb38ee1d3..00000000000 --- a/src/config/api-server/doc/source/rest_details.rst +++ /dev/null @@ -1,561 +0,0 @@ -REST API Details -================ -The configuration API server provides a means of accessing and manipulating configuration -elements of the system using HTTP operations on resources represented in JSON. - -The configuration element types (also referred to as resource types) have a hierarchical relationship -described in :doc:`vnc_cfg.xsd` schema. JSON representation of these objects are what is -expected on the wire. - -For each resource type, the following APIs are available: - * Create a resource - * Read a resource given its UUID - * Update a resource - * Delete a resource given its UUID - * List resources of given type - -In addition, the following APIs are also available: - * Listing all resource types - * Convert FQ name to UUID - * Convert UUID to FQ name - * Add/Delete/Update a reference between two objects - -Creating a resource -------------------- -To create a resource, a ``POST`` has to be issued on the collection URL. -So for a resource of type *example-resource*, - - * *METHOD*: POST - * *URL*: http://:/example_resources/ - * *BODY*: JSON representation of example-resource type - * *RESPONSE*: UUID and href of created resource - -Example request :: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"virtual-network": {"parent_type": "project", "fq_name": ["default-domain", "admin", "vn-blue"], "network_ipam_refs": [{"attr": {"ipam_subnets": [{"subnet": {"ip_prefix": "10.1.1.0", "ip_prefix_len": 24}}]}, "to": ["default-domain", "default-project", "default-network-ipam"]}]}}' http://10.84.14.2:8082/virtual-networks - -Response :: - - {"virtual-network": {"fq_name": ["default-domain", "admin", "vn-blue"], "parent_uuid": "df7649a6-3e2c-4982-b0c3-4b5038eef587", "parent_href": "http://10.84.14.2:8082/project/df7649a6-3e2c-4982-b0c3-4b5038eef587", "uuid": "8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "href": "http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "name": "vn-blue"}} - -Reading a resource -------------------- -To read a resource, a ``GET`` has to be issued on the resource URL. - - * *METHOD*: GET - * *URL*: http://:/example_resource/ - * *BODY*: None - * *RESPONSE*: JSON representation of the resource - -Example request :: - - curl -X GET -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee - -Response :: - - {"virtual-network": {"virtual_network_properties": {"network_id": 4, "vxlan_network_identifier": null, "extend_to_external_routers": null}, "fq_name": ["default-domain", "admin", "vn-blue"], "uuid": "8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "access_control_lists": [{"to": ["default-domain", "admin", "vn-blue", "vn-blue"], "href": "http://10.84.14.2:8082/access-control-list/24b9c337-7be8-4883-a9a0-60197edf64e4", "uuid": "24b9c337-7be8-4883-a9a0-60197edf64e4"}], "network_policy_refs": [{"to": ["default-domain", "admin", "policy-red-blue"], "href": "http://10.84.14.2:8082/network-policy/f215a3ec-5cbd-4310-91f4-7bbca52b27bd", "attr": {"sequence": {"major": 0, "minor": 0}}, "uuid": "f215a3ec-5cbd-4310-91f4-7bbca52b27bd"}], "parent_uuid": "df7649a6-3e2c-4982-b0c3-4b5038eef587", "parent_href": "http://10.84.14.2:8082/project/df7649a6-3e2c-4982-b0c3-4b5038eef587", "parent_type": "project", "href": "http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "id_perms": {"enable": true, "description": null, "created": "2013-09-13T00:26:05.290644", "uuid": {"uuid_mslong": 10125498831222882614, "uuid_lslong": 11086156774262128366}, "last_modified": "2013-09-13T00:47:41.219833", "permissions": {"owner": "cloud-admin", "owner_access": 7, "other_access": 7, "group": "cloud-admin-group", "group_access": 7}}, "routing_instances": [{"to": ["default-domain", "admin", "vn-blue", "vn-blue"], "href": "http://10.84.14.2:8082/routing-instance/732567fd-8607-4045-b6c0-ff4109d3e0fb", "uuid": "732567fd-8607-4045-b6c0-ff4109d3e0fb"}], "network_ipam_refs": [{"to": ["default-domain", "default-project", "default-network-ipam"], "href": "http://10.84.14.2:8082/network-ipam/a01b486e-2c3e-47df-811c-440e59417ed8", "attr": {"ipam_subnets": [{"subnet": {"ip_prefix": "10.1.1.0", "ip_prefix_len": 24}, "default_gateway": "10.1.1.254"}]}, "uuid": "a01b486e-2c3e-47df-811c-440e59417ed8"}], "name": "vn-blue"}} - -Updating a resource --------------------- -To update a resource, a ``PUT`` has to be issued on the resource URL. - - * *METHOD*: PUT - * *URL*: http://:/example_resource/ - * *BODY*: JSON representation of resource attributes that are changing - * *RESPONSE*: UUID and href of updated resource - -References to other resources are specified as a list of dictionaries with -"to" and "attr" keys where "to" is the fully-qualified name of the resource -being referred to and "attr" is the data associated with the relation (if any). - -Example request :: - - curl -X PUT -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"virtual-network": {"fq_name": ["default-domain", "admin", "vn-blue"],"network_policy_refs": [{"to": ["default-domain", "admin", "policy-red-blue"], "attr":{"sequence":{"major":0, "minor": 0}}}]}}' http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee - -Response :: - - {"virtual-network": {"href": "http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "uuid": "8c84ff8a-30ac-4136-99d9-f0d9662f3eee"}} - -Deleting a resource -------------------- -To delete a resource, a ``DELETE`` has to be issued on the resource URL - - * *METHOD*: DELETE - * *URL*: http://:/example_resource/ - * *BODY*: None - * *RESPONSE*: None - -Example Request :: - - curl -X DELETE -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" http://10.84.14.2:8082/virtual-network/47a91732-629b-4cbe-9aa5-45ba4d7b0e99 - -Response *None* - -Listing Resources ------------------ -To list a set of resources, a ``GET`` has to be issued on the collection URL -with an optional query parameter mentioning the parent resource that contains -this collection. If parent resource is not mentioned, a resource named -'default-' is assumed. - - * *METHOD*: GET - * *URL*: http://:/example_resources - http://:/example_resources?parent_id= *OR* - http://:/example_resources?parent_fq_name_str= *OR* - http://:/example_resources?obj_uuids=,&detail=True *OR* - http://:/example_resources?back_ref_id= *OR* - * *BODY*: None - * *RESPONSE*: JSON list of UUID and href of collection if detail not specified, else JSON list of collection dicts - - -Example request :: - - curl -X GET -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" http://10.84.14.2:8082/virtual-networks - -Response :: - - {"virtual-networks": [{"href": "http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "fq_name": ["default-domain", "admin", "vn-blue"], "uuid": "8c84ff8a-30ac-4136-99d9-f0d9662f3eee"}, {"href": "http://10.84.14.2:8082/virtual-network/47a91732-629b-4cbe-9aa5-45ba4d7b0e99", "fq_name": ["default-domain", "admin", "vn-red"], "uuid": "47a91732-629b-4cbe-9aa5-45ba4d7b0e99"}, {"href": "http://10.84.14.2:8082/virtual-network/f423b6c8-deb6-4325-9035-15a8c8bb0a0d", "fq_name": ["default-domain", "default-project", "__link_local__"], "uuid": "f423b6c8-deb6-4325-9035-15a8c8bb0a0d"}, {"href": "http://10.84.14.2:8082/virtual-network/d44a51b0-f2d8-4644-aee0-fe856f970683", "fq_name": ["default-domain", "default-project", "default-virtual-network"], "uuid": "d44a51b0-f2d8-4644-aee0-fe856f970683"}, {"href": "http://10.84.14.2:8082/virtual-network/aad9e80a-8638-449f-a484-5d1bfd58065c", "fq_name": ["default-domain", "default-project", "ip-fabric"], "uuid": "aad9e80a-8638-449f-a484-5d1bfd58065c"}]} - -Discovering API server resources --------------------------------- -The resources managed by the server can be be obtained at the root URL(home-page). :: - - curl http://10.84.14.1:8082/ | python -m json.tool - -Here is a sample output :: - - { - "href": "http://10.84.14.2:8082", - "links": [ - { - "link": { - "href": "http://10.84.14.2:8082/documentation/index.html", - "name": "documentation", - "rel": "documentation" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/config-root", - "name": "config-root", - "rel": "root" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/domains", - "name": "domain", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/service-instances", - "name": "service-instance", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/instance-ips", - "name": "instance-ip", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/network-policys", - "name": "network-policy", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-DNS-records", - "name": "virtual-DNS-record", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/route-targets", - "name": "route-target", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/floating-ips", - "name": "floating-ip", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/floating-ip-pools", - "name": "floating-ip-pool", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/bgp-routers", - "name": "bgp-router", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-routers", - "name": "virtual-router", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/global-system-configs", - "name": "global-system-config", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/namespaces", - "name": "namespace", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/provider-attachments", - "name": "provider-attachment", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-DNSs", - "name": "virtual-DNS", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/customer-attachments", - "name": "customer-attachment", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-machines", - "name": "virtual-machine", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/service-templates", - "name": "service-template", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/security-groups", - "name": "security-group", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/access-control-lists", - "name": "access-control-list", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/network-ipams", - "name": "network-ipam", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-networks", - "name": "virtual-network", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/projects", - "name": "project", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/routing-instances", - "name": "routing-instance", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-machine-interfaces", - "name": "virtual-machine-interface", - "rel": "collection" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/domain", - "name": "domain", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/service-instance", - "name": "service-instance", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/instance-ip", - "name": "instance-ip", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/network-policy", - "name": "network-policy", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-DNS-record", - "name": "virtual-DNS-record", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/route-target", - "name": "route-target", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/floating-ip", - "name": "floating-ip", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/floating-ip-pool", - "name": "floating-ip-pool", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/bgp-router", - "name": "bgp-router", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-router", - "name": "virtual-router", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/config-root", - "name": "config-root", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/global-system-config", - "name": "global-system-config", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/namespace", - "name": "namespace", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/provider-attachment", - "name": "provider-attachment", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-DNS", - "name": "virtual-DNS", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/customer-attachment", - "name": "customer-attachment", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-machine", - "name": "virtual-machine", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/service-template", - "name": "service-template", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/security-group", - "name": "security-group", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/access-control-list", - "name": "access-control-list", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/network-ipam", - "name": "network-ipam", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-network", - "name": "virtual-network", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/project", - "name": "project", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/routing-instance", - "name": "routing-instance", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-machine-interface", - "name": "virtual-machine-interface", - "rel": "resource-base" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/fqname-to-id", - "name": "name-to-id", - "rel": "action" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/id-to-fqname", - "name": "id-to-name", - "rel": "action" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/useragent-kv", - "name": "useragent-keyvalue", - "rel": "action" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-network/%s/ip-alloc", - "name": "virtual-network-ip-alloc", - "rel": "action" - } - }, - { - "link": { - "href": "http://10.84.14.2:8082/virtual-network/%s/ip-free", - "name": "virtual-network-ip-free", - "rel": "action" - } - } - ] - } - -Converting FQ name to UUID --------------------------- -To find the UUID of a resource, given its fq name :: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"fq_name": ["default-domain", "admin", "vn-blue"], "type": "virtual-network"}' http://10.84.14.2:8082/fqname-to-id - -Here is a sample output :: - - {"uuid": "e3a20048-8cc7-4cff-8c3b-ada61eb822ed"} - -Converting UUID to FQ name --------------------------- -To find the type and FQ name of a resource, given its UUID :: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"uuid": "e3a20048-8cc7-4cff-8c3b-ada61eb822ed"}' http://10.84.14.2:8082/id-to-fqname - -Here is a sample output :: - - {"type": "virtual-network", "fq_name": ["default-domain", "admin", "vn-blue"]} - -Adding/Deleting/Updating a reference between two objects --------------------------------------------------------- - -To add/delete/update a reference between two objects, you don't need to read and send the entire object. You can atomically update a single reference by using this API. -To add or update a reference:: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"operation": "ADD", "uuid": "e3a20048-8cc7-4cff-8c3b-ada61eb822ed", "type": "virtual-network", "ref-type": "network-policy", "ref-uuid": "7810b656-97d9-4c43-94c7-bd52cc4b055d", "attr": {"sequence": {"major": 0, "minor": 0}}}' http://10.84.14.2:8082/ref-update - -Note that instead of the ref-uuid, you can also specify ref-fq-name:: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"operation": "ADD", "uuid": "e3a20048-8cc7-4cff-8c3b-ada61eb822ed", "type": "virtual-network", "ref-type": "network-policy", "ref-fq-name": ["default-domain", "default-project", "default-network-policy"], "attr": {"sequence": {"major": 0, "minor": 0}}}' http://10.84.14.2:8082/ref-update - -To delete a reference:: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"operation": "DELETE", "uuid": "e3a20048-8cc7-4cff-8c3b-ada61eb822ed", "type": "virtual-network", "ref-type": "network-policy", "ref-uuid": "7810b656-97d9-4c43-94c7-bd52cc4b055d"}' http://10.84.14.2:8082/ref-update - - diff --git a/src/config/api-server/doc/source/themes/contrail/static/rtd.css_t b/src/config/api-server/doc/source/themes/contrail/static/rtd.css_t deleted file mode 100644 index 17ba22a3910..00000000000 --- a/src/config/api-server/doc/source/themes/contrail/static/rtd.css_t +++ /dev/null @@ -1,1448 +0,0 @@ -/* - * rtd.css - * ~~~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- sphinxdoc theme. Originally created by - * Armin Ronacher for Werkzeug. - * - * Customized for ReadTheDocs by Eric Pierce & Eric Holscher - * - * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* RTD colors - * light blue: #e8ecef - * medium blue: #8ca1af - * dark blue: #465158 - * dark grey: #444444 - * - * white hover: #d1d9df; - * medium blue hover: #697983; - * green highlight: #8ecc4c - * light blue (project bar): #e8ecef - */ - -@import url("basic.css"); - -/* PAGE LAYOUT -------------------------------------------------------------- */ - -body { - font: 100%/1.5 "ff-meta-web-pro-1","ff-meta-web-pro-2",Arial,"Helvetica Neue",sans-serif; - text-align: center; - color: black; - background-color: #465158; - padding: 0; - margin: 0; -} - -div.document { - text-align: left; - background-color: #e8ecef; -} - -div.bodywrapper { - background-color: #ffffff; - border-left: 1px solid #ccc; - border-bottom: 1px solid #ccc; - margin: 0 0 0 30em; -} - -div.body { - margin: 0; - padding: 0.5em 1.3em; - max-width: 55em; - min-width: 20em; -} - -div.related { - font-size: 1em; - background-color: #465158; - position: fixed; -} - -div.documentwrapper { - float: left; - width: 100%; - background-color: #e8ecef; - margin-top: 20px; -} - - -/* HEADINGS --------------------------------------------------------------- */ - -h1 { - margin: 0; - padding: 0.7em 0 0.3em 0; - font-size: 1.5em; - line-height: 1.15; - color: #111; - clear: both; -} - -h2 { - margin: 2em 0 0.2em 0; - font-size: 1.35em; - padding: 0; - color: #465158; -} - -h3 { - margin: 1em 0 -0.3em 0; - font-size: 1.2em; - color: #6c818f; -} - -div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a { - color: black; -} - -h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { - display: none; - margin: 0 0 0 0.3em; - padding: 0 0.2em 0 0.2em; - color: #aaa !important; -} - -h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, -h5:hover a.anchor, h6:hover a.anchor { - display: inline; -} - -h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, -h5 a.anchor:hover, h6 a.anchor:hover { - color: #777; - background-color: #eee; -} - - -/* LINKS ------------------------------------------------------------------ */ - -/* Normal links get a pseudo-underline */ -a { - color: #444; - text-decoration: none; - border-bottom: 1px solid #ccc; -} - -/* Links in sidebar, TOC, index trees and tables have no underline */ -.sphinxsidebar a, -.toctree-wrapper a, -.indextable a, -#indices-and-tables a { - color: #444; - text-decoration: none; - border-bottom: none; -} - -/* Most links get an underline-effect when hovered */ -a:hover, -div.toctree-wrapper a:hover, -.indextable a:hover, -#indices-and-tables a:hover { - color: #111; - text-decoration: none; - border-bottom: 1px solid #111; -} - -/* Footer links */ -div.footer a { - color: #86989B; - text-decoration: none; - border: none; -} -div.footer a:hover { - color: #a6b8bb; - text-decoration: underline; - border: none; -} - -/* Permalink anchor (subtle grey with a red hover) */ -div.body a.headerlink { - color: #ccc; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none; - border: none; -} -div.body a.headerlink:hover { - color: #c60f0f; - border: none; -} - - -/* NAVIGATION BAR --------------------------------------------------------- */ - -div.related ul { - height: 2.5em; -} - -div.related ul li { - margin: 0; - padding: 0.65em 0; - float: left; - display: block; - color: white; /* For the >> separators */ - font-size: 0.8em; -} - -div.related ul li.right { - float: right; - margin-right: 5px; - color: transparent; /* Hide the | separators */ -} - -/* "Breadcrumb" links in nav bar */ -div.related ul li a { - order: none; - background-color: inherit; - font-weight: bold; - margin: 6px 0 6px 4px; - line-height: 1.75em; - color: #ffffff; - padding: 0.4em 0.8em; - border: none; - border-radius: 3px; -} -/* previous / next / modules / index links look more like buttons */ -div.related ul li.right a { - margin: 0.375em 0; - background-color: #697983; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} -/* All navbar links light up as buttons when hovered */ -div.related ul li a:hover { - background-color: #8ca1af; - color: #ffffff; - text-decoration: none; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} -/* Take extra precautions for tt within links */ -a tt, -div.related ul li a tt { - background: inherit !important; - color: inherit !important; -} - - -/* SIDEBAR ---------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 0; -} - -div.sphinxsidebar { - margin: 0; - margin-left: -100%; - float: left; - top: 3em; - left: 0; - padding: 0 1em; - width: 14em; - font-size: 1em; - text-align: left; - background-color: #e8ecef; -} - -div.sphinxsidebar img { - max-width: 12em; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin: 1.2em 0 0.3em 0; - font-size: 1em; - padding: 0; - color: #222222; - font-family: "ff-meta-web-pro-1", "ff-meta-web-pro-2", "Arial", "Helvetica Neue", sans-serif; -} - -div.sphinxsidebar h3 a { - color: #444444; -} - -div.sphinxsidebar ul, -div.sphinxsidebar p { - margin-top: 0; - padding-left: 0; - line-height: 130%; - background-color: #e8ecef; -} - -/* No bullets for nested lists, but a little extra indentation */ -div.sphinxsidebar ul ul { - list-style-type: none; - margin-left: 1.5em; - padding: 0; -} - -/* A little top/bottom padding to prevent adjacent links' borders - * from overlapping each other */ -div.sphinxsidebar ul li { - padding: 1px 0; -} - -/* A little left-padding to make these align with the ULs */ -div.sphinxsidebar p.topless { - padding-left: 0 0 0 1em; -} - -/* Make these into hidden one-liners */ -div.sphinxsidebar ul li, -div.sphinxsidebar p.topless { - white-space: nowrap; - overflow: hidden; -} -/* ...which become visible when hovered */ -div.sphinxsidebar ul li:hover, -div.sphinxsidebar p.topless:hover { - overflow: visible; -} - -/* Search text box and "Go" button */ -#searchbox { - margin-top: 2em; - margin-bottom: 1em; - background: #ddd; - padding: 0.5em; - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; -} -#searchbox h3 { - margin-top: 0; -} - -/* Make search box and button abut and have a border */ -input, -div.sphinxsidebar input { - border: 1px solid #999; - float: left; -} - -/* Search textbox */ -input[type="text"] { - margin: 0; - padding: 0 3px; - height: 20px; - width: 144px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - -moz-border-radius-topleft: 3px; - -moz-border-radius-bottomleft: 3px; - -webkit-border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; -} -/* Search button */ -input[type="submit"] { - margin: 0 0 0 -1px; /* -1px prevents a double-border with textbox */ - height: 22px; - color: #444; - background-color: #e8ecef; - padding: 1px 4px; - font-weight: bold; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 3px; - -webkit-border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; -} -input[type="submit"]:hover { - color: #ffffff; - background-color: #8ecc4c; -} - -div.sphinxsidebar p.searchtip { - clear: both; - padding: 0.5em 0 0 0; - background: #ddd; - color: #666; - font-size: 0.9em; -} - -/* Sidebar links are unusual */ -div.sphinxsidebar li a, -div.sphinxsidebar p a { - background: #e8ecef; /* In case links overlap main content */ - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border: 1px solid transparent; /* To prevent things jumping around on hover */ - padding: 0 5px 0 5px; -} -div.sphinxsidebar li a:hover, -div.sphinxsidebar p a:hover { - color: #111; - text-decoration: none; - border: 1px solid #888; -} - -/* Tweak any link appearing in a heading */ -div.sphinxsidebar h3 a { -} - - - - -/* OTHER STUFF ------------------------------------------------------------ */ - -cite, code, tt { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.01em; -} - -tt { - background-color: #f2f2f2; - color: #444; -} - -tt.descname, tt.descclassname, tt.xref { - border: 0; -} - -hr { - border: 1px solid #abc; - margin: 2em; -} - -pre, #_fontwidthtest { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - margin: 1em 2em; - font-size: 0.95em; - letter-spacing: 0.015em; - line-height: 120%; - padding: 0.5em; - border: 1px solid #ccc; - background-color: #eee; - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -td.linenos pre { - padding: 0.5em 0; -} - -div.quotebar { - background-color: #f8f8f8; - max-width: 250px; - float: right; - padding: 2px 7px; - border: 1px solid #ccc; -} - -div.topic { - background-color: #f8f8f8; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - - -/* ADMONITIONS AND WARNINGS ------------------------------------------------- */ - -/* Shared by admonitions, warnings and sidebars */ -div.admonition, -div.warning, -div.sidebar { - font-size: 0.9em; - margin: 2em; - padding: 0; - /* - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - */ -} -div.admonition p, -div.warning p, -div.sidebar p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} -div.admonition pre, -div.warning pre, -div.sidebar pre { - margin: 0.4em 1em 0.4em 1em; -} -div.admonition p.admonition-title, -div.warning p.admonition-title, -div.sidebar p.sidebar-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - color: white; - font-weight: bold; - font-size: 1.1em; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); -} -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol, -div.sidebar ul, div.sidebar ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - - -/* Admonitions and sidebars only */ -div.admonition, div.sidebar { - border: 1px solid #609060; - background-color: #e9ffe9; -} -div.admonition p.admonition-title, -div.sidebar p.sidebar-title { - background-color: #70A070; - border-bottom: 1px solid #609060; -} - - -/* Warnings only */ -div.warning { - border: 1px solid #900000; - background-color: #ffe9e9; -} -div.warning p.admonition-title { - background-color: #b04040; - border-bottom: 1px solid #900000; -} - - -/* Sidebars only */ -div.sidebar { - max-width: 200px; -} - - - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid #ccc; - background-color: #DDEAF0; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - -.viewcode-back { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -dl { - margin: 1em 0 2.5em 0; -} - -/* Highlight target when you click an internal link */ -dt:target { - background: #ffe080; -} -/* Don't highlight whole divs */ -div.highlight { - background: transparent; -} -/* But do highlight spans (so search results can be highlighted) */ -span.highlight { - background: #ffe080; -} - -div.footer { - background-color: #465158; - color: #eeeeee; - padding: 0 2em 2em 2em; - clear: both; - font-size: 0.8em; - text-align: center; -} - -p { - margin: 0.8em 0 0.5em 0; -} - -div.section { - padding-top: 20px; -} -.section p img { - margin: 1em 2em; -} - - -/* MOBILE LAYOUT -------------------------------------------------------------- */ - -@media screen and (max-width: 600px) { - - h1, h2, h3, h4, h5 { - position: relative; - } - - ul { - padding-left: 1.25em; - } - - div.bodywrapper a.headerlink, #indices-and-tables h1 a { - color: #e6e6e6; - font-size: 80%; - float: right; - line-height: 1.8; - position: absolute; - right: -0.7em; - visibility: inherit; - } - - div.bodywrapper h1 a.headerlink, #indices-and-tables h1 a { - line-height: 1.5; - } - - pre { - font-size: 0.7em; - overflow: auto; - word-wrap: break-word; - white-space: pre-wrap; - } - - div.related ul { - height: 2.5em; - padding: 0; - text-align: left; - } - - div.related ul li { - clear: both; - color: #465158; - padding: 0.2em 0; - } - - div.related ul li:last-child { - border-bottom: 1px dotted #8ca1af; - padding-bottom: 0.4em; - margin-bottom: 1em; - width: 100%; - } - - div.related ul li a { - color: #465158; - padding-right: 0; - } - - div.related ul li a:hover { - background: inherit; - color: inherit; - } - - div.related ul li.right { - clear: none; - padding: 0.65em 0; - margin-bottom: 0.5em; - } - - div.related ul li.right a { - color: #fff; - padding-right: 0.8em; - } - - div.related ul li.right a:hover { - background-color: #8ca1af; - } - - div.body { - clear: both; - min-width: 0; - word-wrap: break-word; - } - - div.bodywrapper { - margin: 0 0 0 0; - } - - div.sphinxsidebar { - float: none; - margin: 0; - width: auto; - } - - div.sphinxsidebar input[type="text"] { - height: 2em; - line-height: 2em; - width: 70%; - } - - div.sphinxsidebar input[type="submit"] { - height: 2em; - margin-left: 0.5em; - width: 20%; - } - - div.sphinxsidebar p.searchtip { - background: inherit; - margin-bottom: 1em; - } - - div.sphinxsidebar ul li, div.sphinxsidebar p.topless { - white-space: normal; - } - - .bodywrapper img { - display: block; - margin-left: auto; - margin-right: auto; - max-width: 100%; - } - - div.documentwrapper { - float: none; - } - - div.admonition, div.warning, pre, blockquote { - margin-left: 0em; - margin-right: 0em; - } - - .body p img { - margin: 0; - } - - #searchbox { - background: transparent; - } - - .related:not(:first-child) li { - display: none; - } - - .related:not(:first-child) li.right { - display: block; - } - - div.footer { - padding: 1em; - } - - .rtd_doc_footer .badge { - float: none; - margin: 1em auto; - position: static; - } - - .rtd_doc_footer .badge.revsys-inline { - margin-right: auto; - margin-bottom: 2em; - } - - table.indextable { - display: block; - width: auto; - } - - .indextable tr { - display: block; - } - - .indextable td { - display: block; - padding: 0; - width: auto !important; - } - - .indextable td dt { - margin: 1em 0; - } - - ul.search { - margin-left: 0.25em; - } - - ul.search li div.context { - font-size: 90%; - line-height: 1.1; - margin-bottom: 1; - margin-left: 0; - } - -} - -/* Links in sidebar, TOC, index trees and tables have no underline */ -.sphinxsidebar a, -.toctree-wrapper a, -.indextable a, -#indices-and-tables a { - color: {{ theme_dark_gray }}; - text-decoration: none; - border-bottom: none; -} - -/* Most links get an underline-effect when hovered */ -a:hover, -div.toctree-wrapper a:hover, -.indextable a:hover, -#indices-and-tables a:hover { - color: {{ theme_black }}; - text-decoration: none; - border-bottom: 1px solid {{ theme_black }}; -} - -/* Footer links */ -div.footer a { - color: {{ theme_background_text_link }}; - text-decoration: none; - border: none; -} -div.footer a:hover { - color: {{ theme_medium_color_link_hover }}; - text-decoration: underline; - border: none; -} - -/* Permalink anchor (subtle grey with a red hover) */ -div.body a.headerlink { - color: {{ theme_lighter_gray }}; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none; - border: none; -} -div.body a.headerlink:hover { - color: {{ theme_negative_text }}; - border: none; -} - - -/* NAVIGATION BAR --------------------------------------------------------- */ - -div.related ul { - height: 2.5em; -} - -div.related ul li { - margin: 0; - padding: 0.65em 0; - float: left; - display: block; - color: {{ theme_background_link_half }}; /* For the >> separators */ - font-size: 0.8em; -} - -div.related ul li.right { - float: right; - margin-right: 5px; - color: transparent; /* Hide the | separators */ -} - -/* "Breadcrumb" links in nav bar */ -div.related ul li a { - order: none; - background-color: inherit; - font-weight: bold; - margin: 6px 0 6px 4px; - line-height: 1.75em; - color: {{ theme_background_link }}; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); - padding: 0.4em 0.8em; - border: none; - border-radius: 3px; -} -/* previous / next / modules / index links look more like buttons */ -div.related ul li.right a { - margin: 0.375em 0; - background-color: {{ theme_medium_color_hover }}; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} -/* All navbar links light up as buttons when hovered */ -div.related ul li a:hover { - background-color: {{ theme_medium_color }}; - color: {{ theme_white }}; - text-decoration: none; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} -/* Take extra precautions for tt within links */ -a tt, -div.related ul li a tt { - background: inherit !important; - color: inherit !important; -} - - -/* SIDEBAR ---------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 0; - position: fixed; - width: 450px; - top: 50px; - height: calc(100% - 95px); - overflow-y: scroll; -} - -div.sphinxsidebar { - margin: 0; - margin-left: -100%; - float: left; - top: 3em; - left: 0; - padding: 0 1em; - width: 14em; - font-size: 1em; - text-align: left; - background-color: {{ theme_light_color }}; -} - -div.sphinxsidebar img { - max-width: 12em; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin: 1.2em 0 0.3em 0; - font-size: 1em; - padding: 0; - color: {{ theme_gray_2 }}; - font-family: "ff-meta-web-pro-1", "ff-meta-web-pro-2", "Arial", "Helvetica Neue", sans-serif; -} - -div.sphinxsidebar h3 a { - color: {{ theme_grey_color }}; -} - -div.sphinxsidebar ul, -div.sphinxsidebar p { - margin-top: 0; - padding-left: 0; - line-height: 130%; - background-color: {{ theme_light_color }}; -} - -/* No bullets for nested lists, but a little extra indentation */ -div.sphinxsidebar ul ul { - list-style-type: none; - margin-left: 1.5em; - padding: 0; -} - -/* A little top/bottom padding to prevent adjacent links' borders - * from overlapping each other */ -div.sphinxsidebar ul li { - padding: 1px 0; -} - -/* A little left-padding to make these align with the ULs */ -div.sphinxsidebar p.topless { - padding-left: 0 0 0 1em; -} - -/* Make these into hidden one-liners */ -div.sphinxsidebar ul li, -div.sphinxsidebar p.topless { - white-space: nowrap; - overflow: hidden; -} -/* ...which become visible when hovered */ -div.sphinxsidebar ul li:hover, -div.sphinxsidebar p.topless:hover { - overflow: visible; -} - -/* Search text box and "Go" button */ -#searchbox { - margin-top: 2em; - margin-bottom: 1em; - background: {{ theme_dirtier_white }}; - padding: 0.5em; - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; -} -#searchbox h3 { - margin-top: 0; -} - -/* Make search box and button abut and have a border */ -input, -div.sphinxsidebar input { - border: 1px solid {{ theme_gray_9 }}; - float: left; -} - -/* Search textbox */ -input[type="text"] { - margin: 0; - padding: 0 3px; - height: 20px; - width: 144px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - -moz-border-radius-topleft: 3px; - -moz-border-radius-bottomleft: 3px; - -webkit-border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; -} -/* Search button */ -input[type="submit"] { - margin: 0 0 0 -1px; /* -1px prevents a double-border with textbox */ - height: 22px; - color: {{ theme_dark_gray }}; - background-color: {{ theme_light_color }}; - padding: 1px 4px; - font-weight: bold; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 3px; - -webkit-border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; -} -input[type="submit"]:hover { - color: {{ theme_white }}; - background-color: {{ theme_green_highlight }}; -} - -div.sphinxsidebar p.searchtip { - clear: both; - padding: 0.5em 0 0 0; - background: {{ theme_dirtier_white }}; - color: {{ theme_gray }}; - font-size: 0.9em; -} - -/* Sidebar links are unusual */ -div.sphinxsidebar li a, -div.sphinxsidebar p a { - background: {{ theme_light_color }}; /* In case links overlap main content */ - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border: 1px solid transparent; /* To prevent things jumping around on hover */ - padding: 0 5px 0 5px; -} -div.sphinxsidebar li a:hover, -div.sphinxsidebar p a:hover { - color: {{ theme_black }}; - text-decoration: none; - border: 1px solid {{ theme_light_gray }}; -} - -/* Tweak any link appearing in a heading */ -div.sphinxsidebar h3 a { -} - - - - -/* OTHER STUFF ------------------------------------------------------------ */ - -cite, code, tt { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.01em; -} - -tt { - background-color: {{ theme_code_background }}; - color: {{ theme_dark_gray }}; -} - -tt.descname, tt.descclassname, tt.xref { - border: 0; -} - -hr { - border: 1px solid {{ theme_ruler }}; - margin: 2em; -} - -pre, #_fontwidthtest { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - margin: 1em 2em; - font-size: 0.95em; - letter-spacing: 0.015em; - line-height: 120%; - padding: 0.5em; - border: 1px solid {{ theme_lighter_gray }}; - background-color: {{ theme_code_background }}; - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -td.linenos pre { - padding: 0.5em 0; -} - -div.quotebar { - background-color: {{ theme_almost_white }}; - max-width: 250px; - float: right; - padding: 2px 7px; - border: 1px solid {{ theme_lighter_gray }}; -} - -div.topic { - background-color: {{ theme_almost_white }}; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - - -/* ADMONITIONS AND WARNINGS ------------------------------------------------- */ - -/* Shared by admonitions, warnings and sidebars */ -div.admonition, -div.warning, -div.sidebar { - font-size: 0.9em; - margin: 2em; - padding: 0; - /* - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - */ -} -div.admonition p, -div.warning p, -div.sidebar p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} -div.admonition pre, -div.warning pre, -div.sidebar pre { - margin: 0.4em 1em 0.4em 1em; -} -div.admonition p.admonition-title, -div.warning p.admonition-title, -div.sidebar p.sidebar-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - color: white; - font-weight: bold; - font-size: 1.1em; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); -} -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol, -div.sidebar ul, div.sidebar ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - - -/* Admonitions and sidebars only */ -div.admonition, div.sidebar { - border: 1px solid {{ theme_positive_dark }}; - background-color: {{ theme_positive_light }}; -} -div.admonition p.admonition-title, -div.sidebar p.sidebar-title { - background-color: {{ theme_positive_medium }}; - border-bottom: 1px solid {{ theme_positive_dark }}; -} - - -/* Warnings only */ -div.warning { - border: 1px solid {{ theme_negative_dark }}; - background-color: {{ theme_negative_light }}; -} -div.warning p.admonition-title { - background-color: {{ theme_negative_medium }}; - border-bottom: 1px solid {{ theme_negative_dark }}; -} - - -/* Sidebars only */ -div.sidebar { - max-width: 200px; -} - - - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid {{ theme_lighter_gray }}; - background-color: {{ theme_light_medium_color }}; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - -.viewcode-back { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; -} - -div.viewcode-block:target { - background-color: {{ theme_viewcode_bg }}; - border-top: 1px solid {{ theme_viewcode_border }}; - border-bottom: 1px solid {{ theme_viewcode_border }}; -} - -dl { - margin: 1em 0 2.5em 0; -} - -/* Highlight target when you click an internal link */ -dt:target { - background: {{ theme_highlight }}; -} -/* Don't highlight whole divs */ -div.highlight { - background: transparent; -} -/* But do highlight spans (so search results can be highlighted) */ -span.highlight { - background: {{ theme_highlight }}; -} - -div.footer { - background-color: {{ theme_background }}; - color: {{ theme_background_text }}; - padding: 0 2em 2em 2em; - clear: both; - font-size: 0.8em; - text-align: center; -} - -p { - margin: 0.8em 0 0.5em 0; -} - -.section p img { - margin: 1em 2em; -} - - -/* MOBILE LAYOUT -------------------------------------------------------------- */ - -@media screen and (max-width: 600px) { - - h1, h2, h3, h4, h5 { - position: relative; - } - - ul { - padding-left: 1.75em; - } - - div.bodywrapper a.headerlink, #indices-and-tables h1 a { - color: {{ theme_almost_dirty_white }}; - font-size: 80%; - float: right; - line-height: 1.8; - position: absolute; - right: -0.7em; - visibility: inherit; - } - - div.bodywrapper h1 a.headerlink, #indices-and-tables h1 a { - line-height: 1.5; - } - - pre { - font-size: 0.7em; - overflow: auto; - word-wrap: break-word; - white-space: pre-wrap; - } - - div.related ul { - height: 2.5em; - padding: 0; - text-align: left; - } - - div.related ul li { - clear: both; - color: {{ theme_dark_color }}; - padding: 0.2em 0; - } - - div.related ul li:last-child { - border-bottom: 1px dotted {{ theme_medium_color }}; - padding-bottom: 0.4em; - margin-bottom: 1em; - width: 100%; - } - - div.related ul li a { - color: {{ theme_dark_color }}; - padding-right: 0; - } - - div.related ul li a:hover { - background: inherit; - color: inherit; - } - - div.related ul li.right { - clear: none; - padding: 0.65em 0; - margin-bottom: 0.5em; - } - - div.related ul li.right a { - color: {{ theme_white }}; - padding-right: 0.8em; - } - - div.related ul li.right a:hover { - background-color: {{ theme_medium_color }}; - } - - div.body { - clear: both; - min-width: 0; - word-wrap: break-word; - } - - div.bodywrapper { - margin: 0 0 0 0; - } - - div.sphinxsidebar { - float: none; - margin: 0; - width: auto; - } - - div.sphinxsidebar input[type="text"] { - height: 2em; - line-height: 2em; - width: 70%; - } - - div.sphinxsidebar input[type="submit"] { - height: 2em; - margin-left: 0.5em; - width: 20%; - } - - div.sphinxsidebar p.searchtip { - background: inherit; - margin-bottom: 1em; - } - - div.sphinxsidebar ul li, div.sphinxsidebar p.topless { - white-space: normal; - } - - .bodywrapper img { - display: block; - margin-left: auto; - margin-right: auto; - max-width: 100%; - } - - div.documentwrapper { - float: none; - } - - div.admonition, div.warning, pre, blockquote { - margin-left: 0em; - margin-right: 0em; - } - - .body p img { - margin: 0; - } - - #searchbox { - background: transparent; - } - - .related:not(:first-child) li { - display: none; - } - - .related:not(:first-child) li.right { - display: block; - } - - div.footer { - padding: 1em; - } - - .rtd_doc_footer .badge { - float: none; - margin: 1em auto; - position: static; - } - - .rtd_doc_footer .badge.revsys-inline { - margin-right: auto; - margin-bottom: 2em; - } - - table.indextable { - display: block; - width: auto; - } - - .indextable tr { - display: block; - } - - .indextable td { - display: block; - padding: 0; - width: auto !important; - } - - .indextable td dt { - margin: 1em 0; - } - - ul.search { - margin-left: 0.25em; - } - - ul.search li div.context { - font-size: 90%; - line-height: 1.1; - margin-bottom: 1; - margin-left: 0; - } - -} diff --git a/src/config/api-server/doc/source/themes/contrail/theme.conf b/src/config/api-server/doc/source/themes/contrail/theme.conf deleted file mode 100644 index 39fb32e7dd4..00000000000 --- a/src/config/api-server/doc/source/themes/contrail/theme.conf +++ /dev/null @@ -1,64 +0,0 @@ -[theme] -inherit = default -stylesheet = rtd.css -pygment_style = default -show_sphinx = False - -[options] -show_rtd = True - -white = #ffffff -almost_white = #f8f8f8 -barely_white = #f2f2f2 -dirty_white = #eeeeee -almost_dirty_white = #e6e6e6 -dirtier_white = #dddddd -lighter_gray = #cccccc -gray_a = #aaaaaa -gray_9 = #999999 -light_gray = #888888 -gray_7 = #777777 -gray = #666666 -dark_gray = #444444 -gray_2 = #222222 -black = #111111 -light_color = #e8ecef -light_medium_color = #DDEAF0 -medium_color = #8ca1af -medium_color_link = #86989b -medium_color_link_hover = #a6b8bb -dark_color = #465158 - -h1 = #000000 -h2 = #465158 -h3 = #6c818f - -link_color = #444444 -link_color_decoration = #CCCCCC - -medium_color_hover = #697983 -green_highlight = #8ecc4c - - -positive_dark = #609060 -positive_medium = #70a070 -positive_light = #e9ffe9 - -negative_dark = #900000 -negative_medium = #b04040 -negative_light = #ffe9e9 -negative_text = #c60f0f - -ruler = #abc - -viewcode_bg = #f4debf -viewcode_border = #ac9 - -highlight = #ffe080 - - -background = #465158 -background_link = #ffffff -background_link_half = #ffffff -background_text = #eeeeee -background_text_link = #86989b diff --git a/src/config/api-server/doc/source/themes/rtd/static/rtd.css_t b/src/config/api-server/doc/source/themes/rtd/static/rtd.css_t deleted file mode 100644 index 66736c00c58..00000000000 --- a/src/config/api-server/doc/source/themes/rtd/static/rtd.css_t +++ /dev/null @@ -1,1438 +0,0 @@ -/* - * rtd.css - * ~~~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- sphinxdoc theme. Originally created by - * Armin Ronacher for Werkzeug. - * - * Customized for ReadTheDocs by Eric Pierce & Eric Holscher - * - * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* RTD colors - * light blue: #e8ecef - * medium blue: #8ca1af - * dark blue: #465158 - * dark grey: #444444 - * - * white hover: #d1d9df; - * medium blue hover: #697983; - * green highlight: #8ecc4c - * light blue (project bar): #e8ecef - */ - -@import url("basic.css"); - -/* PAGE LAYOUT -------------------------------------------------------------- */ - -body { - font: 100%/1.5 "ff-meta-web-pro-1","ff-meta-web-pro-2",Arial,"Helvetica Neue",sans-serif; - text-align: center; - color: black; - background-color: #465158; - padding: 0; - margin: 0; -} - -div.document { - text-align: left; - background-color: #e8ecef; -} - -div.bodywrapper { - background-color: #ffffff; - border-left: 1px solid #ccc; - border-bottom: 1px solid #ccc; - margin: 0 0 0 16em; -} - -div.body { - margin: 0; - padding: 0.5em 1.3em; - max-width: 55em; - min-width: 20em; -} - -div.related { - font-size: 1em; - background-color: #465158; -} - -div.documentwrapper { - float: left; - width: 100%; - background-color: #e8ecef; -} - - -/* HEADINGS --------------------------------------------------------------- */ - -h1 { - margin: 0; - padding: 0.7em 0 0.3em 0; - font-size: 1.5em; - line-height: 1.15; - color: #111; - clear: both; -} - -h2 { - margin: 2em 0 0.2em 0; - font-size: 1.35em; - padding: 0; - color: #465158; -} - -h3 { - margin: 1em 0 -0.3em 0; - font-size: 1.2em; - color: #6c818f; -} - -div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a { - color: black; -} - -h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { - display: none; - margin: 0 0 0 0.3em; - padding: 0 0.2em 0 0.2em; - color: #aaa !important; -} - -h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, -h5:hover a.anchor, h6:hover a.anchor { - display: inline; -} - -h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, -h5 a.anchor:hover, h6 a.anchor:hover { - color: #777; - background-color: #eee; -} - - -/* LINKS ------------------------------------------------------------------ */ - -/* Normal links get a pseudo-underline */ -a { - color: #444; - text-decoration: none; - border-bottom: 1px solid #ccc; -} - -/* Links in sidebar, TOC, index trees and tables have no underline */ -.sphinxsidebar a, -.toctree-wrapper a, -.indextable a, -#indices-and-tables a { - color: #444; - text-decoration: none; - border-bottom: none; -} - -/* Most links get an underline-effect when hovered */ -a:hover, -div.toctree-wrapper a:hover, -.indextable a:hover, -#indices-and-tables a:hover { - color: #111; - text-decoration: none; - border-bottom: 1px solid #111; -} - -/* Footer links */ -div.footer a { - color: #86989B; - text-decoration: none; - border: none; -} -div.footer a:hover { - color: #a6b8bb; - text-decoration: underline; - border: none; -} - -/* Permalink anchor (subtle grey with a red hover) */ -div.body a.headerlink { - color: #ccc; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none; - border: none; -} -div.body a.headerlink:hover { - color: #c60f0f; - border: none; -} - - -/* NAVIGATION BAR --------------------------------------------------------- */ - -div.related ul { - height: 2.5em; -} - -div.related ul li { - margin: 0; - padding: 0.65em 0; - float: left; - display: block; - color: white; /* For the >> separators */ - font-size: 0.8em; -} - -div.related ul li.right { - float: right; - margin-right: 5px; - color: transparent; /* Hide the | separators */ -} - -/* "Breadcrumb" links in nav bar */ -div.related ul li a { - order: none; - background-color: inherit; - font-weight: bold; - margin: 6px 0 6px 4px; - line-height: 1.75em; - color: #ffffff; - padding: 0.4em 0.8em; - border: none; - border-radius: 3px; -} -/* previous / next / modules / index links look more like buttons */ -div.related ul li.right a { - margin: 0.375em 0; - background-color: #697983; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} -/* All navbar links light up as buttons when hovered */ -div.related ul li a:hover { - background-color: #8ca1af; - color: #ffffff; - text-decoration: none; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} -/* Take extra precautions for tt within links */ -a tt, -div.related ul li a tt { - background: inherit !important; - color: inherit !important; -} - - -/* SIDEBAR ---------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 0; -} - -div.sphinxsidebar { - margin: 0; - margin-left: -100%; - float: left; - top: 3em; - left: 0; - padding: 0 1em; - width: 14em; - font-size: 1em; - text-align: left; - background-color: #e8ecef; -} - -div.sphinxsidebar img { - max-width: 12em; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin: 1.2em 0 0.3em 0; - font-size: 1em; - padding: 0; - color: #222222; - font-family: "ff-meta-web-pro-1", "ff-meta-web-pro-2", "Arial", "Helvetica Neue", sans-serif; -} - -div.sphinxsidebar h3 a { - color: #444444; -} - -div.sphinxsidebar ul, -div.sphinxsidebar p { - margin-top: 0; - padding-left: 0; - line-height: 130%; - background-color: #e8ecef; -} - -/* No bullets for nested lists, but a little extra indentation */ -div.sphinxsidebar ul ul { - list-style-type: none; - margin-left: 1.5em; - padding: 0; -} - -/* A little top/bottom padding to prevent adjacent links' borders - * from overlapping each other */ -div.sphinxsidebar ul li { - padding: 1px 0; -} - -/* A little left-padding to make these align with the ULs */ -div.sphinxsidebar p.topless { - padding-left: 0 0 0 1em; -} - -/* Make these into hidden one-liners */ -div.sphinxsidebar ul li, -div.sphinxsidebar p.topless { - white-space: nowrap; - overflow: hidden; -} -/* ...which become visible when hovered */ -div.sphinxsidebar ul li:hover, -div.sphinxsidebar p.topless:hover { - overflow: visible; -} - -/* Search text box and "Go" button */ -#searchbox { - margin-top: 2em; - margin-bottom: 1em; - background: #ddd; - padding: 0.5em; - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; -} -#searchbox h3 { - margin-top: 0; -} - -/* Make search box and button abut and have a border */ -input, -div.sphinxsidebar input { - border: 1px solid #999; - float: left; -} - -/* Search textbox */ -input[type="text"] { - margin: 0; - padding: 0 3px; - height: 20px; - width: 144px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - -moz-border-radius-topleft: 3px; - -moz-border-radius-bottomleft: 3px; - -webkit-border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; -} -/* Search button */ -input[type="submit"] { - margin: 0 0 0 -1px; /* -1px prevents a double-border with textbox */ - height: 22px; - color: #444; - background-color: #e8ecef; - padding: 1px 4px; - font-weight: bold; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 3px; - -webkit-border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; -} -input[type="submit"]:hover { - color: #ffffff; - background-color: #8ecc4c; -} - -div.sphinxsidebar p.searchtip { - clear: both; - padding: 0.5em 0 0 0; - background: #ddd; - color: #666; - font-size: 0.9em; -} - -/* Sidebar links are unusual */ -div.sphinxsidebar li a, -div.sphinxsidebar p a { - background: #e8ecef; /* In case links overlap main content */ - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border: 1px solid transparent; /* To prevent things jumping around on hover */ - padding: 0 5px 0 5px; -} -div.sphinxsidebar li a:hover, -div.sphinxsidebar p a:hover { - color: #111; - text-decoration: none; - border: 1px solid #888; -} - -/* Tweak any link appearing in a heading */ -div.sphinxsidebar h3 a { -} - - - - -/* OTHER STUFF ------------------------------------------------------------ */ - -cite, code, tt { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.01em; -} - -tt { - background-color: #f2f2f2; - color: #444; -} - -tt.descname, tt.descclassname, tt.xref { - border: 0; -} - -hr { - border: 1px solid #abc; - margin: 2em; -} - -pre, #_fontwidthtest { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - margin: 1em 2em; - font-size: 0.95em; - letter-spacing: 0.015em; - line-height: 120%; - padding: 0.5em; - border: 1px solid #ccc; - background-color: #eee; - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -td.linenos pre { - padding: 0.5em 0; -} - -div.quotebar { - background-color: #f8f8f8; - max-width: 250px; - float: right; - padding: 2px 7px; - border: 1px solid #ccc; -} - -div.topic { - background-color: #f8f8f8; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - - -/* ADMONITIONS AND WARNINGS ------------------------------------------------- */ - -/* Shared by admonitions, warnings and sidebars */ -div.admonition, -div.warning, -div.sidebar { - font-size: 0.9em; - margin: 2em; - padding: 0; - /* - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - */ -} -div.admonition p, -div.warning p, -div.sidebar p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} -div.admonition pre, -div.warning pre, -div.sidebar pre { - margin: 0.4em 1em 0.4em 1em; -} -div.admonition p.admonition-title, -div.warning p.admonition-title, -div.sidebar p.sidebar-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - color: white; - font-weight: bold; - font-size: 1.1em; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); -} -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol, -div.sidebar ul, div.sidebar ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - - -/* Admonitions and sidebars only */ -div.admonition, div.sidebar { - border: 1px solid #609060; - background-color: #e9ffe9; -} -div.admonition p.admonition-title, -div.sidebar p.sidebar-title { - background-color: #70A070; - border-bottom: 1px solid #609060; -} - - -/* Warnings only */ -div.warning { - border: 1px solid #900000; - background-color: #ffe9e9; -} -div.warning p.admonition-title { - background-color: #b04040; - border-bottom: 1px solid #900000; -} - - -/* Sidebars only */ -div.sidebar { - max-width: 200px; -} - - - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid #ccc; - background-color: #DDEAF0; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - -.viewcode-back { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -dl { - margin: 1em 0 2.5em 0; -} - -/* Highlight target when you click an internal link */ -dt:target { - background: #ffe080; -} -/* Don't highlight whole divs */ -div.highlight { - background: transparent; -} -/* But do highlight spans (so search results can be highlighted) */ -span.highlight { - background: #ffe080; -} - -div.footer { - background-color: #465158; - color: #eeeeee; - padding: 0 2em 2em 2em; - clear: both; - font-size: 0.8em; - text-align: center; -} - -p { - margin: 0.8em 0 0.5em 0; -} - -.section p img { - margin: 1em 2em; -} - - -/* MOBILE LAYOUT -------------------------------------------------------------- */ - -@media screen and (max-width: 600px) { - - h1, h2, h3, h4, h5 { - position: relative; - } - - ul { - padding-left: 1.25em; - } - - div.bodywrapper a.headerlink, #indices-and-tables h1 a { - color: #e6e6e6; - font-size: 80%; - float: right; - line-height: 1.8; - position: absolute; - right: -0.7em; - visibility: inherit; - } - - div.bodywrapper h1 a.headerlink, #indices-and-tables h1 a { - line-height: 1.5; - } - - pre { - font-size: 0.7em; - overflow: auto; - word-wrap: break-word; - white-space: pre-wrap; - } - - div.related ul { - height: 2.5em; - padding: 0; - text-align: left; - } - - div.related ul li { - clear: both; - color: #465158; - padding: 0.2em 0; - } - - div.related ul li:last-child { - border-bottom: 1px dotted #8ca1af; - padding-bottom: 0.4em; - margin-bottom: 1em; - width: 100%; - } - - div.related ul li a { - color: #465158; - padding-right: 0; - } - - div.related ul li a:hover { - background: inherit; - color: inherit; - } - - div.related ul li.right { - clear: none; - padding: 0.65em 0; - margin-bottom: 0.5em; - } - - div.related ul li.right a { - color: #fff; - padding-right: 0.8em; - } - - div.related ul li.right a:hover { - background-color: #8ca1af; - } - - div.body { - clear: both; - min-width: 0; - word-wrap: break-word; - } - - div.bodywrapper { - margin: 0 0 0 0; - } - - div.sphinxsidebar { - float: none; - margin: 0; - width: auto; - } - - div.sphinxsidebar input[type="text"] { - height: 2em; - line-height: 2em; - width: 70%; - } - - div.sphinxsidebar input[type="submit"] { - height: 2em; - margin-left: 0.5em; - width: 20%; - } - - div.sphinxsidebar p.searchtip { - background: inherit; - margin-bottom: 1em; - } - - div.sphinxsidebar ul li, div.sphinxsidebar p.topless { - white-space: normal; - } - - .bodywrapper img { - display: block; - margin-left: auto; - margin-right: auto; - max-width: 100%; - } - - div.documentwrapper { - float: none; - } - - div.admonition, div.warning, pre, blockquote { - margin-left: 0em; - margin-right: 0em; - } - - .body p img { - margin: 0; - } - - #searchbox { - background: transparent; - } - - .related:not(:first-child) li { - display: none; - } - - .related:not(:first-child) li.right { - display: block; - } - - div.footer { - padding: 1em; - } - - .rtd_doc_footer .badge { - float: none; - margin: 1em auto; - position: static; - } - - .rtd_doc_footer .badge.revsys-inline { - margin-right: auto; - margin-bottom: 2em; - } - - table.indextable { - display: block; - width: auto; - } - - .indextable tr { - display: block; - } - - .indextable td { - display: block; - padding: 0; - width: auto !important; - } - - .indextable td dt { - margin: 1em 0; - } - - ul.search { - margin-left: 0.25em; - } - - ul.search li div.context { - font-size: 90%; - line-height: 1.1; - margin-bottom: 1; - margin-left: 0; - } - -} - -/* Links in sidebar, TOC, index trees and tables have no underline */ -.sphinxsidebar a, -.toctree-wrapper a, -.indextable a, -#indices-and-tables a { - color: {{ theme_dark_gray }}; - text-decoration: none; - border-bottom: none; -} - -/* Most links get an underline-effect when hovered */ -a:hover, -div.toctree-wrapper a:hover, -.indextable a:hover, -#indices-and-tables a:hover { - color: {{ theme_black }}; - text-decoration: none; - border-bottom: 1px solid {{ theme_black }}; -} - -/* Footer links */ -div.footer a { - color: {{ theme_background_text_link }}; - text-decoration: none; - border: none; -} -div.footer a:hover { - color: {{ theme_medium_color_link_hover }}; - text-decoration: underline; - border: none; -} - -/* Permalink anchor (subtle grey with a red hover) */ -div.body a.headerlink { - color: {{ theme_lighter_gray }}; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none; - border: none; -} -div.body a.headerlink:hover { - color: {{ theme_negative_text }}; - border: none; -} - - -/* NAVIGATION BAR --------------------------------------------------------- */ - -div.related ul { - height: 2.5em; -} - -div.related ul li { - margin: 0; - padding: 0.65em 0; - float: left; - display: block; - color: {{ theme_background_link_half }}; /* For the >> separators */ - font-size: 0.8em; -} - -div.related ul li.right { - float: right; - margin-right: 5px; - color: transparent; /* Hide the | separators */ -} - -/* "Breadcrumb" links in nav bar */ -div.related ul li a { - order: none; - background-color: inherit; - font-weight: bold; - margin: 6px 0 6px 4px; - line-height: 1.75em; - color: {{ theme_background_link }}; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); - padding: 0.4em 0.8em; - border: none; - border-radius: 3px; -} -/* previous / next / modules / index links look more like buttons */ -div.related ul li.right a { - margin: 0.375em 0; - background-color: {{ theme_medium_color_hover }}; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} -/* All navbar links light up as buttons when hovered */ -div.related ul li a:hover { - background-color: {{ theme_medium_color }}; - color: {{ theme_white }}; - text-decoration: none; - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; -} -/* Take extra precautions for tt within links */ -a tt, -div.related ul li a tt { - background: inherit !important; - color: inherit !important; -} - - -/* SIDEBAR ---------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 0; -} - -div.sphinxsidebar { - margin: 0; - margin-left: -100%; - float: left; - top: 3em; - left: 0; - padding: 0 1em; - width: 14em; - font-size: 1em; - text-align: left; - background-color: {{ theme_light_color }}; -} - -div.sphinxsidebar img { - max-width: 12em; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin: 1.2em 0 0.3em 0; - font-size: 1em; - padding: 0; - color: {{ theme_gray_2 }}; - font-family: "ff-meta-web-pro-1", "ff-meta-web-pro-2", "Arial", "Helvetica Neue", sans-serif; -} - -div.sphinxsidebar h3 a { - color: {{ theme_grey_color }}; -} - -div.sphinxsidebar ul, -div.sphinxsidebar p { - margin-top: 0; - padding-left: 0; - line-height: 130%; - background-color: {{ theme_light_color }}; -} - -/* No bullets for nested lists, but a little extra indentation */ -div.sphinxsidebar ul ul { - list-style-type: none; - margin-left: 1.5em; - padding: 0; -} - -/* A little top/bottom padding to prevent adjacent links' borders - * from overlapping each other */ -div.sphinxsidebar ul li { - padding: 1px 0; -} - -/* A little left-padding to make these align with the ULs */ -div.sphinxsidebar p.topless { - padding-left: 0 0 0 1em; -} - -/* Make these into hidden one-liners */ -div.sphinxsidebar ul li, -div.sphinxsidebar p.topless { - white-space: nowrap; - overflow: hidden; -} -/* ...which become visible when hovered */ -div.sphinxsidebar ul li:hover, -div.sphinxsidebar p.topless:hover { - overflow: visible; -} - -/* Search text box and "Go" button */ -#searchbox { - margin-top: 2em; - margin-bottom: 1em; - background: {{ theme_dirtier_white }}; - padding: 0.5em; - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; -} -#searchbox h3 { - margin-top: 0; -} - -/* Make search box and button abut and have a border */ -input, -div.sphinxsidebar input { - border: 1px solid {{ theme_gray_9 }}; - float: left; -} - -/* Search textbox */ -input[type="text"] { - margin: 0; - padding: 0 3px; - height: 20px; - width: 144px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - -moz-border-radius-topleft: 3px; - -moz-border-radius-bottomleft: 3px; - -webkit-border-top-left-radius: 3px; - -webkit-border-bottom-left-radius: 3px; -} -/* Search button */ -input[type="submit"] { - margin: 0 0 0 -1px; /* -1px prevents a double-border with textbox */ - height: 22px; - color: {{ theme_dark_gray }}; - background-color: {{ theme_light_color }}; - padding: 1px 4px; - font-weight: bold; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 3px; - -webkit-border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 3px; -} -input[type="submit"]:hover { - color: {{ theme_white }}; - background-color: {{ theme_green_highlight }}; -} - -div.sphinxsidebar p.searchtip { - clear: both; - padding: 0.5em 0 0 0; - background: {{ theme_dirtier_white }}; - color: {{ theme_gray }}; - font-size: 0.9em; -} - -/* Sidebar links are unusual */ -div.sphinxsidebar li a, -div.sphinxsidebar p a { - background: {{ theme_light_color }}; /* In case links overlap main content */ - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border: 1px solid transparent; /* To prevent things jumping around on hover */ - padding: 0 5px 0 5px; -} -div.sphinxsidebar li a:hover, -div.sphinxsidebar p a:hover { - color: {{ theme_black }}; - text-decoration: none; - border: 1px solid {{ theme_light_gray }}; -} - -/* Tweak any link appearing in a heading */ -div.sphinxsidebar h3 a { -} - - - - -/* OTHER STUFF ------------------------------------------------------------ */ - -cite, code, tt { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.01em; -} - -tt { - background-color: {{ theme_code_background }}; - color: {{ theme_dark_gray }}; -} - -tt.descname, tt.descclassname, tt.xref { - border: 0; -} - -hr { - border: 1px solid {{ theme_ruler }}; - margin: 2em; -} - -pre, #_fontwidthtest { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - margin: 1em 2em; - font-size: 0.95em; - letter-spacing: 0.015em; - line-height: 120%; - padding: 0.5em; - border: 1px solid {{ theme_lighter_gray }}; - background-color: {{ theme_code_background }}; - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -td.linenos pre { - padding: 0.5em 0; -} - -div.quotebar { - background-color: {{ theme_almost_white }}; - max-width: 250px; - float: right; - padding: 2px 7px; - border: 1px solid {{ theme_lighter_gray }}; -} - -div.topic { - background-color: {{ theme_almost_white }}; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - - -/* ADMONITIONS AND WARNINGS ------------------------------------------------- */ - -/* Shared by admonitions, warnings and sidebars */ -div.admonition, -div.warning, -div.sidebar { - font-size: 0.9em; - margin: 2em; - padding: 0; - /* - border-radius: 6px; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - */ -} -div.admonition p, -div.warning p, -div.sidebar p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} -div.admonition pre, -div.warning pre, -div.sidebar pre { - margin: 0.4em 1em 0.4em 1em; -} -div.admonition p.admonition-title, -div.warning p.admonition-title, -div.sidebar p.sidebar-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - color: white; - font-weight: bold; - font-size: 1.1em; - text-shadow: 0 1px rgba(0, 0, 0, 0.5); -} -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol, -div.sidebar ul, div.sidebar ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - - -/* Admonitions and sidebars only */ -div.admonition, div.sidebar { - border: 1px solid {{ theme_positive_dark }}; - background-color: {{ theme_positive_light }}; -} -div.admonition p.admonition-title, -div.sidebar p.sidebar-title { - background-color: {{ theme_positive_medium }}; - border-bottom: 1px solid {{ theme_positive_dark }}; -} - - -/* Warnings only */ -div.warning { - border: 1px solid {{ theme_negative_dark }}; - background-color: {{ theme_negative_light }}; -} -div.warning p.admonition-title { - background-color: {{ theme_negative_medium }}; - border-bottom: 1px solid {{ theme_negative_dark }}; -} - - -/* Sidebars only */ -div.sidebar { - max-width: 200px; -} - - - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid {{ theme_lighter_gray }}; - background-color: {{ theme_light_medium_color }}; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - -.viewcode-back { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; -} - -div.viewcode-block:target { - background-color: {{ theme_viewcode_bg }}; - border-top: 1px solid {{ theme_viewcode_border }}; - border-bottom: 1px solid {{ theme_viewcode_border }}; -} - -dl { - margin: 1em 0 2.5em 0; -} - -/* Highlight target when you click an internal link */ -dt:target { - background: {{ theme_highlight }}; -} -/* Don't highlight whole divs */ -div.highlight { - background: transparent; -} -/* But do highlight spans (so search results can be highlighted) */ -span.highlight { - background: {{ theme_highlight }}; -} - -div.footer { - background-color: {{ theme_background }}; - color: {{ theme_background_text }}; - padding: 0 2em 2em 2em; - clear: both; - font-size: 0.8em; - text-align: center; -} - -p { - margin: 0.8em 0 0.5em 0; -} - -.section p img { - margin: 1em 2em; -} - - -/* MOBILE LAYOUT -------------------------------------------------------------- */ - -@media screen and (max-width: 600px) { - - h1, h2, h3, h4, h5 { - position: relative; - } - - ul { - padding-left: 1.75em; - } - - div.bodywrapper a.headerlink, #indices-and-tables h1 a { - color: {{ theme_almost_dirty_white }}; - font-size: 80%; - float: right; - line-height: 1.8; - position: absolute; - right: -0.7em; - visibility: inherit; - } - - div.bodywrapper h1 a.headerlink, #indices-and-tables h1 a { - line-height: 1.5; - } - - pre { - font-size: 0.7em; - overflow: auto; - word-wrap: break-word; - white-space: pre-wrap; - } - - div.related ul { - height: 2.5em; - padding: 0; - text-align: left; - } - - div.related ul li { - clear: both; - color: {{ theme_dark_color }}; - padding: 0.2em 0; - } - - div.related ul li:last-child { - border-bottom: 1px dotted {{ theme_medium_color }}; - padding-bottom: 0.4em; - margin-bottom: 1em; - width: 100%; - } - - div.related ul li a { - color: {{ theme_dark_color }}; - padding-right: 0; - } - - div.related ul li a:hover { - background: inherit; - color: inherit; - } - - div.related ul li.right { - clear: none; - padding: 0.65em 0; - margin-bottom: 0.5em; - } - - div.related ul li.right a { - color: {{ theme_white }}; - padding-right: 0.8em; - } - - div.related ul li.right a:hover { - background-color: {{ theme_medium_color }}; - } - - div.body { - clear: both; - min-width: 0; - word-wrap: break-word; - } - - div.bodywrapper { - margin: 0 0 0 0; - } - - div.sphinxsidebar { - float: none; - margin: 0; - width: auto; - } - - div.sphinxsidebar input[type="text"] { - height: 2em; - line-height: 2em; - width: 70%; - } - - div.sphinxsidebar input[type="submit"] { - height: 2em; - margin-left: 0.5em; - width: 20%; - } - - div.sphinxsidebar p.searchtip { - background: inherit; - margin-bottom: 1em; - } - - div.sphinxsidebar ul li, div.sphinxsidebar p.topless { - white-space: normal; - } - - .bodywrapper img { - display: block; - margin-left: auto; - margin-right: auto; - max-width: 100%; - } - - div.documentwrapper { - float: none; - } - - div.admonition, div.warning, pre, blockquote { - margin-left: 0em; - margin-right: 0em; - } - - .body p img { - margin: 0; - } - - #searchbox { - background: transparent; - } - - .related:not(:first-child) li { - display: none; - } - - .related:not(:first-child) li.right { - display: block; - } - - div.footer { - padding: 1em; - } - - .rtd_doc_footer .badge { - float: none; - margin: 1em auto; - position: static; - } - - .rtd_doc_footer .badge.revsys-inline { - margin-right: auto; - margin-bottom: 2em; - } - - table.indextable { - display: block; - width: auto; - } - - .indextable tr { - display: block; - } - - .indextable td { - display: block; - padding: 0; - width: auto !important; - } - - .indextable td dt { - margin: 1em 0; - } - - ul.search { - margin-left: 0.25em; - } - - ul.search li div.context { - font-size: 90%; - line-height: 1.1; - margin-bottom: 1; - margin-left: 0; - } - -} diff --git a/src/config/api-server/doc/source/themes/rtd/theme.conf b/src/config/api-server/doc/source/themes/rtd/theme.conf deleted file mode 100644 index 39fb32e7dd4..00000000000 --- a/src/config/api-server/doc/source/themes/rtd/theme.conf +++ /dev/null @@ -1,64 +0,0 @@ -[theme] -inherit = default -stylesheet = rtd.css -pygment_style = default -show_sphinx = False - -[options] -show_rtd = True - -white = #ffffff -almost_white = #f8f8f8 -barely_white = #f2f2f2 -dirty_white = #eeeeee -almost_dirty_white = #e6e6e6 -dirtier_white = #dddddd -lighter_gray = #cccccc -gray_a = #aaaaaa -gray_9 = #999999 -light_gray = #888888 -gray_7 = #777777 -gray = #666666 -dark_gray = #444444 -gray_2 = #222222 -black = #111111 -light_color = #e8ecef -light_medium_color = #DDEAF0 -medium_color = #8ca1af -medium_color_link = #86989b -medium_color_link_hover = #a6b8bb -dark_color = #465158 - -h1 = #000000 -h2 = #465158 -h3 = #6c818f - -link_color = #444444 -link_color_decoration = #CCCCCC - -medium_color_hover = #697983 -green_highlight = #8ecc4c - - -positive_dark = #609060 -positive_medium = #70a070 -positive_light = #e9ffe9 - -negative_dark = #900000 -negative_medium = #b04040 -negative_light = #ffe9e9 -negative_text = #c60f0f - -ruler = #abc - -viewcode_bg = #f4debf -viewcode_border = #ac9 - -highlight = #ffe080 - - -background = #465158 -background_link = #ffffff -background_link_half = #ffffff -background_text = #eeeeee -background_text_link = #86989b diff --git a/src/config/api-server/doc/source/tutorial_with_library.rst b/src/config/api-server/doc/source/tutorial_with_library.rst deleted file mode 100644 index 07639ebf2dd..00000000000 --- a/src/config/api-server/doc/source/tutorial_with_library.rst +++ /dev/null @@ -1,97 +0,0 @@ -Library API Tutorial -==================== -This tutorial will detail the steps necessary to create couple of virtual-networks -and associate a policy on them such that only http traffic can pass. The next section -generalizes the examples mentioned in this tutorial. - -Initialize the library ----------------------- -A single import of the vnc_api module from vnc_api package is sufficient to -interact with the configuration API server. - - >>> from vnc_api import vnc_api - >>> vnc_lib = vnc_api.VncApi(api_server_host='10.84.14.2') - -Create virtual-network and network-policy objects -------------------------------------------------- -To create virtual-networks *vn-red* and *vn-blue* and network-policy *policy-red-blue* - - >>> vn_blue_obj = vnc_api.VirtualNetwork('vn-blue') - >>> vn_blue_obj.add_network_ipam(vnc_api.NetworkIpam(), - ... vnc_api.VnSubnetsType([vnc_api.IpamSubnetType(subnet = vnc_api.SubnetType('10.1.1.0', 24))])) - >>> vnc_lib.virtual_network_create(vn_blue_obj) - u'57603abb-0089-4a89-b44b-8ca71d4b7826' - - >>> vn_red_obj = vnc_api.VirtualNetwork('vn-red') - >>> vn_red_obj.add_network_ipam(vnc_api.NetworkIpam(), - ... vnc_api.VnSubnetsType([vnc_api.IpamSubnetType(subnet = vnc_api.SubnetType('20.1.1.0', 24))])) - >>> vnc_lib.virtual_network_create(vn_red_obj) - u'5de3af3e-269f-40be-b0f6-69d6bb962a9f' - - - >>> policy_obj = vnc_api.NetworkPolicy('policy-red-blue', - ... network_policy_entries = vnc_api.PolicyEntriesType([vnc_api.PolicyRuleType(direction='<>', - ... action_list = vnc_api.ActionListType(simple_action='pass'), protocol = 'tcp', - ... src_addresses = [vnc_api.AddressType(virtual_network = vn_blue_obj.get_fq_name_str())], - ... src_ports = [vnc_api.PortType(-1, -1)], - ... dst_addresses = [vnc_api.AddressType(virtual_network = vn_red_obj.get_fq_name_str())], - ... dst_ports = [vnc_api.PortType(80, 80)])])) - >>> vnc_lib.network_policy_create(policy_obj) - u'51388604-c59e-4169-9e0f-39bfcdc603f0' - -Update virtual-networks to use the policy ------------------------------------------ -To associate the *policy-red-blue* with the virtual networks: - - >>> vn_blue_obj.add_network_policy(policy_obj, vnc_api.VirtualNetworkPolicyType( - sequence=vnc_api.SequenceType(0, 0))) - >>> vn_red_obj.add_network_policy(policy_obj, vnc_api.VirtualNetworkPolicyType( - sequence=vnc_api.SequenceType(0, 0))) - >>> vnc_lib.virtual_network_update(vn_blue_obj) - u'{"virtual-network": {"href": "http://10.84.14.2:8082/virtual-network/57603abb-0089-4a89-b44b-8ca71d4b7826", "uuid": "57603abb-0089-4a89-b44b-8ca71d4b7826"}}' - >>> vnc_lib.virtual_network_update(vn_red_obj) - u'{"virtual-network": {"href": "http://10.84.14.2:8082/virtual-network/5de3af3e-269f-40be-b0f6-69d6bb962a9f", "uuid": "5de3af3e-269f-40be-b0f6-69d6bb962a9f"}}' - -Read the objects to verify ------------------------------ -An object can be read by using its uuid returned by create... - - >>> print vnc_lib.virtual_network_read(id = vn_blue_obj.uuid) - -... or by its fully-qualified name. - - >>> print vnc_lib.virtual_network_read(fq_name = ['default-domain', 'default-project', 'vn-blue']) - -List the virtual-networks -------------------------- -A summary collection of objects can be listed by - - >>> print vnc_lib.virtual_networks_list() - -A detailed collection (**Warning** depending on collection size it might -transfer a lot of data) of objects can be listed by - - >>> print vnc_lib.virtual_networks_list(detail=True) - -A subset collection of objects can be listed by - - >>> print vnc_lib.virtual_networks_list( - obj_uuids=['57603abb-0089-4a89-b44b-8ca71d4b7826', - '5de3af3e-269f-40be-b0f6-69d6bb962a9f'], - detail=True) - -A subset collection of objects anchored by a parent can be listed by - - >>> print vnc_lib.virtual_networks_list(parent_id='83a4bea4-ec45-4670-950c-d7f0f98e0e4f') - - -Delete the objects --------------------- -An object can be deleted using its uuid... - - >>> vnc_lib.virtual_network_delete(id = '57603abb-0089-4a89-b44b-8ca71d4b7826') - -... or by its fully-qualified name - - >>> vnc_lib.virtual_network_delete(fq_name = ['default-domain', 'default-project', 'vn-blue']) - diff --git a/src/config/api-server/doc/source/tutorial_with_rest.rst b/src/config/api-server/doc/source/tutorial_with_rest.rst deleted file mode 100644 index 8d894197f8c..00000000000 --- a/src/config/api-server/doc/source/tutorial_with_rest.rst +++ /dev/null @@ -1,108 +0,0 @@ -REST API Tutorial -================= -This tutorial will detail the steps necessary to create couple of virtual-networks -and associate a policy on them such that only http traffic can pass. - -Authentication --------------- - -If the API server is setup to use keystone for authentication (common for -OpenStack deployments), then users must first obtain a token using -keystone command line client or keystone's REST interface. Then, this -token should be sent in the header of the request. If authentication is -disabled, then this auth token is not needed. For more information on how -to obtain a keystone token, check OpenStack documentation( -http://developer.openstack.org/api-guide/quick-start/api-quick-start.html) - -Create virtual-network and network-policy objects -------------------------------------------------- -To create virtual-networks *vn-red* and *vn-blue* and network-policy *policy-red-blue*: - -Request for *vn-blue* create :: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"virtual-network": {"parent_type": "project", "fq_name": ["default-domain", "admin", "vn-blue"], "network_ipam_refs": [{"attr": {"ipam_subnets": [{"subnet": {"ip_prefix": "10.1.1.0", "ip_prefix_len": 24}}]}, "to": ["default-domain", "default-project", "default-network-ipam"]}]}}' http://10.84.14.2:8082/virtual-networks - -Response :: - - {"virtual-network": {"fq_name": ["default-domain", "admin", "vn-blue"], "parent_uuid": "df7649a6-3e2c-4982-b0c3-4b5038eef587", "parent_href": "http://10.84.14.2:8082/project/df7649a6-3e2c-4982-b0c3-4b5038eef587", "uuid": "8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "href": "http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "name": "vn-blue"}} - - -Request for *vn-red* create :: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"virtual-network": {"parent_type": "project", "fq_name": ["default-domain", "admin", "vn-red"], "network_ipam_refs": [{"attr": {"ipam_subnets": [{"subnet": {"ip_prefix": "20.1.1.0", "ip_prefix_len": 24}}]}, "to": ["default-domain", "default-project", "default-network-ipam"]}]}}' http://10.84.14.2:8082/virtual-networks - -Response :: - - {"virtual-network": {"fq_name": ["default-domain", "admin", "vn-red"], "parent_uuid": "df7649a6-3e2c-4982-b0c3-4b5038eef587", "parent_href": "http://10.84.14.2:8082/project/df7649a6-3e2c-4982-b0c3-4b5038eef587", "uuid": "47a91732-629b-4cbe-9aa5-45ba4d7b0e99", "href": "http://10.84.14.2:8082/virtual-network/47a91732-629b-4cbe-9aa5-45ba4d7b0e99", "name": "vn-red"}} - -Request for *policy-red-blue* create :: - - curl -X POST -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"network-policy": {"parent_type": "project", "fq_name": ["default-domain", "admin", "policy-red-blue"], "network_policy_entries": {"policy_rule": [{"direction": "<>", "protocol": "tcp", "dst_addresses": [{"virtual_network": "default-domain:admin:vn-blue"}], "dst_ports": [{"start_port": 80, "end_port": 80}], "action_list": {"simple_action": "pass"}, "src_addresses": [{"virtual_network": "default-domain:admin:vn-red"}], "src_ports": [{"end_port": -1, "start_port": -1}]}] }}}' http://10.84.14.2:8082/network-policys - -Response :: - - {"network-policy": {"fq_name": ["default-domain", "admin", "policy-red-blue"], "parent_uuid": "df7649a6-3e2c-4982-b0c3-4b5038eef587", "parent_href": "http://10.84.14.2:8082/project/df7649a6-3e2c-4982-b0c3-4b5038eef587", "uuid": "f215a3ec-5cbd-4310-91f4-7bbca52b27bd", "href": "http://10.84.14.2:8082/network-policy/f215a3ec-5cbd-4310-91f4-7bbca52b27bd", "name": "policy-red-blue"}} - -Update virtual-networks to use the policy ------------------------------------------ -To associate *policy-red-blue* to *vn-red* and *vn-blue* virtual-networks: - -Request for *vn-blue* update :: - - curl -X PUT -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"virtual-network": {"fq_name": ["default-domain", "admin", "vn-blue"],"network_policy_refs": [{"to": ["default-domain", "admin", "policy-red-blue"], "attr":{"sequence":{"major":0, "minor": 0}}}]}}' http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee - -Response :: - - {"virtual-network": {"href": "http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "uuid": "8c84ff8a-30ac-4136-99d9-f0d9662f3eee"}} - -Request for *vn-red* update :: - - curl -X PUT -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" -d '{"virtual-network": {"fq_name": ["default-domain", "admin", "vn-red"],"network_policy_refs": [{"to": ["default-domain", "admin", "policy-red-blue"], "attr":{"sequence":{"major":0, "minor": 0}}}]}}' http://10.84.14.2:8082/virtual-network/47a91732-629b-4cbe-9aa5-45ba4d7b0e99 - -Response :: - - {"virtual-network": {"href": "http://10.84.14.2:8082/virtual-network/47a91732-629b-4cbe-9aa5-45ba4d7b0e99", "uuid": "47a91732-629b-4cbe-9aa5-45ba4d7b0e99"}} - -Read the objects to verify --------------------------- -Request for *vn-blue* read :: - - curl -X GET -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee - -Response :: - - {"virtual-network": {"virtual_network_properties": {"network_id": 4, "vxlan_network_identifier": null, "extend_to_external_routers": null}, "fq_name": ["default-domain", "admin", "vn-blue"], "uuid": "8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "access_control_lists": [{"to": ["default-domain", "admin", "vn-blue", "vn-blue"], "href": "http://10.84.14.2:8082/access-control-list/24b9c337-7be8-4883-a9a0-60197edf64e4", "uuid": "24b9c337-7be8-4883-a9a0-60197edf64e4"}], "network_policy_refs": [{"to": ["default-domain", "admin", "policy-red-blue"], "href": "http://10.84.14.2:8082/network-policy/f215a3ec-5cbd-4310-91f4-7bbca52b27bd", "attr": {"sequence": {"major": 0, "minor": 0}}, "uuid": "f215a3ec-5cbd-4310-91f4-7bbca52b27bd"}], "parent_uuid": "df7649a6-3e2c-4982-b0c3-4b5038eef587", "parent_href": "http://10.84.14.2:8082/project/df7649a6-3e2c-4982-b0c3-4b5038eef587", "parent_type": "project", "href": "http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "id_perms": {"enable": true, "description": null, "created": "2013-09-13T00:26:05.290644", "uuid": {"uuid_mslong": 10125498831222882614, "uuid_lslong": 11086156774262128366}, "last_modified": "2013-09-13T00:47:41.219833", "permissions": {"owner": "cloud-admin", "owner_access": 7, "other_access": 7, "group": "cloud-admin-group", "group_access": 7}}, "routing_instances": [{"to": ["default-domain", "admin", "vn-blue", "vn-blue"], "href": "http://10.84.14.2:8082/routing-instance/732567fd-8607-4045-b6c0-ff4109d3e0fb", "uuid": "732567fd-8607-4045-b6c0-ff4109d3e0fb"}], "network_ipam_refs": [{"to": ["default-domain", "default-project", "default-network-ipam"], "href": "http://10.84.14.2:8082/network-ipam/a01b486e-2c3e-47df-811c-440e59417ed8", "attr": {"ipam_subnets": [{"subnet": {"ip_prefix": "10.1.1.0", "ip_prefix_len": 24}, "default_gateway": "10.1.1.254"}]}, "uuid": "a01b486e-2c3e-47df-811c-440e59417ed8"}], "name": "vn-blue"}} - -List the virtual-networks -------------------------- -To list the virtual networks: - -Request :: - - curl -X GET -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" http://10.84.14.2:8082/virtual-networks - -Response :: - - {"virtual-networks": [{"href": "http://10.84.14.2:8082/virtual-network/8c84ff8a-30ac-4136-99d9-f0d9662f3eee", "fq_name": ["default-domain", "admin", "vn-blue"], "uuid": "8c84ff8a-30ac-4136-99d9-f0d9662f3eee"}, {"href": "http://10.84.14.2:8082/virtual-network/47a91732-629b-4cbe-9aa5-45ba4d7b0e99", "fq_name": ["default-domain", "admin", "vn-red"], "uuid": "47a91732-629b-4cbe-9aa5-45ba4d7b0e99"}, {"href": "http://10.84.14.2:8082/virtual-network/f423b6c8-deb6-4325-9035-15a8c8bb0a0d", "fq_name": ["default-domain", "default-project", "__link_local__"], "uuid": "f423b6c8-deb6-4325-9035-15a8c8bb0a0d"}, {"href": "http://10.84.14.2:8082/virtual-network/d44a51b0-f2d8-4644-aee0-fe856f970683", "fq_name": ["default-domain", "default-project", "default-virtual-network"], "uuid": "d44a51b0-f2d8-4644-aee0-fe856f970683"}, {"href": "http://10.84.14.2:8082/virtual-network/aad9e80a-8638-449f-a484-5d1bfd58065c", "fq_name": ["default-domain", "default-project", "ip-fabric"], "uuid": "aad9e80a-8638-449f-a484-5d1bfd58065c"}]} - -Request with detail (**WARNING** depending on collection size, this may be inefficient):: - - curl -X GET -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" http://10.84.14.2:8082/virtual-networks?detail=True - -Request subset of virtual-networks with detail :: - - curl -X GET -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" "http://10.84.14.2:8082/virtual-networks?obj_uuids=8c84ff8a-30ac-4136-99d9-f0d9662f3eee,47a91732-629b-4cbe-9aa5-45ba4d7b0e99&detail=True" - -Request virtual-networks anchored by a project(parent):: - - curl -X GET -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" "http://10.84.14.2:8082/parent_id=83a4bea4-ec45-4670-950c-d7f0f98e0e4f" - -Delete the objects ------------------- -To delete the virtual-networks and network-policy objects created: - -Request for *vn-red* delete :: - - curl -X DELETE -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json; charset=UTF-8" http://10.84.14.2:8082/virtual-network/47a91732-629b-4cbe-9aa5-45ba4d7b0e99 - -Response *None* diff --git a/src/config/api-server/requirements.txt b/src/config/api-server/requirements.txt index 20d2a052a82..c81d1268b5b 100644 --- a/src/config/api-server/requirements.txt +++ b/src/config/api-server/requirements.txt @@ -1,5 +1,5 @@ cfgm_common -vnc_api +contrail-api-client sandesh sandesh-common gevent<1.3 # removed when kazoo fix released https://github.com/python-zk/kazoo/commit/257b58961f7ddd9db04d6efa070739a1b0404487 diff --git a/src/config/api-server/vnc_cfg_api_server/provision_defaults.py b/src/config/api-server/vnc_cfg_api_server/provision_defaults.py index 2fa8cf1b0fa..75f2b1eea1f 100644 --- a/src/config/api-server/vnc_cfg_api_server/provision_defaults.py +++ b/src/config/api-server/vnc_cfg_api_server/provision_defaults.py @@ -2,7 +2,7 @@ # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # -from gen.resource_xsd import PermType, PermType2, IdPermsType +from vnc_api.gen.resource_xsd import PermType, PermType2, IdPermsType from cfgm_common import * class Defaults(object): diff --git a/src/config/api-server/vnc_cfg_api_server/utils.py b/src/config/api-server/vnc_cfg_api_server/utils.py index 6f036a404fa..7c87abc3749 100644 --- a/src/config/api-server/vnc_cfg_api_server/utils.py +++ b/src/config/api-server/vnc_cfg_api_server/utils.py @@ -7,7 +7,7 @@ import argparse from cfgm_common import jsonutils as json import ConfigParser -import gen.resource_xsd +import vnc_api.gen.resource_xsd import vnc_quota import cfgm_common from pysandesh.sandesh_base import Sandesh, SandeshSystem, SandeshConfig @@ -156,7 +156,7 @@ def parse_args(args_str): cassandraopts.update(dict(config.items('CASSANDRA'))) if 'RDBMS' in config.sections(): rdbmsopts.update(dict(config.items('RDBMS'))) - SandeshConfig.update_options(sandeshopts, config) + SandeshConfig.update_options(sandeshopts, config) # Override with CLI options # Don't surpress add_help here so it will handle -h parser = argparse.ArgumentParser( diff --git a/src/config/api-server/vnc_cfg_api_server/vnc_cfg_api_server.py b/src/config/api-server/vnc_cfg_api_server/vnc_cfg_api_server.py index 2ca26d043f7..d0e2dff9672 100644 --- a/src/config/api-server/vnc_cfg_api_server/vnc_cfg_api_server.py +++ b/src/config/api-server/vnc_cfg_api_server/vnc_cfg_api_server.py @@ -90,15 +90,14 @@ from provision_defaults import Provision from vnc_quota import * -from gen.resource_xsd import * -from gen.resource_common import * -from gen.vnc_api_client_gen import all_resource_type_tuples +from vnc_api.gen.resource_xsd import * +from vnc_api.gen.resource_common import * +from vnc_api.gen.vnc_api_client_gen import all_resource_type_tuples import cfgm_common from cfgm_common.utils import cgitb_hook from cfgm_common.rest import LinkObject, hdr_server_tenant from cfgm_common.exceptions import * from cfgm_common.vnc_extensions import ExtensionManager -import gen.resource_xsd import vnc_addr_mgmt import vnc_auth import vnc_auth_keystone diff --git a/src/config/api-server/vnc_cfg_api_server/vnc_cfg_types.py b/src/config/api-server/vnc_cfg_api_server/vnc_cfg_types.py index b09e8d513ed..f9b4add1161 100644 --- a/src/config/api-server/vnc_cfg_api_server/vnc_cfg_types.py +++ b/src/config/api-server/vnc_cfg_api_server/vnc_cfg_types.py @@ -26,8 +26,8 @@ from context import get_context from context import is_internal_request -from gen.resource_xsd import * -from gen.resource_common import * +from vnc_api.gen.resource_xsd import * +from vnc_api.gen.resource_common import * from netaddr import IPNetwork, IPAddress, IPRange from pprint import pformat from pysandesh.gen_py.sandesh.ttypes import SandeshLevel diff --git a/src/config/api-server/vnc_cfg_api_server/vnc_quota.py b/src/config/api-server/vnc_cfg_api_server/vnc_quota.py index 39d988c61f0..cdb56177c2a 100644 --- a/src/config/api-server/vnc_cfg_api_server/vnc_quota.py +++ b/src/config/api-server/vnc_cfg_api_server/vnc_quota.py @@ -1,5 +1,5 @@ -from gen.resource_xsd import * -from gen.resource_common import * +from vnc_api.gen.resource_xsd import * +from vnc_api.gen.resource_common import * from pprint import pformat import cfgm_common.exceptions diff --git a/src/config/api-server/vnc_cfg_api_server/vnc_rbac.py b/src/config/api-server/vnc_cfg_api_server/vnc_rbac.py index d9a799fd445..fb8e4d06c7b 100644 --- a/src/config/api-server/vnc_cfg_api_server/vnc_rbac.py +++ b/src/config/api-server/vnc_cfg_api_server/vnc_rbac.py @@ -10,7 +10,7 @@ from provision_defaults import * from cfgm_common.exceptions import * from pysandesh.gen_py.sandesh.ttypes import SandeshLevel -from gen.vnc_api_client_gen import all_resource_types +from vnc_api.gen.vnc_api_client_gen import all_resource_types class VncRbac(object): diff --git a/src/config/contrail_issu/test-requirements.txt b/src/config/contrail_issu/test-requirements.txt index ee80841595c..7bce3c2d351 100644 --- a/src/config/contrail_issu/test-requirements.txt +++ b/src/config/contrail_issu/test-requirements.txt @@ -9,9 +9,9 @@ webtest kazoo jsonpickle cfgm_common -vnc_api sandesh sandesh-common +contrail-api-client contrail-api-server ../../../noarch/config/svc-monitor junitxml diff --git a/src/config/device-manager/SConscript b/src/config/device-manager/SConscript index 60cb02dfa03..720330b9b85 100644 --- a/src/config/device-manager/SConscript +++ b/src/config/device-manager/SConscript @@ -73,7 +73,7 @@ for file in local_sources: env.Install("device_manager", "#controller/src/config/device-manager/" + file)) -generateds_rule = env.Install("device_api", "#src/contrail-api-client/api-lib/generatedssuper.py") +generateds_rule = env.Install("device_api", "#src/contrail-api-client/generateds/generatedssuper.py") dm_introspect_pkg = env.SandeshGenPy('dm_introspect.sandesh', 'device_manager/sandesh/', False) diff --git a/src/config/device-manager/test-requirements.txt b/src/config/device-manager/test-requirements.txt index e4044225778..0570b744286 100644 --- a/src/config/device-manager/test-requirements.txt +++ b/src/config/device-manager/test-requirements.txt @@ -9,9 +9,9 @@ kazoo ncclient jsonpickle cfgm_common -vnc_api sandesh sandesh_common +contrail-api-client contrail-api-server schema_transformer junitxml diff --git a/src/config/fabric-ansible/ansible-playbooks/requirements.txt b/src/config/fabric-ansible/ansible-playbooks/requirements.txt index a678d83beac..d5db4ebda07 100644 --- a/src/config/fabric-ansible/ansible-playbooks/requirements.txt +++ b/src/config/fabric-ansible/ansible-playbooks/requirements.txt @@ -1,5 +1,5 @@ cfgm_common -vnc_api +contrail-api-client sandesh sandesh-common psutil>=0.6.0 diff --git a/src/config/fabric-ansible/ansible-playbooks/test-requirements.txt b/src/config/fabric-ansible/ansible-playbooks/test-requirements.txt index 620757d4f2e..35ff3e9c33a 100644 --- a/src/config/fabric-ansible/ansible-playbooks/test-requirements.txt +++ b/src/config/fabric-ansible/ansible-playbooks/test-requirements.txt @@ -5,7 +5,7 @@ coverage pyaml cfgm_common fabric_ansible -vnc_api +contrail-api-client sandesh sandesh_common junitxml diff --git a/src/config/fabric-ansible/requirements.txt b/src/config/fabric-ansible/requirements.txt index 396dcc6843f..ce43708a501 100644 --- a/src/config/fabric-ansible/requirements.txt +++ b/src/config/fabric-ansible/requirements.txt @@ -1,5 +1,5 @@ cfgm_common -vnc_api +contrail-api-client sandesh sandesh-common gevent==1.1a2 diff --git a/src/config/fabric-ansible/test-requirements.txt b/src/config/fabric-ansible/test-requirements.txt index 003c6d23ac7..3bb6455a8ac 100644 --- a/src/config/fabric-ansible/test-requirements.txt +++ b/src/config/fabric-ansible/test-requirements.txt @@ -7,9 +7,9 @@ python-keystoneclient webtest ncclient cfgm_common -vnc_api sandesh sandesh_common +contrail-api-client contrail-api-server junitxml pyOpenSSL diff --git a/src/config/schema-transformer/test-requirements.txt b/src/config/schema-transformer/test-requirements.txt index e35146f65b1..8c579af870c 100644 --- a/src/config/schema-transformer/test-requirements.txt +++ b/src/config/schema-transformer/test-requirements.txt @@ -9,9 +9,9 @@ webtest kazoo jsonpickle cfgm_common -vnc_api sandesh sandesh-common +contrail-api-client contrail-api-server ../../../noarch/config/svc-monitor junitxml diff --git a/src/config/svc-monitor/test-requirements.txt b/src/config/svc-monitor/test-requirements.txt index b56a1f521c9..9ccdc5cae2a 100644 --- a/src/config/svc-monitor/test-requirements.txt +++ b/src/config/svc-monitor/test-requirements.txt @@ -7,7 +7,7 @@ bitarray kombu gevent==1.1a2 cfgm_common -vnc_api sandesh sandesh-common +contrail-api-client contrail-api-server diff --git a/src/config/test/SConscript b/src/config/test/SConscript index 347746b2853..d712ec41eac 100644 --- a/src/config/test/SConscript +++ b/src/config/test/SConscript @@ -26,9 +26,6 @@ env.Depends(local_sources_rules, [local_dirs_rules]) venv = env.setup_venv ('config_test', 'config_test') -vnc_api_pkg = 'api-lib/dist/vnc_api-%s.tar.gz' % (open(File( - '#/controller/src/base/version.info').abspath, 'r').read( - ).strip('\n').strip('\t')) #maintain the order pip_pkgs = ['greenlet==0.4.1', 'gevent==0.13.8', 'eventlet==0.9.17', 'coverage', 'testtools==0.9.21', 'fixtures==0.3.12', 'requests==1.1.0','paramiko==1.11.0', @@ -41,7 +38,7 @@ pip_pkgs = ['greenlet==0.4.1', 'gevent==0.13.8', 'eventlet==0.9.17', 'coverage', Dir(env['TOP']).abspath + '/config/common/dist/cfgm_common-0.1dev.tar.gz', Dir(env['TOP']).abspath + '/config/schema-transformer/dist/schema_transformer-0.1dev.tar.gz', Dir(env['TOP']).abspath + '/config/svc-monitor/dist/svc_monitor-0.1dev.tar.gz', - Dir(env['TOP']).abspath + '/%s' % (vnc_api_pkg), + Dir(env['TOP']).abspath + '/%s' % env.GetVncAPIPkg(), Dir(env['TOP']).abspath + '/sandesh/common/dist/sandesh-common-0.1dev.tar.gz'] build_pkgs = [ @@ -84,13 +81,13 @@ def run_coverage(env, target, source): cdir = Dir(env['TOP']).abspath + '/config' lcov_run = '(cd %s && coverage combine)' % cdir os.system(lcov_run) - + gen_cmd = '(cd %s && coverage report)' % cdir os.system(gen_cmd) genhtml_cmd = '(cd %s && coverage html)' % cdir os.system(genhtml_cmd) - + env['env_venv'] = venv test = env.PyTestSuiteCov('config-test', local_sources) for d in _deps: diff --git a/src/config/vnc_openstack/test-requirements.txt b/src/config/vnc_openstack/test-requirements.txt index 10e3a8607e5..d3cb9baf66a 100644 --- a/src/config/vnc_openstack/test-requirements.txt +++ b/src/config/vnc_openstack/test-requirements.txt @@ -21,7 +21,7 @@ stevedore testscenarios kazoo cfgm_common -vnc_api +contrail-api-client contrail-api-server sandesh sandesh-common diff --git a/src/container/cni/test-requirements.txt b/src/container/cni/test-requirements.txt index 1d4d64e16bb..1861ef518ff 100644 --- a/src/container/cni/test-requirements.txt +++ b/src/container/cni/test-requirements.txt @@ -7,6 +7,6 @@ kombu gevent eventlet cfgm_common -vnc_api +contrail-api-client sandesh sandesh-common diff --git a/src/container/kube-cni/test-requirements.txt b/src/container/kube-cni/test-requirements.txt index 1d4d64e16bb..1861ef518ff 100644 --- a/src/container/kube-cni/test-requirements.txt +++ b/src/container/kube-cni/test-requirements.txt @@ -7,6 +7,6 @@ kombu gevent eventlet cfgm_common -vnc_api +contrail-api-client sandesh sandesh-common diff --git a/src/container/kube-manager/kube_manager/tests/vnc/test_vnc_ingress.py b/src/container/kube-manager/kube_manager/tests/vnc/test_vnc_ingress.py index 0d4bc916872..4634f0e57a0 100644 --- a/src/container/kube-manager/kube_manager/tests/vnc/test_vnc_ingress.py +++ b/src/container/kube-manager/kube_manager/tests/vnc/test_vnc_ingress.py @@ -23,7 +23,7 @@ from kube_manager.vnc.vnc_kubernetes import VncKubernetes from vnc_api.gen.resource_client import VirtualNetwork, FloatingIpPool from vnc_api.gen.resource_xsd import IpamSubnetType, SubnetType, VnSubnetsType -from vnc_cfg_api_server.gen.resource_client import VirtualRouter +from vnc_api.gen.resource_client import VirtualRouter Uuids = namedtuple('Uuids', ['lb_uuid', 'vmi_uuid', diff --git a/src/container/kube-manager/test-requirements.txt b/src/container/kube-manager/test-requirements.txt index 059e611758c..a65b34544c2 100644 --- a/src/container/kube-manager/test-requirements.txt +++ b/src/container/kube-manager/test-requirements.txt @@ -16,7 +16,7 @@ testrepository mock kombu cfgm_common -vnc_api +contrail-api-client contrail-api-server urllib3 bitstring diff --git a/src/container/mesos-manager/test-requirements.txt b/src/container/mesos-manager/test-requirements.txt index 059e611758c..a65b34544c2 100644 --- a/src/container/mesos-manager/test-requirements.txt +++ b/src/container/mesos-manager/test-requirements.txt @@ -16,7 +16,7 @@ testrepository mock kombu cfgm_common -vnc_api +contrail-api-client contrail-api-server urllib3 bitstring diff --git a/src/storage/stats-daemon/SConscript b/src/storage/stats-daemon/SConscript index ba7246fb730..30bd7662cdd 100644 --- a/src/storage/stats-daemon/SConscript +++ b/src/storage/stats-daemon/SConscript @@ -21,11 +21,8 @@ StorageDocFiles = [] StorageDocFiles += env.SandeshGenDoc('storage.sandesh') test_sources = sources -vnc_api_pkg = 'api-lib/dist/vnc_api-%s.tar.gz' % (open(File( - '#/controller/src/base/version.info').abspath, 'r').read( - ).strip('\n').strip('\t')) packages = [ - '%s/%s' % (env['TOP'], vnc_api_pkg), + '%s/%s' % (env['TOP'], env.GetVncAPIPkg()), '%s/config/common/dist/cfgm_common-0.1dev.tar.gz' % env['TOP'], '%s/sandesh/common/dist/sandesh-common-0.1dev.tar.gz' % env['TOP'], '%s/tools/sandesh/library/python/dist/sandesh-0.1dev.tar.gz' % env['TOP'],