telefonicaid / fiware-livedemoapp

fiware-livedemoapp
GNU Affero General Public License v3.0
6 stars 4 forks source link

Improve watchdog script #6

Closed fgalan closed 10 years ago

fgalan commented 10 years ago

Taking into account the following information from Alain's email on 15/Oct/2013 to improve the ld-watchdog.sh script (LOCS section):

To retreive the current scenario simulation status, you can sent the following GET request [wrapped in a script]: scripts/simulation-tool-status.sh

that will return the following response :

<scenarioStatus>
   <selectedScenario>applied scenario name|none</selectedScenario>
  <running>false|true</running>
</scenarioStatus>

For example, after a restart of the Fleet mobile management tool (on demand or after VM reboot), you will obtain :

<scenarioStatus>
   <selectedScenario>none</selectedScenario>
   <running>false </running>
</scenarioStatus>

You can check this return status before initializing the simulation and then set the scenario, the mobile paths and finally start the simulation by relevant PUT requests.

When running your Live Demo simulation in nominal situation, you will obtain :

<scenarioStatus>
   <selectedScenario>LocationGE-LocationQuery</selectedScenario>
   <running>true</running>
</scenarioStatus>
fgalan commented 10 years ago

Fixed in ddbf415400d9e49022cb1f191751793a968190a7