diff options
author | Bruno Sakoto <bruno.sakoto@bell.ca> | 2021-09-07 18:21:59 -0400 |
---|---|---|
committer | Bruno Sakoto <bruno.sakoto@bell.ca> | 2021-09-10 14:46:26 -0400 |
commit | ff7d57a1f39044ed180b38e474be73e8d81ce6f6 (patch) | |
tree | e7edfbd7a62396e3e9a857c8d1dc0939eeca195d /docs | |
parent | 9d23ab1ec04b0b3d37b18527d38c29612f23ac34 (diff) |
Create preliminary documentation
* Create documentation structure in docs folder
* Move api specification to openapi folder
Issue-ID: CPS-632
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: Iec2f703e0d3fe019f89f48dd135c4f96af65c330
Diffstat (limited to 'docs')
-rw-r--r-- | docs/_static/css/ribbon.css | 63 | ||||
-rw-r--r-- | docs/api/swagger/openapi.yml | 255 | ||||
-rwxr-xr-x | docs/conf.py | 34 | ||||
-rw-r--r-- | docs/conf.yaml | 24 | ||||
-rw-r--r-- | docs/content/apis.rst | 20 | ||||
-rw-r--r-- | docs/content/architecture.rst | 13 | ||||
-rw-r--r-- | docs/content/deployment.rst | 15 | ||||
-rw-r--r-- | docs/content/design.rst | 11 | ||||
-rw-r--r-- | docs/content/modeling.rst | 11 | ||||
-rw-r--r-- | docs/content/overview.rst | 16 | ||||
-rw-r--r-- | docs/content/release-notes.rst | 38 | ||||
-rw-r--r-- | docs/index.rst | 22 | ||||
-rw-r--r-- | docs/tox.ini | 39 |
13 files changed, 306 insertions, 255 deletions
diff --git a/docs/_static/css/ribbon.css b/docs/_static/css/ribbon.css new file mode 100644 index 0000000..6008cb1 --- /dev/null +++ b/docs/_static/css/ribbon.css @@ -0,0 +1,63 @@ +.ribbon { + z-index: 1000; + background-color: #a00; + overflow: hidden; + white-space: nowrap; + position: fixed; + top: 25px; + right: -50px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + -webkit-box-shadow: 0 0 10px #888; + -moz-box-shadow: 0 0 10px #888; + box-shadow: 0 0 10px #888; + +} + +.ribbon a { + border: 1px solid #faa; + color: #fff; + display: block; + font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 1px 0; + padding: 10px 50px; + text-align: center; + text-decoration: none; + text-shadow: 0 0 5px #444; + transition: 0.5s; +} + +.ribbon a:hover { + background: #c11; + color: #fff; +} + + +/* override table width restrictions */ +@media screen and (min-width: 767px) { + + .wy-table-responsive table td, .wy-table-responsive table th { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + } +} + +@media screen and (max-width: 767px) { + .wy-table-responsive table td { + white-space: nowrap; + } +} + +/* fix width of the screen */ + +.wy-nav-content { + max-width: none; +} diff --git a/docs/api/swagger/openapi.yml b/docs/api/swagger/openapi.yml deleted file mode 100644 index 991d807..0000000 --- a/docs/api/swagger/openapi.yml +++ /dev/null @@ -1,255 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (c) 2021 Bell Canada. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# ============LICENSE_END========================================================= - -openapi: 3.0.1 -info: - title: ONAP Open API v3 Configuration Persistence Service - Temporal - description: CPS-Temporal is time-series database for network data - version: 1.0.0 - contact: - name: ONAP - url: 'https://onap.readthedocs.io' - email: onap-discuss@lists.onap.org - license: - name: Apache 2.0 - url: 'http://www.apache.org/licenses/LICENSE-2.0' - x-planned-retirement-date: '202212' - x-component: Modeling -servers: - - url: '/cps-temporal/api' -tags: - - name: cps-temporal-query - description: CPS Temporal Query -paths: - '/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/history': - get: - description: 'Read the data for the specified anchor based on filter criteria provided in query parameters' - tags: - - cps-temporal-query - summary: Get anchor data by name - operationId: getAnchorDataByName - parameters: - - $ref: '#/components/parameters/dataspaceName' - - name: anchor-name - in: path - description: Anchor Name - required: true - schema: - type: string - - $ref: '#/components/parameters/observedTimestampAfter' - - $ref: '#/components/parameters/simplePayloadFilter' - - $ref: '#/components/parameters/pointInTime' - - $ref: '#/components/parameters/pageNumber' - - $ref: '#/components/parameters/pageLimit' - - $ref: '#/components/parameters/sort' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AnchorHistory' - example: - nextRecordsLink: /v1/dataspace/my-dataspace/anchors/my-anchor/history?pageLimit=20&pageNumber=2 - previousRecordsLink: /v1/dataspace/my-dataspace/anchors/my-anchor/history?pageLimit=20&pageNumber=0 - records: - - timestamp: '2021-03-21T00:00:00.000-0000' - dataspace: my-dataspace - schemaSet: my-schema-set - anchor: my-anchor - data: - status: UP - - - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' - '/v1/dataspaces/{dataspace-name}/anchors/history': - get: - description: 'Read anchors data based on filter criteria provided in query parameters' - tags: - - cps-temporal-query - summary: Get anchors data based on filter criteria - operationId: getAnchorsDataByFilter - parameters: - - $ref: '#/components/parameters/dataspaceName' - - name: schema-set-name - in: query - description: Schema-set name - required: true - schema: - type: string - - $ref: '#/components/parameters/observedTimestampAfter' - - $ref: '#/components/parameters/simplePayloadFilter' - - $ref: '#/components/parameters/pointInTime' - - $ref: '#/components/parameters/pageNumber' - - $ref: '#/components/parameters/pageLimit' - - $ref: '#/components/parameters/sort' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AnchorHistory' - example: - nextRecordsLink: /v1/dataspace/my-dataspace/anchors/history?pageLimit=20&pageNumber=2 - previousRecordsLink: /v1/dataspace/my-dataspace/anchors/history?pageLimit=20&pageNumber=0 - records: - - timestamp: '2021-03-21T00:00:00.000-0000' - dataspace: my-dataspace - schemaSet: my-schema-set - anchor: my-anchor - data: - status: UP - - '400': - $ref: '#/components/responses/BadRequest' - '401': - $ref: '#/components/responses/Unauthorized' - '403': - $ref: '#/components/responses/Forbidden' -components: - parameters: - dataspaceName: - name: dataspace-name - in: path - description: Dataspace Name - required: true - schema: - type: string - observedTimestampAfter: - name: observedTimestampAfter - in: query - description: Fetch data with observed timestamp after <br/> Format - 'yyyy-MM-ddTHH:mm:ss.SSSZ' - required: false - schema: - type: string - example: '2021-03-21T00:00:00.000-0000' - simplePayloadFilter: - name: simplePayloadFilter - in: query - description: Payload filter - required: false - schema: - type: string - pointInTime: - name: pointInTime - in: query - description: Consider data modified before <br/> Format - 'yyyy-MM-ddTHH:mm:ss.SSSZ' - required: false - schema: - type: string - example: '2021-03-21T00:00:00.000-0000' - pageLimit: - in: query - name: pageLimit - required: false - schema: - type: integer - minimum: 0 - default: 1000 - description: The numbers of items to return - pageNumber: - name: pageNumber - in: query - description: Page number - required: false - schema: - type: integer - minimum: 0 - default: 0 - sort: - in: query - name: sort - required: false - schema: - type: string - default: observed_timestamp:desc - description: "Sort by timestamp in 'asc' or 'desc' order. Supported values: <br/>observed_timestamp:desc<br/>anchor:asc,observed_timestamp:desc" - responses: - BadRequest: - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorMessage' - Unauthorized: - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorMessage' - Forbidden: - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorMessage' - schemas: - AnchorDetails: - type: object - title: AnchorDetails - properties: - observedTimestamp: - type: string - example: '2021-03-21T00:00:00.000-0000' - dataspace: - type: string - example: 'my-dataspace' - schemaSet: - type: string - example: 'my-schema-set' - anchor: - type: string - example: 'my-anchor' - data: - type: object - example: { "status" : "UP" } - AnchorHistory: - type: object - title: AnchorHistory - properties: - nextRecordsLink: - type: string - example: /v1/dataspace/dataspace-name/anchors/history?pageLimit=20&pageNumber=2 - previousRecordsLink: - type: string - example: /v1/dataspace/dataspace-name/anchors/history?pageLimit=20&pageNumber=0 - records: - type: array - items: - $ref: '#/components/schemas/AnchorDetails' - required: - - records - ErrorMessage: - type: object - title: Error - properties: - status: - type: string - example: 400 - message: - type: string - example: Data could not be fetched - details: - type: string - example: "after parameter should have datetime value in ISO format yyyy-MM-ddTHH:mm:ss.SSSZ" diff --git a/docs/conf.py b/docs/conf.py new file mode 100755 index 0000000..189414d --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,34 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2021 Bell Canada +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +from docs_conf.conf import * + +branch = 'latest' +doc_url = 'https://docs.onap.org/projects' +master_doc = 'index' + +intersphinx_mapping = {} + +linkcheck_ignore = [ + 'http://localhost', +] + +html_last_updated_fmt = '%d-%b-%y %H:%M' + +def setup(app): + app.add_css_file("css/ribbon.css") diff --git a/docs/conf.yaml b/docs/conf.yaml new file mode 100644 index 0000000..8669911 --- /dev/null +++ b/docs/conf.yaml @@ -0,0 +1,24 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2021 Bell Canada +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +--- +project_cfg: onap +project: onap + +# Change this to ReleaseBranchName to modify the header +default-version: latest diff --git a/docs/content/apis.rst b/docs/content/apis.rst new file mode 100644 index 0000000..c483ea1 --- /dev/null +++ b/docs/content/apis.rst @@ -0,0 +1,20 @@ +.. This work is licensed under a +.. Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. +.. Copyright (C) 2021 Bell Canada + +========================= +CPS Temporal Exposed APIs +========================= + +.. warning:: Draft + +* REST API + + * Specification + * Postman Collection + +* Event Schema + + * Json Schema diff --git a/docs/content/architecture.rst b/docs/content/architecture.rst new file mode 100644 index 0000000..18f4cc3 --- /dev/null +++ b/docs/content/architecture.rst @@ -0,0 +1,13 @@ +.. This work is licensed under a +.. Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. +.. Copyright (C) 2021 Bell Canada + +========================= +CPS Temporal Architecture +========================= + +.. warning:: Draft + +* Subsystem and components architecture diff --git a/docs/content/deployment.rst b/docs/content/deployment.rst new file mode 100644 index 0000000..4734b49 --- /dev/null +++ b/docs/content/deployment.rst @@ -0,0 +1,15 @@ +.. This work is licensed under a +.. Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. +.. Copyright (C) 2021 Bell Canada + +======================= +CPS Temporal Deployment +======================= + +.. warning:: Draft + +* Deployment +* Logging +* Monitoring diff --git a/docs/content/design.rst b/docs/content/design.rst new file mode 100644 index 0000000..167d93d --- /dev/null +++ b/docs/content/design.rst @@ -0,0 +1,11 @@ +.. This work is licensed under a +.. Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. +.. Copyright (C) 2021 Bell Canada + +=================== +CPS Temporal Design +=================== + +.. warning:: Draft diff --git a/docs/content/modeling.rst b/docs/content/modeling.rst new file mode 100644 index 0000000..b8bf91e --- /dev/null +++ b/docs/content/modeling.rst @@ -0,0 +1,11 @@ +.. This work is licensed under a +.. Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. +.. Copyright (C) 2021 Bell Canada + +===================== +CPS Temporal Modeling +===================== + +.. warning:: Draft diff --git a/docs/content/overview.rst b/docs/content/overview.rst new file mode 100644 index 0000000..c4a981e --- /dev/null +++ b/docs/content/overview.rst @@ -0,0 +1,16 @@ +.. This work is licensed under a +.. Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. +.. Copyright (C) 2021 Bell Canada + +===================== +CPS Temporal Overview +===================== + +CPS Temporal is a service component belonging to CPS overall system. + +This service is responsible to provide a time oriented perspective for +operational network data. It provides features to store and retrieve sequences +of configurations or states along with the associated times when they occurred +or have been observed. diff --git a/docs/content/release-notes.rst b/docs/content/release-notes.rst new file mode 100644 index 0000000..b7f680c --- /dev/null +++ b/docs/content/release-notes.rst @@ -0,0 +1,38 @@ +.. This work is licensed under a +.. Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. +.. Copyright (C) 2021 Bell Canada + +========================== +CPS Temporal Release Notes +========================== + +This document contains information about CPS Temporal component releases. + +Following releases are available: + +* `1.0.0`_ (Istanbul) + +Istanbul Releases +================= + +1.0.0 +----- + +.. warning:: Draft + +.. table:: + + ===================== ========================================= + **Release Component** CPS Temporal + **Release Name** Istanbul 1.0.0 + **Release Delivery** Docker Image: ``onap/cps-temporal:1.0.0`` + **Release Date** *To be defined* + ===================== ========================================= + +Added +~~~~~ + +* `CPS-369 <https://jira.onap.org/browse/CPS-369>`__ - Feature to store temporal data corresponding to CPS Core data node updates. +* `CPS-370 <https://jira.onap.org/browse/CPS-370>`__ - Feature to query temporal data from REST API. diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..a491bfa --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,22 @@ +.. This work is licensed under a +.. Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. +.. Copyright (C) 2021 Bell Canada + +============ +CPS Temporal +============ + +.. warning:: Draft + +.. toctree:: + :maxdepth: 1 + + content/overview.rst + content/architecture.rst + content/design.rst + content/modeling.rst + content/deployment.rst + content/apis.rst + content/release-notes.rst diff --git a/docs/tox.ini b/docs/tox.ini new file mode 100644 index 0000000..78293e2 --- /dev/null +++ b/docs/tox.ini @@ -0,0 +1,39 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2021 Bell Canada +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +[tox] +minversion = 1.6 +envlist = docs +skipsdist = true + +[testenv:docs] +basepython = python3 +deps = -r{toxinidir}/requirements-docs.txt +commands = + sphinx-build -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html + echo "Generated docs available in {toxinidir}/_build/html" +whitelist_externals = + echo + git + sh + +[testenv:docs-linkcheck] +basepython = python3 +commands = echo "Link Checking not enforced" +whitelist_externals = + echo |