api-ref for nsd, ns

Change-Id: Iafd840923bd98bd5b07fe12e57d5d7180a5afbca
This commit is contained in:
dharmendra 2017-01-31 02:17:22 +05:30
parent 747012262d
commit b633045120
12 changed files with 637 additions and 0 deletions

View File

@ -17,3 +17,5 @@ NFV Orchestration API v1.0
.. include:: nfps.inc
.. include:: sfcs.inc
.. include:: classifiers.inc
.. include:: nsds.inc
.. include:: nss.inc

183
api-ref/source/v1/nsds.inc Normal file
View File

@ -0,0 +1,183 @@
.. -*- rst -*-
==================================
Network Service Descriptors (NSD)
==================================
Manages Network Service Descriptors.
NSD is a TOSCA template that describes the deployment and behaviour of a
Network Service (NS) using a collection of VNFs. For more information, see
`NSD Usage Guide
<http://docs.openstack.org/developer/tacker/devref/nsd_usage_guide.html>`_.
Create NSD
===========
.. rest_method:: POST /v1.0/nsds
Creates a NSD.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 201
.. rest_status_code:: error status.yaml
- 400
- 401
- 500
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- name: name
- description: description_opt
- attributes: nsd_attributes
Request Example
---------------
.. literalinclude:: samples/nsds/nsds-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- nsd: nsd
- name: name
- id: nsd_id
- tenant_id: tenant_id
- description: description
- created_at: created_at
- updated_at: updated_at
- attributes: nsd_attributes
Response Example
----------------
.. literalinclude:: samples/nsds/nsds-create-response.json
:language: javascript
List NSDs
==========
.. rest_method:: GET /v1.0/nsds
Lists NSDs.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
- 500
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- nsds: nsds
- name: name
- id: nsd_id
- tenant_id: tenant_id
- description: description
- created_at: created_at
- updated_at: updated_at
- attributes: nsd_attributes
Response Example
----------------
.. literalinclude:: samples/nsds/nsds-list-response.json
:language: javascript
Show NSD
=========
.. rest_method:: GET /v1.0/nsds/{nsd_id}
Shows information of a given NSD.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
- 404
- 500
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- nsd_id: nsd_id_path
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- nsds: nsds
- name: name
- id: nsd_id
- tenant_id: tenant_id
- description: description
- created_at: created_at
- updated_at: updated_at
- attributes: nsd_attributes
Response Example
----------------
.. literalinclude:: samples/nsds/nsds-show-response.json
:language: javascript
Delete NSD
===========
.. rest_method:: DELETE /v1.0/nsds/{nsd_id}
Deletes a given NSD.
Only a NSD without any associated NSs can be deleted.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 204
.. rest_status_code:: error status.yaml
- 401
- 404
- 409
- 500
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- nsd_id: nsd_id_path

174
api-ref/source/v1/nss.inc Normal file
View File

@ -0,0 +1,174 @@
.. -*- rst -*-
====================================
Network Services (NSs)
====================================
Manages Network Servicess (NSs) and their resources.
NS resources are instantiations of network services described in the
associated NSD TOSCA template.
Create NS
==========
.. rest_method:: POST /v1.0/nss
Creates a NS.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 201
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
- 500
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- ns: ns
- name: name
- description: description_opt
- nsd_id: nsd_id
- vim_id: vim_id_opt
- tenant_id: tenant_id_opt
- attributes: ns_attributes_opt
Request Example
---------------
.. literalinclude:: samples/nss/nss-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- ns: ns
- name: name
- description: description
- status: ns_status
- id: ns_id
- nsd_id: nsd_id
- vnf_ids: vnf_ids
- tenant_id: tenant_id
- created_at: ns_created_at
- updated_at: ns_updated_at
- mgmt_url: ns_mgmt_url
- vim_id: vim_id
- error_reason: ns_error_reason
- attributes: ns_attributes
Response Example
----------------
.. literalinclude:: samples/nss/nss-create-response.json
:language: javascript
List NSs
=========
.. rest_method:: GET /v1.0/nss
Lists NSs.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
- 500
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- nss: nss
- name: name
- description: description
- status: ns_status
- id: ns_id
- nsd_id: nsd_id
- vnf_ids: vnf_ids
- tenant_id: tenant_id
- created_at: ns_created_at
- updated_at: ns_updated_at
- mgmt_url: ns_mgmt_url
- vim_id: vim_id
- error_reason: ns_error_reason
- attributes: ns_attributes
Response Example
----------------
.. literalinclude:: samples/nss/nss-list-response.json
:language: javascript
Show NS
========
.. rest_method:: GET /v1.0/nss/{ns_id}
Shows information of a given NS.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
- 404
- 500
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- ns_id: ns_id_path
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- ns: ns
- name: name
- description: description
- status: ns_status
- id: ns_id
- nsd_id: nsd_id
- vnf_ids: vnf_ids
- tenant_id: tenant_id
- created_at: ns_created_at
- updated_at: ns_updated_at
- mgmt_url: ns_mgmt_url
- vim_id: vim_id
- error_reason: ns_error_reason
- attributes: ns_attributes
Response Example
----------------
.. literalinclude:: samples/nss/nss-show-response.json
:language: javascript

View File

@ -25,6 +25,18 @@ nfp_id_path:
in: path
required: true
type: string
ns_id_path:
description: |
The UUID of the NS.
in: path
required: true
type: string
nsd_id_path:
description: |
The UUID of the VNFD.
in: path
required: true
type: string
sfc_id_path:
description: |
The UUID of the SFC.
@ -254,6 +266,94 @@ nfps:
in: body
required: true
type: array
ns:
description: |
A ``ns`` object.
in: body
required: true
type: object
ns_attributes:
description: |
NS attributes object.
in: body
required: true
type: object
ns_attributes_opt:
description: |
NS attributes object. This object can contain ``param_values``.
in: body
required: false
type: object
ns_created_at:
description: |
The date and time when the NS was created.
The format is ``YYYY-MM-DD hh:mm:ss.ssssss``.
For example, ``2016-09-23 09:59:27.392759``.
in: body
required: true
type: string
ns_error_reason:
description: |
Reason for NS error, if any.
in: body
required: true
type: string
ns_id:
description: |
The UUID of the NS.
in: body
required: true
type: string
ns_mgmt_url:
description: |
Management URL information for the NS.
in: body
required: true
type: string
ns_status:
description: |
Status of the NS.
in: body
required: true
type: string
ns_updated_at:
description: |
The date and time when the NS was updated.
The format is ``YYYY-MM-DD hh:mm:ss.ssssss``.
For example, ``2016-09-23 09:59:27.392759``.
in: body
required: true
type: string
nsd:
description: |
A ``nsd`` object.
in: body
required: true
type: object
nsd_attributes:
description: |
Attributes necessary for spinning up NS.
in: body
required: true
type: object
nsd_id:
description: |
The UUID of the NSD.
in: body
required: true
type: string
nsds:
description: |
A list of ``nsd`` objects.
in: body
required: true
type: array
nss:
description: |
A list of ``ns`` objects.
in: body
required: true
type: array
service_types:
description: |
A list of service type.
@ -565,6 +665,12 @@ vnf_id:
in: body
required: true
type: string
vnf_ids:
description: |
A list of ``vnf_id`` objects.
in: body
required: true
type: array
vnf_instance_id:
description: |
A UUID information to uniquely identify the instance of VNF.
@ -781,3 +887,4 @@ vnfs:
in: body
required: true
type: array

View File

@ -0,0 +1,60 @@
{
"nsd": {
"tenant_id": "689708956b2d4ae0a27120d3aca6a593",
"name": "sample-nsd",
"description": "Sample nsd",
"attributes": {
"nsd": {
"imports": [
"vnf1",
"vnf2"
],
"tosca_definitions_version": "tosca_simple_profile_for_nfv_1_0_0",
"topology_template": {
"inputs": {
"vl2_name": {
"default": "net0", "type": "string",
"description": "name of VL2 virtuallink"
},
"vl1_name": {
"default": "net_mgmt",
"type": "string",
"description": "name of VL1 virtuallink"
}
},
"node_templates": {
"VL1": {
"type": "tosca.nodes.nfv.VL",
"properties": {
"network_name": {
"get_input": "vl1_name"
},
"vendor": "tacker"
}
},
"VNF1": {
"type": "tosca.nodes.nfv.VNF1",
"requirements": [
{
"virtualLink1": "VL1"
},
{
"virtualLink2": "VL2"
}
]
},
"VL2": {
"type": "tosca.nodes.nfv.VL",
"properties": {
"network_name": {
"get_input": "vl2_name"
},
"vendor": "tacker"
}
}
}
}
}
},
}
}

View File

@ -0,0 +1,14 @@
{
"nsd": {
"name": "nsd1"
"description": "nsd-sample",
"id": "99b2851e-a6a7-4467-9554-0eb50633f012",
"tenant_id": "a81900a92bda40588c52699e1873a92f",
"created_at": "2017-01-30 07:10:29.809127",
"updated_at": null,
"attributes": {
"nsd": "imports: [vnf1, vnf2]\ntopology_template:\n inputs:\n vl1_name: {default: net_mgmt, description: name of VL1 virtuallink, type: string}\n vl2_name: {default: net0, description: name of VL2 virtuallink, type: string}\n node_templates:\n VL1:\n properties:\n network_name: {get_input: vl1_name}\n vendor: tacker\n type: tosca.nodes.nfv.VL\n VL2:\n properties:\n network_name: {get_input: vl2_name}\n vendor: tacker\n type: tosca.nodes.nfv.VL\n VNF1:\n requirements:\n - {virtualLink1: VL1}\n - {virtualLink2: VL2}\n type: tosca.nodes.nfv.VNF1\ntosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0\n"
},
}
}

View File

@ -0,0 +1,16 @@
{
"nsd": [
{
"name": "nsd1"
"description": "nsd-sample",
"id": "99b2851e-a6a7-4467-9554-0eb50633f012",
"tenant_id": "a81900a92bda40588c52699e1873a92f",
"created_at": "2017-01-30 07:10:29.809127",
"updated_at": null,
"attributes": {
"nsd": "imports: [vnf1, vnf2]\ntopology_template:\n inputs:\n vl1_name: {default: net_mgmt, description: name of VL1 virtuallink, type: string}\n vl2_name: {default: net0, description: name of VL2 virtuallink, type: string}\n node_templates:\n VL1:\n properties:\n network_name: {get_input: vl1_name}\n vendor: tacker\n type: tosca.nodes.nfv.VL\n VL2:\n properties:\n network_name: {get_input: vl2_name}\n vendor: tacker\n type: tosca.nodes.nfv.VL\n VNF1:\n requirements:\n - {virtualLink1: VL1}\n - {virtualLink2: VL2}\n type: tosca.nodes.nfv.VNF1\ntosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0\n"
},
}
]
}

View File

@ -0,0 +1,14 @@
{
"nsd": {
"name": "nsd_sample"
"description": "nsd-sample",
"id": "99b2851e-a6a7-5467-9954-0e8a0633f941",
"tenant_id": "a81900a92bda40588c52699e1873a92f",
"created_at": "2017-01-30 07:11:37.807045",
"updated_at": null,
"attributes": {
"nsd": "imports: [vnf1, vnf2]\ntopology_template:\n inputs:\n vl1_name: {default: net_mgmt, description: name of VL1 virtuallink, type: string}\n vl2_name: {default: net0, description: name of VL2 virtuallink, type: string}\n node_templates:\n VL1:\n properties:\n network_name: {get_input: vl1_name}\n vendor: tacker\n type: tosca.nodes.nfv.VL\n VL2:\n properties:\n network_name: {get_input: vl2_name}\n vendor: tacker\n type: tosca.nodes.nfv.VL\n VNF1:\n requirements:\n - {virtualLink1: VL1}\n - {virtualLink2: VL2}\n type: tosca.nodes.nfv.VNF1\ntosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0\n"
},
}
}

View File

@ -0,0 +1,17 @@
{
"ns": {
"name": "ns_test",
"nsd_id": "2e581b27-aa72-4a81-8efd-6c0e58533c9b"
"description:": "sample NS",
"tenant_id": "6673e4d4e13340acb0b847f9ecde613b",
"vnfd_id": "a04b47d1-e8ad-4ef9-8341-eafec398ce02",
"attributes": {
"param_values": {
"nsd": {
"vl2_name": "net0",
"vl1_name": "net_mgmt"
}
}
},
}
}

View File

@ -0,0 +1,16 @@
{
"ns": {
"name": "network_service"
"description": "sample-ns",
"status": "PENDING_CREATE",
"created_at": "2017-01-30 20:23:49.566482",
"tenant_id": "a81900a92bda40588c52699e1873a92f",
"vim_id": "96025dd5-ca16-49f3-9823-958eb04260c4",
"updated_at": null,
"mgmt_urls": null,
"vnf_ids": null,
"error_reason": null,
"nsd_id": "99b2851e-a6a7-4467-9554-0eb50633f012",
"id": "076d8bcb-5ad4-4036-a692-fe488d24f77d",
}
}

View File

@ -0,0 +1,18 @@
{
"ns": [
{
"name": "network_service"
"description": "sample-ns",
"status": "PENDING_CREATE",
"created_at": "2017-01-30 20:23:49.566482",
"tenant_id": "a81900a92bda40588c52699e1873a92f",
"vim_id": "96025dd5-ca16-49f3-9823-958eb04260c4",
"updated_at": null,
"mgmt_urls": null,
"vnf_ids": null,
"error_reason": null,
"nsd_id": "99b2851e-a6a7-4467-9554-0eb50633f012",
"id": "076d8bcb-5ad4-4036-a692-fe488d24f77d",
}
]
}

View File

@ -0,0 +1,16 @@
{
"ns": {
"name": "network_service"
"description": "sample-ns",
"status": "PENDING_CREATE",
"created_at": "2017-01-30 20:23:49.566482",
"tenant_id": "a81900a92bda40588c52699e1873a92f",
"vim_id": "96025dd5-ca16-49f3-9823-958eb04260c4",
"updated_at": null,
"mgmt_urls": null,
"vnf_ids": null,
"error_reason": null,
"nsd_id": "99b2851e-a6a7-4467-9554-0eb50633f012",
"id": "076d8bcb-5ad4-4036-a692-fe488d24f77d",
}
}