8 Star 3 Fork 7

openEuler / pyisula

 / 详情

按照README代码调用缺少google.protobuf依赖及有未实现接口

已完成
缺陷
创建于  
2021-10-14 22:35

【问题复现步骤】
按照README文档中操作,新建test.py

from isula import client

builder_client = client.init_builder_client()
image_list = builder_client.list_image()
print(image_list)

print(builder_client.server_info())

【预期结果】
运行正常

【实际结果】

[root@iZbp1ca5vr2dkl292whpstZ pyisula]# python3 test.py 
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from isula import client
  File "/root/gitee/pyisula/isula/client.py", line 1, in <module>
    from isula.builder import client as builder_client
  File "/root/gitee/pyisula/isula/builder/client.py", line 9, in <module>
    from google.protobuf.json_format import MessageToDict
ModuleNotFoundError: No module named 'google'

考虑加入protobuf作为setup依赖, 例如:https://github.com/hyperledger/fabric-sdk-py/blob/main/requirements.txt

【其他信息】
目前尚未实现iSulad相关函数,直接执行README中示例同样,会报错:Not Found

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    isulad_client = client.init_isulad_client()
  File "/root/gitee/pyisula/isula/client.py", line 17, in init_isulad_client
    return isulad_client.Client(channel_target)
AttributeError: module 'isula.isulad.client' has no attribute 'Client'

可考虑先pass,或者不做修改,后续上传都可。

def init_isulad_client(channel_target=None):
    pass

评论 (2)

meilier 创建了缺陷
meilier 关联仓库设置为openEuler/pyisula
展开全部操作日志

Hi meilier, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at
https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md.
If you have any questions, please contact the SIG: iSulad, and any of the maintainers: @jingxiaolu, @haomintsai, @lifeng_isula, @haozi007.

openeuler-ci-bot 添加了
 
sig/iSulad
标签
  1. protobuf后续会加上
  2. 接口在逐步实现中,可以参考README的接口映射表格
王玺源 通过openeuler/pyisula Pull Request !7任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936 5254789 xiyuanwang 1683862611
1
https://gitee.com/openeuler/pyisula.git
git@gitee.com:openeuler/pyisula.git
openeuler
pyisula
pyisula

搜索帮助