Teach Tempest how to count vcpus

If the processor model name contains the "processor" keyword,
get_number_of_vcpus() will report from vcpus count.

This change makes sure get_number_of_vcpus() only matches lines starting with
the "processor" keyword so it doesn't match model name with said keyword.

Change-Id: I79c0e2dd564a1fc69c1c31c425601434a6a07872
Closes-bug: #1525036
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index 025b79f..7fb86d7 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -73,7 +73,7 @@
             return output.split()[1]
 
     def get_number_of_vcpus(self):
-        output = self.exec_command('grep -c processor /proc/cpuinfo')
+        output = self.exec_command('grep -c ^processor /proc/cpuinfo')
         return int(output)
 
     def get_partitions(self):
diff --git a/tempest/tests/common/utils/linux/test_remote_client.py b/tempest/tests/common/utils/linux/test_remote_client.py
index e596aab..99ef1af 100644
--- a/tempest/tests/common/utils/linux/test_remote_client.py
+++ b/tempest/tests/common/utils/linux/test_remote_client.py
@@ -79,7 +79,7 @@
     def test_get_number_of_vcpus(self):
         self.ssh_mock.mock.exec_command.return_value = '16'
         self.assertEqual(self.conn.get_number_of_vcpus(), 16)
-        self._assert_exec_called_with('grep -c processor /proc/cpuinfo')
+        self._assert_exec_called_with('grep -c ^processor /proc/cpuinfo')
 
     def test_get_partitions(self):
         proc_partitions = """major minor  #blocks  name