Fix sending of restart command to Sensu server 21/38621/1
authorYaron Yogev <yaronyogev@gmail.com>
Wed, 2 Aug 2017 11:02:18 +0000 (14:02 +0300)
committerYaron Yogev <yaronyogev@gmail.com>
Wed, 2 Aug 2017 12:09:20 +0000 (15:09 +0300)
commitffdf764c73ea8d7e5dab94a073ac7b0f079fc19a
tree25388ff23a65b63fecafd574a6db58eb9365463f
parent56f1739be70fd771b6e464024a09f7b0be4bbf5f
Fix sending of restart command to Sensu server

- SshConnection: get_ssh(): handle host == monitoring server -
  if host is the one defined in Monitoring config,
  use the access definitions for the server_ip
- Fix connections management:
  - no need to disinguish between CLI connections and SFTP ones;
  - add get_connection_key();
  - rename the Paramiko SSH client data member --> ssh_client

Change-Id: I9e127774c9287d81d73ce5ba02704d3b7cda6725
Signed-off-by: Yaron Yogev <yaronyogev@gmail.com>
app/monitoring/setup/monitoring_handler.py
app/utils/ssh_connection.py