Add type annotations to ironicclient/osc/v1/baremetal_shard.py
Changes: Add type annotations following code conventions. Added file to the migrated files list. Change-Id: Idbd0bfaaab460f9b2429611fe793ba8aeef7ada3 Signed-off-by: Karan Anand <anandkarancompsci@gmail.com>
This commit is contained in:
@@ -11,22 +11,32 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import logging
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
from collections.abc import Iterable, Sequence
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from osc_lib.command import command
|
||||
from osc_lib import utils as oscutils
|
||||
|
||||
from ironicclient.osc import command
|
||||
from ironicclient.v1 import resource_fields as res_fields
|
||||
|
||||
|
||||
class ListBaremetalShard(command.Lister):
|
||||
"""List baremetal shards."""
|
||||
|
||||
log = logging.getLogger(__name__ + ".ListBaremetalShard")
|
||||
log: logging.Logger = logging.getLogger(
|
||||
__name__ + ".ListBaremetalShard")
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
def take_action(
|
||||
self,
|
||||
parsed_args: argparse.Namespace,
|
||||
) -> tuple[Sequence[str], Iterable[Any]]:
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
client = self.app.client_manager.baremetal
|
||||
manager = self.app.client_manager
|
||||
client = manager.baremetal
|
||||
|
||||
data = client.shard.list()
|
||||
columns = res_fields.SHARD_RESOURCE.fields
|
||||
|
||||
@@ -40,4 +40,5 @@ files = [
|
||||
"ironicclient/shell.py",
|
||||
"ironicclient/__init__.py",
|
||||
"ironicclient/osc/plugin.py",
|
||||
"ironicclient/osc/v1/baremetal_shard.py",
|
||||
]
|
||||
Reference in New Issue
Block a user