API v2.46, added 'is_default' field to share types

Added 'is_default' field to share types and share group
types list. 'is_default' field will show Yes if the share type
or share group type is default.

Partial-Bug: #1823078

Change-Id: I923cb2ae90612fb8d5d3af467654a71b83266ffc
This commit is contained in:
haixin 2021-04-05 12:15:50 +08:00 committed by Goutham Pacha Ravi
parent 8b5b9cb83b
commit 957240e778
3 changed files with 10 additions and 1 deletions

View File

@ -28,7 +28,7 @@ from manilaclient import client as manila_client
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
MANILA_UI_USER_AGENT_REPR = "manila_ui_plugin_for_horizon" MANILA_UI_USER_AGENT_REPR = "manila_ui_plugin_for_horizon"
MANILA_VERSION = "2.45" MANILA_VERSION = "2.46"
MANILA_SERVICE_TYPE = "sharev2" MANILA_SERVICE_TYPE = "sharev2"
# API static values # API static values

View File

@ -94,6 +94,10 @@ class ShareTypesTable(tables.DataTable):
description = tables.WrappingColumn( description = tables.WrappingColumn(
"description", verbose_name=_("Description")) "description", verbose_name=_("Description"))
extra_specs = tables.Column("extra_specs", verbose_name=_("Extra specs"), ) extra_specs = tables.Column("extra_specs", verbose_name=_("Extra specs"), )
is_default = tables.Column(
"is_default", verbose_name=_("Is default"),
filters=(lambda d: 'Yes' if d is True else '-', ),
)
visibility = tables.Column( visibility = tables.Column(
"is_public", verbose_name=_("Visibility"), "is_public", verbose_name=_("Visibility"),
filters=(lambda d: 'public' if d is True else 'private', ), filters=(lambda d: 'public' if d is True else 'private', ),

View File

@ -0,0 +1,5 @@
---
features:
- |
Added is_default field to share types list. the Is_default Column will
show 'Yes' if the share type is default share type.