Update README.md
This commit is contained in:
parent
1bd75987b0
commit
19bff61093
57
README.md
57
README.md
|
@ -16,24 +16,39 @@ Execute following commands on Fuel Master node
|
|||
```
|
||||
|
||||
### API
|
||||
* GET /clusters/git-repos
|
||||
* Returns list of configured git repos for all clusters/environments
|
||||
* Example ```curl -H "X-Auth-Token: $(fuel token)" http://localhost:8000/api/v1/clusters/git-repos```
|
||||
* POST /clusters/git-repos
|
||||
* Create new repo for particular cluster
|
||||
* input data schema:
|
||||
```"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "Cluster",
|
||||
"description": "Serialized Cluster object",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {"type": "number"},
|
||||
"repo_name": {"type": "string"},
|
||||
"env_id": {"type": "number"},
|
||||
"git_url": {"type": "string"},
|
||||
"ref": {"type": "string"},
|
||||
"user_key": {"type": "string"}```
|
||||
* Example ```curl -X POST -H "X-Auth-Token: $(fuel token)" http://localhost:8000/api/v1/clusters/git-repos -d '{"user_key": "", "git_url": "https://github.com/dukov/openstack-configs", "env_id": 5, "ref": "master", "repo_name": "osconf1"}'```
|
||||
* PUT /clusters/(?P<cluster_id>\d+)/git-repos/(?P<obj_id>\d+)
|
||||
* Updates repo with obj_id info for cluster cluster_id
|
||||
* Example: ```curl -X PUT -H 'X-Auth-Token: $(fuel token)' http://localhost:8000/api/v1/clusters/4/git-repos/2 -d '{"ref": "master"}'```
|
||||
Extension supports following REST API calls
|
||||
#### GET /clusters/git-repos
|
||||
Returns list of configured git repos for all clusters/environments
|
||||
Example
|
||||
```
|
||||
curl -H "X-Auth-Token: $(fuel token)" http://localhost:8000/api/v1/clusters/git-repos
|
||||
```
|
||||
|
||||
#### POST /clusters/git-repos
|
||||
Create new repo for particular cluster
|
||||
Input data schema:
|
||||
```
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "Cluster",
|
||||
"description": "Serialized Cluster object",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {"type": "number"},
|
||||
"repo_name": {"type": "string"},
|
||||
"env_id": {"type": "number"},
|
||||
"git_url": {"type": "string"},
|
||||
"ref": {"type": "string"},
|
||||
"user_key": {"type": "string"}
|
||||
```
|
||||
|
||||
Example
|
||||
```
|
||||
curl -X POST -H "X-Auth-Token: $(fuel token)" http://localhost:8000/api/v1/clusters/git-repos -d '{"user_key": "", "git_url": "https://github.com/dukov/openstack-configs", "env_id": 5, "ref": "master", "repo_name": "osconf1"}'
|
||||
```
|
||||
|
||||
#### PUT /clusters/(?P<cluster_id>\d+)/git-repos/(?P<obj_id>\d+)
|
||||
Updates repo with obj_id info for cluster cluster_id
|
||||
Example:
|
||||
```
|
||||
curl -X PUT -H 'X-Auth-Token: $(fuel token)' http://localhost:8000/api/v1/clusters/4/git-repos/2 -d '{"ref": "master"}'
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue