diff options
| author | Stephen Finucane <sfinucan@redhat.com> | 2023-05-08 10:48:54 +0100 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2023-05-10 10:51:30 +0100 |
| commit | 28ffa2bf9f017212da5eb84b0cf74df62e2f5eb9 (patch) | |
| tree | e272d2bd82826a10df7e00855e35c78a27d2b6c9 /openstackclient/compute/v2/hypervisor_stats.py | |
| parent | 5cb16aebcc53033ff1fd785b957eef0b7c9773e2 (diff) | |
| download | python-openstackclient-28ffa2bf9f017212da5eb84b0cf74df62e2f5eb9.tar.gz | |
Blacken openstackclient.compute
Black used with the '-l 79 -S' flags.
A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.
Change-Id: I9af45c062d179ab3dc2a5e969e1c467932753a2b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/compute/v2/hypervisor_stats.py')
| -rw-r--r-- | openstackclient/compute/v2/hypervisor_stats.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/openstackclient/compute/v2/hypervisor_stats.py b/openstackclient/compute/v2/hypervisor_stats.py index cb63a800..63ca71fd 100644 --- a/openstackclient/compute/v2/hypervisor_stats.py +++ b/openstackclient/compute/v2/hypervisor_stats.py @@ -29,11 +29,11 @@ def _get_hypervisor_stat_columns(item): 'memory_free': 'free_ram_mb', 'memory_size': 'memory_mb', 'memory_used': 'memory_mb_used', - } hidden_columns = ['id', 'links', 'location', 'name'] return utils.get_osc_show_columns_for_sdk_resource( - item, column_map, hidden_columns) + item, column_map, hidden_columns + ) class ShowHypervisorStats(command.ShowOne): @@ -41,19 +41,17 @@ class ShowHypervisorStats(command.ShowOne): def take_action(self, parsed_args): # The command is deprecated since it is being dropped in Nova. - self.log.warning( - _("This command is deprecated.") - ) + self.log.warning(_("This command is deprecated.")) compute_client = self.app.client_manager.sdk_connection.compute # We do API request directly cause this deprecated method is not and # will not be supported by OpenStackSDK. response = compute_client.get( - '/os-hypervisors/statistics', - microversion='2.1') + '/os-hypervisors/statistics', microversion='2.1' + ) hypervisor_stats = response.json().get('hypervisor_statistics') display_columns, columns = _get_hypervisor_stat_columns( - hypervisor_stats) - data = utils.get_dict_properties( - hypervisor_stats, columns) + hypervisor_stats + ) + data = utils.get_dict_properties(hypervisor_stats, columns) return (display_columns, data) |
