Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSulad
提交
2ca68814
I
iSulad
项目概览
openeuler
/
iSulad
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
iSulad
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2ca68814
编写于
7月 28, 2020
作者:
L
lifeng68
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
image: move internal struct defines to image.c
Signed-off-by:
N
lifeng68
<
lifeng68@huawei.com
>
上级
b6c5a617
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
73 addition
and
73 deletion
+73
-73
src/daemon/modules/api/image_api.h
src/daemon/modules/api/image_api.h
+0
-73
src/daemon/modules/image/image.c
src/daemon/modules/image/image.c
+73
-0
未找到文件。
src/daemon/modules/api/image_api.h
浏览文件 @
2ca68814
...
...
@@ -203,79 +203,6 @@ struct graphdriver_status {
char
*
status
;
};
struct
bim_ops
{
int
(
*
init
)(
const
isulad_daemon_configs
*
args
);
void
(
*
clean_resource
)(
void
);
/* detect whether image is of this bim type */
bool
(
*
detect
)(
const
char
*
image_name
);
/* rootfs ops */
int
(
*
prepare_rf
)(
const
im_prepare_request
*
request
,
char
**
real_rootfs
);
int
(
*
mount_rf
)(
const
im_mount_request
*
request
);
int
(
*
umount_rf
)(
const
im_umount_request
*
request
);
int
(
*
delete_rf
)(
const
im_delete_rootfs_request
*
request
);
int
(
*
export_rf
)(
const
im_export_request
*
request
);
char
*
(
*
resolve_image_name
)(
const
char
*
image_name
);
/* merge image config ops */
int
(
*
merge_conf
)(
const
char
*
img_name
,
container_config
*
container_spec
);
/* get user config ops */
int
(
*
get_user_conf
)(
const
char
*
basefs
,
host_config
*
hc
,
const
char
*
userstr
,
defs_process_user
*
puser
);
/* list images */
int
(
*
list_ims
)(
const
im_list_request
*
request
,
imagetool_images_list
**
images
);
/* get count of images */
size_t
(
*
get_image_count
)(
void
);
/* remove image */
int
(
*
rm_image
)(
const
im_rmi_request
*
request
);
/* inspect image */
int
(
*
inspect_image
)(
const
im_inspect_request
*
request
,
char
**
inpected_json
);
int
(
*
container_fs_usage
)(
const
im_container_fs_usage_request
*
request
,
imagetool_fs_info
**
fs_usage
);
int
(
*
image_status
)(
im_status_request
*
request
,
im_status_response
**
response
);
int
(
*
get_filesystem_info
)(
im_fs_info_response
**
response
);
/* import */
int
(
*
import
)(
const
im_import_request
*
request
,
char
**
id
);
/* load image */
int
(
*
load_image
)(
const
im_load_request
*
request
);
/* pull image */
int
(
*
pull_image
)(
const
im_pull_request
*
request
,
im_pull_response
*
response
);
/* login */
int
(
*
login
)(
const
im_login_request
*
request
);
/* logout */
int
(
*
logout
)(
const
im_logout_request
*
request
);
/* Add a tag to the image */
int
(
*
tag_image
)(
const
im_tag_request
*
request
);
};
struct
bim
{
/* common arguments */
const
struct
bim_ops
*
ops
;
const
char
*
type
;
char
*
image_name
;
char
*
ext_config_image
;
char
*
container_id
;
};
struct
bim_type
{
const
char
*
image_type
;
const
struct
bim_ops
*
ops
;
};
int
image_module_init
(
const
isulad_daemon_configs
*
args
);
void
image_module_exit
();
...
...
src/daemon/modules/image/image.c
浏览文件 @
2ca68814
...
...
@@ -35,6 +35,79 @@
#include "ext_image.h"
#include "filters.h"
struct
bim_ops
{
int
(
*
init
)(
const
isulad_daemon_configs
*
args
);
void
(
*
clean_resource
)(
void
);
/* detect whether image is of this bim type */
bool
(
*
detect
)(
const
char
*
image_name
);
/* rootfs ops */
int
(
*
prepare_rf
)(
const
im_prepare_request
*
request
,
char
**
real_rootfs
);
int
(
*
mount_rf
)(
const
im_mount_request
*
request
);
int
(
*
umount_rf
)(
const
im_umount_request
*
request
);
int
(
*
delete_rf
)(
const
im_delete_rootfs_request
*
request
);
int
(
*
export_rf
)(
const
im_export_request
*
request
);
char
*
(
*
resolve_image_name
)(
const
char
*
image_name
);
/* merge image config ops */
int
(
*
merge_conf
)(
const
char
*
img_name
,
container_config
*
container_spec
);
/* get user config ops */
int
(
*
get_user_conf
)(
const
char
*
basefs
,
host_config
*
hc
,
const
char
*
userstr
,
defs_process_user
*
puser
);
/* list images */
int
(
*
list_ims
)(
const
im_list_request
*
request
,
imagetool_images_list
**
images
);
/* get count of images */
size_t
(
*
get_image_count
)(
void
);
/* remove image */
int
(
*
rm_image
)(
const
im_rmi_request
*
request
);
/* inspect image */
int
(
*
inspect_image
)(
const
im_inspect_request
*
request
,
char
**
inpected_json
);
int
(
*
container_fs_usage
)(
const
im_container_fs_usage_request
*
request
,
imagetool_fs_info
**
fs_usage
);
int
(
*
image_status
)(
im_status_request
*
request
,
im_status_response
**
response
);
int
(
*
get_filesystem_info
)(
im_fs_info_response
**
response
);
/* import */
int
(
*
import
)(
const
im_import_request
*
request
,
char
**
id
);
/* load image */
int
(
*
load_image
)(
const
im_load_request
*
request
);
/* pull image */
int
(
*
pull_image
)(
const
im_pull_request
*
request
,
im_pull_response
*
response
);
/* login */
int
(
*
login
)(
const
im_login_request
*
request
);
/* logout */
int
(
*
logout
)(
const
im_logout_request
*
request
);
/* Add a tag to the image */
int
(
*
tag_image
)(
const
im_tag_request
*
request
);
};
struct
bim
{
/* common arguments */
const
struct
bim_ops
*
ops
;
const
char
*
type
;
char
*
image_name
;
char
*
ext_config_image
;
char
*
container_id
;
};
struct
bim_type
{
const
char
*
image_type
;
const
struct
bim_ops
*
ops
;
};
#ifdef ENABLE_OCI_IMAGE
#include "driver.h"
#include "storage.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录