compute: host: expand kwargs in host_set() call
`host_set()` expects `status` and `maintenance_mode` as keyword
arguments, but in `SetHost.take_action()`, it is called without
expanding the keyword arguments.
So it's called as
```
host_set(host, {'status': 'enable'})
```
instead of
```
host_set(host, status='enable')
```
Change-Id: If0b37ac60091161a892bfc694fce31a988f66005
Task: 23023
			
			
This commit is contained in:
		| @@ -97,7 +97,7 @@ class SetHost(command.Command): | ||||
|  | ||||
|         compute_client.api.host_set( | ||||
|             parsed_args.host, | ||||
|             kwargs | ||||
|             **kwargs | ||||
|         ) | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -111,8 +111,7 @@ class TestHostSet(TestHost): | ||||
|         result = self.cmd.take_action(parsed_args) | ||||
|         self.assertIsNone(result) | ||||
|  | ||||
|         body = {} | ||||
|         h_mock.assert_called_with(self.host['host'], body) | ||||
|         h_mock.assert_called_with(self.host['host']) | ||||
|  | ||||
|     def test_host_set(self, h_mock): | ||||
|         h_mock.return_value = self.host | ||||
| @@ -133,8 +132,8 @@ class TestHostSet(TestHost): | ||||
|         result = self.cmd.take_action(parsed_args) | ||||
|         self.assertIsNone(result) | ||||
|  | ||||
|         body = {'status': 'enable', 'maintenance_mode': 'disable'} | ||||
|         h_mock.assert_called_with(self.host['host'], body) | ||||
|         h_mock.assert_called_with(self.host['host'], status='enable', | ||||
|                                   maintenance_mode='disable') | ||||
|  | ||||
|  | ||||
| @mock.patch( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Benoît Knecht
					Benoît Knecht