This patch to update api-ref doc to include multi podm info.
Add a new entry point of pod_manager info and add how to Delete, Create, Patch entry point of pod_manager, also show a mockup json example of pod_manager resources for implementation reference. Change-Id: I25c983bdcb379583587db7a8b2b6272ef1b05b95
This commit is contained in:
parent
1706b3cff5
commit
9543933329
@ -14,3 +14,4 @@ This is a reference for the Openstack Valence API
|
||||
.. include:: valence-api-v1-flavors.inc
|
||||
.. include:: valence-api-v1-system.inc
|
||||
.. include:: valence-api-v1-nodes.inc
|
||||
.. include:: valence-api-v1-pods.inc
|
||||
|
31
api-ref/source/mockup/pod-manager-get-response.json
Normal file
31
api-ref/source/mockup/pod-manager-get-response.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"uuid" : "666d7b54-3844-4eb8-938f-458e5ede920f",
|
||||
"name" : "pod-manager-1",
|
||||
"url" : "https://192.168.0.1:8443",
|
||||
"authentication":[
|
||||
{
|
||||
"type":"basic",
|
||||
"auth_items": {
|
||||
"username":"xxxxxxx",
|
||||
"password":"xxxxxxx"
|
||||
}
|
||||
}
|
||||
],
|
||||
"status" : "online",
|
||||
"description": "description of Pod manager",
|
||||
"location": "pod-1",
|
||||
"redfish_link": "/redfish/v1/Chassis/pod-1",
|
||||
"updated_at": "2016-08-25T01:13:16+00:00",
|
||||
"created_at": "2016-08-25T01:13:16+00:00",
|
||||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "https://127.0.0.1/v1/pod_managers/666d7b54-3844-4eb8-938f-458e5ede920f"
|
||||
},
|
||||
{
|
||||
"rel" : "boomark",
|
||||
"href" : "https://127.0.0.1/pod_managers/666d7b54-3844-4eb8-938f-458e5ede920f"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
34
api-ref/source/mockup/pod-managers-list-response.json
Normal file
34
api-ref/source/mockup/pod-managers-list-response.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"pod_managers" : [
|
||||
{
|
||||
"uuid" : "666d7b54-3844-4eb8-938f-458e5ede920f",
|
||||
"name" : "pod-1" ,
|
||||
"status" : "online" ,
|
||||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "https://127.0.0.1/v1/pod_managers/666d7b54-3844-4eb8-938f-458e5ede920f"
|
||||
},
|
||||
{
|
||||
"href" : "https://127.0.0.1/pod_managers/666d7b54-3844-4eb8-938f-458e5ede920f",
|
||||
"rel" : "bookmark"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"uuid" : "0afc92d3-8846-4f48-89b6-c6dd29309331",
|
||||
"name" : "pod-2" ,
|
||||
"status" : "offline" ,
|
||||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
"href" : "https://127.0.0.1/v1/pod_managers/0afc92d3-8846-4f48-89b6-c6dd29309331"
|
||||
},
|
||||
{
|
||||
"href" : "https://127.0.0.1/pod_managers/0afc92d3-8846-4f48-89b6-c6dd29309331",
|
||||
"rel" : "bookmark"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -29,6 +29,12 @@ node_ident:
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
pod_uuid:
|
||||
description: |
|
||||
The UUID of pod manager.
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
system_ident:
|
||||
description: |
|
||||
The UUID or name of Compute System.
|
||||
@ -220,6 +226,43 @@ node_uuid:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
pod_auth_info:
|
||||
description: |
|
||||
Authentication info for Pod manager
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
pod_description:
|
||||
description: |
|
||||
Pod manager description.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
pod_location_id:
|
||||
description: |
|
||||
Pod manager location id string info.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
pod_name:
|
||||
description: |
|
||||
UUID of Pod manager.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
pod_redfish_link:
|
||||
description: |
|
||||
Redfish link of this Pod manager, come from PodM redfish API.
|
||||
Ex: "/redfish/v1/Chassis/pod1"
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
pod_status:
|
||||
description: |
|
||||
Pod manager status
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
pooled_group_id:
|
||||
description: |
|
||||
The group id of pooled resource, resource can only be assigned to composed node while id matched.
|
||||
|
@ -126,6 +126,7 @@ Response
|
||||
- created_at: created_at
|
||||
- updated_at: updated_at
|
||||
- provision_state: node_provision_state
|
||||
- pod_uuid: pod_uuid
|
||||
- links: links
|
||||
|
||||
**Example JSON representation of a Node:**
|
||||
|
100
api-ref/source/valence-api-v1-pods.inc
Normal file
100
api-ref/source/valence-api-v1-pods.inc
Normal file
@ -0,0 +1,100 @@
|
||||
.. -*- rst -*-
|
||||
|
||||
==============
|
||||
Pod managers
|
||||
==============
|
||||
|
||||
Listing, searching of Pod Manager resources is done through the ``/v1/pod_managers``
|
||||
Send feedback to Valence team or [chester.kuo@gmail.com]
|
||||
|
||||
List Pod Manager
|
||||
=================
|
||||
|
||||
.. rest_method:: GET /v1/pod_managers/
|
||||
|
||||
Return a list of Pod Managers.
|
||||
Some filtering is possible by passing in flags with the request.
|
||||
By default, this query will return Pod Managers object with the name, status and uuid.
|
||||
|
||||
Normal response codes: 200
|
||||
Error response codes: badRequest(400), unauthorized(401), forbidden(403)
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- uuid: pod_uuid
|
||||
- name: pod_name
|
||||
- status: pod_status
|
||||
- links: links
|
||||
|
||||
**Example list of Pod Managers:**
|
||||
|
||||
.. literalinclude:: mockup/pod-managers-list-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
List Pod Manager Details
|
||||
========================
|
||||
|
||||
.. rest_method:: GET /v1/pod_managers/{pod_managers_ident}
|
||||
|
||||
Shows details for a Pod Manager.
|
||||
This will return the full representation of the resources
|
||||
|
||||
Normal response codes: 200
|
||||
|
||||
Error response codes: badRequest(400), unauthorized(401), forbidden(403)
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- uuid: pod_uuid
|
||||
- fields: fields
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- uuid: pod_uuid
|
||||
- name: pod_name
|
||||
- auth: pod_auth_info
|
||||
- status: pod_status
|
||||
- description: pod_description
|
||||
- location: pod_location_id
|
||||
- redfish_link : pod_redfish_link
|
||||
- created_at: created_at
|
||||
- updated_at: updated_at
|
||||
- links: links
|
||||
|
||||
**Example JSON representation of a Pod Manager:**
|
||||
|
||||
.. literalinclude:: mockup/pod-manager-get-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Remove Pod Manager
|
||||
==================
|
||||
|
||||
.. rest_method:: DELETE /v1/pod_managers/{pod_manager_ident}
|
||||
|
||||
Remove a Pod manager resource from Valence.
|
||||
|
||||
Normal response codes: 204
|
||||
|
||||
Error response codes: 401,403, 404 ,409
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- pod_uuid: pod_uuid
|
||||
|
Loading…
Reference in New Issue
Block a user