服务P2商店的服务
p2-store的Python项目详细描述
p2商店
说明
一个简单的web服务,主要用于存储:
- 实验
- 实验环节
- 实验日志
- k8s资源
- 任何其他需要持久性的项目
正在安装依赖项
pip install -r p2_store/requirements.txt
试验
^{pr2}$模块本地安装
make install
构建分发
make dist
放开它
注意:环境中的pypi用户名/密码pypi_USER_NAME/pypi_password
make release
路线
该服务公开以下路由:
实验管理路线:
Method | Path | JSON-encoded Payload | Description |
---|---|---|---|
POST | /store/experiment | {filename, data} | Uploads a new experiment |
DELETE | /store/experiment | {filename} | Deletes an experiment |
GET | /store/experiments | returns the list of all experiments as json | |
GET | /store/experiment/filename | returns the experiment data as json |
实验会话管理路径:
会话对象
^{tb2}$路线:
Method | Path | JSON-encoded Payload | Description |
---|---|---|---|
POST | /store/experiment/session | A session object | Creates a new session record |
GET | /store/experiment/paged_exp_sessions | Returns a dict with keys: | |
- records: a list of exp_sessions | |||
- count : total number of sessions | |||
Input query params: | |||
- offset: number of record to start with | |||
- size : number of sessions to retrieve (default => 10) |
实验日志管理路径:
日志对象
Name | Description |
---|---|
exp_id | Reference to the experiment session this log belongs to (mandatory) |
log_type | Possible values: 1=execution command output log, 2=chaostoolkit.log 3=journal.log (mandatory) |
log_text | The log text (mandatory) |
路线:
Method | Path | JSON-encoded Payload | Description |
---|---|---|---|
POST | /store/experiment/log | A log object | Adds a type of log referencing the experiment id |
GET | /store/experiment/logs?exp_id=<exp_id> | Gets all logs associated with this exp_id |
- 项目
标签: