Implement "get_hostname" in SSH client class

This method will retrieve the remote machine host name first
executing "hostname" command. If that command fails, it will try
to read "/etc/hostname" file.

Change-Id: I2e4de049d77858e5bf11b7d0758c9494099802f7
Closes-Bug: #1903982
diff --git a/neutron_tempest_plugin/scenario/base.py b/neutron_tempest_plugin/scenario/base.py
index c7c5459..6dcc169 100644
--- a/neutron_tempest_plugin/scenario/base.py
+++ b/neutron_tempest_plugin/scenario/base.py
@@ -513,7 +513,7 @@
                     pkey=self.keypair['private_key'],
                     **kwargs)
                 self.assertIn(server['name'],
-                              ssh_client.exec_command('hostname'))
+                              ssh_client.get_hostname())
         except (lib_exc.SSHTimeout, ssh_exc.AuthenticationException) as ssh_e:
             LOG.debug(ssh_e)
             if log_errors: