Merge pull request #52647 from rhcs-dashboard/rbd-typing

mgr/dashboard: rbd type status

Reviewed-by: Nizamudeen A <nia@redhat.com>
This commit is contained in:
Nizamudeen A 2023-08-07 09:34:48 +05:30 committed by GitHub
commit e2d71466fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import logging
import math
from datetime import datetime
from functools import partial
from typing import Any, Dict
import cherrypy
import rbd
@ -203,7 +204,7 @@ class RbdStatus(BaseController):
@Endpoint()
@ReadPermission
def status(self):
status = {'available': True, 'message': None}
status: Dict[str, Any] = {'available': True, 'message': None}
if not CephService.get_pool_list('rbd'):
status['available'] = False
status['message'] = 'No Block Pool is available in the cluster. Please click ' \

View File

@ -5,7 +5,7 @@ import logging
import re
from enum import IntEnum
from functools import partial
from typing import NamedTuple, Optional, no_type_check
from typing import Any, Dict, NamedTuple, Optional, no_type_check
import cherrypy
import rbd
@ -642,7 +642,7 @@ class RbdMirroringStatus(BaseController):
@Endpoint()
@ReadPermission
def status(self):
status = {'available': True, 'message': None}
status: Dict[str, Any] = {'available': True, 'message': None}
orch_status = OrchClient.instance().status()
# if the orch is not available we can't create the service