Move SSH key generation from "init" to "deploy" 55/53155/5
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Tue, 6 Mar 2018 09:32:15 +0000 (09:32 +0000)
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Tue, 6 Mar 2018 14:17:46 +0000 (14:17 +0000)
commit0272210284bca74a386cf4ce19c4a4562e941aaf
treea707cc9d7838e81622daeab4080a7a8f9058ff33
parente5dbc64e2893788de4bd79530c1dbeb75095d930
Move SSH key generation from "init" to "deploy"

In [1], the Context SSH key generation was modified; the SSH now has a
name matching the name context (which depends on the given name and
the task ID).

In a test suite, the task ID is the same for all test cases executed
in the same batch. If the context name of different test cases is the
same (there is no impediment, e.g.: "demo", "yardstick"), the SSH key
filename will be the same.

Currently the SSH key generation is done during the initialization
process, at the begining of the test suite executing. If, by
coincidence, two test cases have the same context name, the first
one will remove the SSH key file during the "undeploy" process; then
the second one will rise an exception because the SSH key file is
deleted.

This patch moves the SSH key file generation from the initialization
process to the context deploy process:

  TEST SUITE:
    - init: parse all test cases
    - test case 1:
      - deploy (generate SSH keys)
      - run
      - undeploy (delete SSH keys)
    - test case 2: ...

[1] Id175061d6cfe23a068bb3d12ce176c1f176e8236

JIRA: YARDSTICK-1045

Change-Id: I05dc46db20d2a0cba3092c415ce9b248513406fb
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
yardstick/benchmark/contexts/heat.py
yardstick/tests/unit/benchmark/contexts/test_heat.py