Skip to content

Commit c47ccb9

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Followup: Reduce LOC in volume v3 service"
2 parents b223156 + f52e888 commit c47ccb9

1 file changed

Lines changed: 10 additions & 19 deletions

File tree

openstackclient/volume/v3/service.py

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,21 @@ class ListService(service_v2.ListService):
2525
def take_action(self, parsed_args):
2626
service_client = self.app.client_manager.volume
2727

28-
if parsed_args.long:
29-
columns = [
30-
"Binary",
31-
"Host",
32-
"Zone",
33-
"Status",
34-
"State",
35-
"Updated At",
36-
"Disabled Reason",
37-
]
38-
else:
39-
columns = [
40-
"Binary",
41-
"Host",
42-
"Zone",
43-
"Status",
44-
"State",
45-
"Updated At",
46-
]
28+
columns = [
29+
"Binary",
30+
"Host",
31+
"Zone",
32+
"Status",
33+
"State",
34+
"Updated At",
35+
]
4736

4837
if service_client.api_version >= api_versions.APIVersion('3.7'):
4938
columns.append("Cluster")
5039
if service_client.api_version >= api_versions.APIVersion('3.49'):
5140
columns.append("Backend State")
41+
if parsed_args.long:
42+
columns.append("Disabled Reason")
5243

5344
data = service_client.services.list(
5445
parsed_args.host, parsed_args.service

0 commit comments

Comments
 (0)