diff --git a/openstack_dashboard/dashboards/admin/networks/tables.py b/openstack_dashboard/dashboards/admin/networks/tables.py index 6251c2b305..5e459f7082 100644 --- a/openstack_dashboard/dashboards/admin/networks/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/tables.py @@ -92,7 +92,7 @@ class NetworksTable(tables.DataTable): status = tables.Column( "status", verbose_name=_("Status"), display_choices=project_tables.STATUS_DISPLAY_CHOICES) - admin_state = tables.Column("is_admin_state_up", + admin_state = tables.Column("admin_state", verbose_name=_("Admin State"), display_choices=DISPLAY_CHOICES) availability_zones = tables.Column(get_availability_zones, diff --git a/openstack_dashboard/dashboards/project/networks/ports/tables.py b/openstack_dashboard/dashboards/project/networks/ports/tables.py index aa62278363..c7a6c9adcb 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/tables.py +++ b/openstack_dashboard/dashboards/project/networks/ports/tables.py @@ -144,7 +144,7 @@ class PortsTable(tables.DataTable): status = tables.Column("status", verbose_name=_("Status"), display_choices=STATUS_DISPLAY_CHOICES) - admin_state = tables.Column("is_admin_state_up", + admin_state = tables.Column("admin_state", verbose_name=_("Admin State"), display_choices=DISPLAY_CHOICES) mac_state = tables.Column("mac_state", empty_value=api.neutron.OFF_STATE, diff --git a/openstack_dashboard/dashboards/project/networks/tables.py b/openstack_dashboard/dashboards/project/networks/tables.py index f6c4fd0755..ebb651cf6f 100644 --- a/openstack_dashboard/dashboards/project/networks/tables.py +++ b/openstack_dashboard/dashboards/project/networks/tables.py @@ -199,7 +199,7 @@ class NetworksTable(tables.DataTable): filters=(filters.yesno, filters.capfirst)) status = tables.Column("status", verbose_name=_("Status"), display_choices=STATUS_DISPLAY_CHOICES) - admin_state = tables.Column("is_admin_state_up", + admin_state = tables.Column("admin_state", verbose_name=_("Admin State"), display_choices=DISPLAY_CHOICES) availability_zones = tables.Column(get_availability_zones, diff --git a/openstack_dashboard/dashboards/project/routers/tables.py b/openstack_dashboard/dashboards/project/routers/tables.py index 96a96416a9..9a697aaa1c 100644 --- a/openstack_dashboard/dashboards/project/routers/tables.py +++ b/openstack_dashboard/dashboards/project/routers/tables.py @@ -192,6 +192,10 @@ def get_availability_zones(router): return _("-") +def get_admin_state(router): + return _("UP") if router.is_admin_state_up else _("DOWN") + + class RoutersFilterAction(tables.FilterAction): name = 'filter_project_routers' filter_type = 'server' @@ -228,7 +232,7 @@ class RoutersTable(tables.DataTable): verbose_name=_("HA mode")) ext_net = tables.Column(get_external_network, verbose_name=_("External Network")) - admin_state = tables.Column("is_admin_state_up", + admin_state = tables.Column(get_admin_state, verbose_name=_("Admin State"), display_choices=ADMIN_STATE_DISPLAY_CHOICES) availability_zones = tables.Column(get_availability_zones, diff --git a/releasenotes/notes/admin-state-variable.yaml b/releasenotes/notes/admin-state-variable.yaml new file mode 100644 index 0000000000..1449a04f99 --- /dev/null +++ b/releasenotes/notes/admin-state-variable.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fix an error, when an "Admin State" status is displayed + as variable (true or false) instead of "UP/DOWN" [:bug: `2099694`]