-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glance task-list
cmd programming (개발 완료)
#18
Comments
glance task-list
cmd programmingglance task-list
cmd programming
추가 작업 사항
parser.add_argument(
'--type',
metavar='<type>',
choices=[
'import', 'export', 'clone', # task type 값에 맞게 변경 완료
],
help=_('Filter tasks by type'),
) 결과
|
크으으,,,, 기어이 커맨드를 구현했다...! 내가 해냈다고!!! 이제 테스트 코드만 구현해서 tox에 인증 작업만 진행하자.. 할 수 있다! class TaskImage(command.Lister):
_description = _("Retrieve a listing of Task objects.")
def get_parser(self, prog_name):
parser = super(TaskImage, self).get_parser(prog_name)
parser.add_argument(
'--sort-key',
metavar="<key>[:<field>]",
help=_("Sorts the response by one of the following attributes: "
"created_at, expires_at, id, status, type, updated_at. "
"Default is created_at. "
"multiple keys and directions can be "
"specified separated by comma"),
)
parser.add_argument(
'--sort-dir',
metavar="<key>[:<direction>]",
help=_("Sort output by selected keys and directions(asc or desc) "
"(default: name:desc), multiple keys and directions can be "
"specified separated by comma"),
)
parser.add_argument(
"--page-size",
metavar="<size>",
help=argparse.SUPPRESS,
)
parser.add_argument(
'--type',
metavar='<type>',
choices=[
'import'
],
help=_("Filters the response by a task type. "
"A valid value is import. "
),
)
parser.add_argument(
'--status',
metavar='<status>',
choices=[
"pending", "processing", "success", "failure"
],
default=None,
help=_("Filter tasks based on status.")
)
return parser
def take_action(self, parsed_args):
image_client = self.app.client_manager.image
columns = (
"id",
"type",
"status",
"owner_id"
)
column_headers = (
"ID",
"Type",
"Status",
"Owner"
)
kwargs = {}
copy_attrs = ("sort_key", "sort_dir", "page_size", "type", "status")
for attr in copy_attrs:
if attr in parsed_args:
val = getattr(parsed_args, attr, None)
if val is not None:
# Only include a value in kwargs for attributes that are
# actually present on the command line
kwargs[attr] = val
data = image_client.tasks(**kwargs)
return (
column_headers,
(utils.get_item_properties(
s,
columns,
formatters=_formatters,
) for s in data)
) |
https://review.opendev.org/c/openstack/python-openstackclient/+/813554 테스트 케이스 및 인증 내역이 포함된 |
멘토님 요청에 따라 SDK 레포에 변경사항을 커밋하지 않은 것을 추가로 커밋 작업을 진행했고, 앞전에 커밋한 기능 구현 PR에 해당 커밋을 통해 https://review.opendev.org/c/openstack/openstacksdk/+/814270 |
glance task-list
cmd programmingglance task-list
cmd programming (개발 완료)
Openstack-client에서 glance task-list가 명령어로 구현이 안되어 있음에 따라 커맨드라인을 개발하기 시작
작업 필요 사항
위의 3가지 사항으로 개발 작업 착수 중
cmd 개발 규칙은 아래의 glance task-list 옵션에 따라 개발을 진행 중
현재 작업중인 사항 -> cmd 필터링 옵션
참고 문서
The text was updated successfully, but these errors were encountered: