[api] Accept a tick limit in POST /v1/run

オープン 初心者向け
#230 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
api

調査の方向性

まず POST /v1/run のハンドラーと、opencda.py コマンドを組み立てるコードを特定してください。issue にはファイル名もテストも記載されていません。コマンドの起動方法をたどり、その後、実行パラメーターに関する API テストを確認してください。任意の ticks 値が --ticks として opencda.py に渡され、上限に達した実行が SUCCEEDED で終了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Problem or motivation

opencda.py stops after --ticks ticks; without the flag the scenario loop never ends. POST /v1/run always starts opencda.py -t <config> -c --manage-components, so a run started through the API has no tick limit and can only be ended with POST /v1/stop.

Scenario Manager sets the run length in ticks and will start runs through the Runner API. A wall-clock timeout does not replace this: the simulated duration should not depend on how fast the node is.

Proposed solution

Add an optional ticks parameter to POST /v1/run and pass it to opencda.py as --ticks. A run that reaches the limit finishes as SUCCEEDED.

Area

Scenario management

Alternatives considered

Read the limit from the scenario YAML instead of the CLI flag. Then the API needs no new parameter.

主要言語
Python
スター
11
フォーク
11
平均マージ
1日 16時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CAVISE/OpenCDA のほかの issue

CAVISE/OpenCDA の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。