Merge "Add "Is Public" column in volume type list"
This commit is contained in:
commit
2daeb30296
@ -158,11 +158,13 @@ class TestTypeList(TestType):
|
|||||||
|
|
||||||
columns = (
|
columns = (
|
||||||
"ID",
|
"ID",
|
||||||
"Name"
|
"Name",
|
||||||
|
"Is Public",
|
||||||
)
|
)
|
||||||
columns_long = (
|
columns_long = (
|
||||||
"ID",
|
"ID",
|
||||||
"Name",
|
"Name",
|
||||||
|
"Is Public",
|
||||||
"Properties"
|
"Properties"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -171,12 +173,14 @@ class TestTypeList(TestType):
|
|||||||
data.append((
|
data.append((
|
||||||
t.id,
|
t.id,
|
||||||
t.name,
|
t.name,
|
||||||
|
t.is_public,
|
||||||
))
|
))
|
||||||
data_long = []
|
data_long = []
|
||||||
for t in volume_types:
|
for t in volume_types:
|
||||||
data_long.append((
|
data_long.append((
|
||||||
t.id,
|
t.id,
|
||||||
t.name,
|
t.name,
|
||||||
|
t.is_public,
|
||||||
utils.format_dict(t.extra_specs),
|
utils.format_dict(t.extra_specs),
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -165,7 +165,8 @@ class TestTypeList(TestType):
|
|||||||
|
|
||||||
columns = [
|
columns = [
|
||||||
"ID",
|
"ID",
|
||||||
"Name"
|
"Name",
|
||||||
|
"Is Public",
|
||||||
]
|
]
|
||||||
columns_long = columns + [
|
columns_long = columns + [
|
||||||
"Description",
|
"Description",
|
||||||
@ -177,12 +178,14 @@ class TestTypeList(TestType):
|
|||||||
data.append((
|
data.append((
|
||||||
t.id,
|
t.id,
|
||||||
t.name,
|
t.name,
|
||||||
|
t.is_public,
|
||||||
))
|
))
|
||||||
data_long = []
|
data_long = []
|
||||||
for t in volume_types:
|
for t in volume_types:
|
||||||
data_long.append((
|
data_long.append((
|
||||||
t.id,
|
t.id,
|
||||||
t.name,
|
t.name,
|
||||||
|
t.is_public,
|
||||||
t.description,
|
t.description,
|
||||||
utils.format_dict(t.extra_specs),
|
utils.format_dict(t.extra_specs),
|
||||||
))
|
))
|
||||||
|
@ -111,10 +111,10 @@ class ListVolumeType(command.Lister):
|
|||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
if parsed_args.long:
|
if parsed_args.long:
|
||||||
columns = ('ID', 'Name', 'Extra Specs')
|
columns = ('ID', 'Name', 'Is Public', 'Extra Specs')
|
||||||
column_headers = ('ID', 'Name', 'Properties')
|
column_headers = ('ID', 'Name', 'Is Public', 'Properties')
|
||||||
else:
|
else:
|
||||||
columns = ('ID', 'Name')
|
columns = ('ID', 'Name', 'Is Public')
|
||||||
column_headers = columns
|
column_headers = columns
|
||||||
data = self.app.client_manager.volume.volume_types.list()
|
data = self.app.client_manager.volume.volume_types.list()
|
||||||
return (column_headers,
|
return (column_headers,
|
||||||
|
@ -176,10 +176,11 @@ class ListVolumeType(command.Lister):
|
|||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
if parsed_args.long:
|
if parsed_args.long:
|
||||||
columns = ['ID', 'Name', 'Description', 'Extra Specs']
|
columns = ['ID', 'Name', 'Is Public', 'Description', 'Extra Specs']
|
||||||
column_headers = ['ID', 'Name', 'Description', 'Properties']
|
column_headers = [
|
||||||
|
'ID', 'Name', 'Is Public', 'Description', 'Properties']
|
||||||
else:
|
else:
|
||||||
columns = ['ID', 'Name']
|
columns = ['ID', 'Name', 'Is Public']
|
||||||
column_headers = columns
|
column_headers = columns
|
||||||
|
|
||||||
is_public = None
|
is_public = None
|
||||||
|
4
releasenotes/notes/bug-1643861-b17ad5dfcb4304ff.yaml
Normal file
4
releasenotes/notes/bug-1643861-b17ad5dfcb4304ff.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Add ``Is Public`` column to ``volume type list``.
|
||||||
|
[Bug `1643861 <https://bugs.launchpad.net/python-openstackclient/+bug/1643861>`_]
|
Loading…
x
Reference in New Issue
Block a user