Skip to content

Commit

Permalink
Merge "Generate html documenation from openapi.rst"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Sep 16, 2016
2 parents 3d18e80 + 2059ad8 commit db7b05d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
7 changes: 4 additions & 3 deletions src/config/api-server/doc/SConscript
Expand Up @@ -12,17 +12,18 @@ import shutil

doc_sources_rules = []

generated = ['vnc_cfg_api_server.rst', 'modules.rst']
sphinxapidocs = ['vnc_cfg_api_server.rst', 'modules.rst']
if os.path.exists('/usr/bin/sphinx-apidoc'):
apidoc_rule = env.Command(generated, '', 'SPHINX_APIDOC_OPTIONS="members,show-inheritance" sphinx-apidoc -f -o ' + Dir('.').path + ' ' + Dir('../vnc_cfg_api_server').path + ' ' + Dir('.').path)
apidoc_rule = env.Command(sphinxapidocs, '', 'SPHINX_APIDOC_OPTIONS="members,show-inheritance" sphinx-apidoc -f -o ' + Dir('.').path + ' ' + Dir('../vnc_cfg_api_server').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('#controller/src/schema/*.xsd'))
gendoc_rule = env.Install(Dir('.'), env['TOP'] + '/config/api-server/vnc_cfg_api_server/gen/contrail_openapi.rst')

html_gen_rule = env.Command('contrail-config', ['Makefile', 'conf.py'],
'make -C ' + Dir('.').path + ' html')
env.Depends(html_gen_rule, [apidoc_rule, userdoc_rule, schema_rule])
env.Depends(html_gen_rule, [apidoc_rule, gendoc_rule, userdoc_rule, schema_rule])


doc_sources_rules.append(env.Install("../vnc_cfg_api_server", Dir('.')))
Expand Down
3 changes: 2 additions & 1 deletion src/config/api-server/doc/source/index.rst
Expand Up @@ -36,13 +36,14 @@ This document provides:
* Reference to the package, module and classes involved

.. toctree::
:maxdepth: 5
: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
Expand Down
11 changes: 2 additions & 9 deletions src/config/api-server/vnc_cfg_ifmap.py
Expand Up @@ -18,7 +18,7 @@
import StringIO

import socket
from netaddr import IPNetwork, IPAddress, IPSet
from netaddr import IPNetwork, IPAddress

from cfgm_common.uve.vnc_api.ttypes import *
from cfgm_common import ignore_exceptions
Expand All @@ -37,7 +37,6 @@
from cfgm_common import vnc_greenlets
from cfgm_common import SGID_MIN_ALLOC


import copy
from cfgm_common import jsonutils as json
import uuid
Expand All @@ -50,8 +49,6 @@

import signal, os


#from cfgm_common import vnc_type_conv
from provision_defaults import *
import cfgm_common.imid
from cfgm_common.exceptions import *
Expand All @@ -64,9 +61,6 @@
from sandesh.traces.ttypes import DBRequestTrace, MessageBusNotifyTrace, \
IfmapTrace

import logging
logger = logging.getLogger(__name__)

@ignore_exceptions
def get_trace_id():
try:
Expand Down Expand Up @@ -102,7 +96,6 @@ class VncIfmapClient(object):
# to IfMap.
# * In some properties, not all fields are relevant
# to be publised to IfMap.

# If the property is not relevant at all, define the property
# with None. If it is partially relevant, then define the fn.
# which would handcraft the generated xml for the object.
Expand Down Expand Up @@ -1624,7 +1617,7 @@ def iip_update_subnet_uuid(self, iip_dict):
pfx_len = subnet['subnet']['ip_prefix_len']
cidr = '%s/%s' % (pfx, pfx_len)
if (IPAddress(iip_dict['instance_ip_address']) in
IPSet([cidr])):
IPNetwork(cidr)):
iip_dict['subnet_uuid'] = subnet['subnet_uuid']
self._cassandra_db.object_update('instance-ip',
iip_dict['uuid'],
Expand Down
2 changes: 1 addition & 1 deletion src/schema/ietf-l3vpn-schema.xsd
Expand Up @@ -22,7 +22,7 @@ targetNamespace="http://www.contrailsystems.com/2012/BGP-CONFIG/0">
<xsd:complexType name="ProtocolBgpType">
<xsd:sequence>
<!-- customer autonomous-system -->
<element name="autonomous-system" type="xsd:integer"/>
<xsd:element name="autonomous-system" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>

Expand Down

0 comments on commit db7b05d

Please sign in to comment.