Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
lcr
提交
26771306
L
lcr
项目概览
openeuler
/
lcr
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lcr
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
26771306
编写于
4月 23, 2020
作者:
O
openeuler-ci-bot
提交者:
Gitee
4月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
!32 lcr: compatible with older versions of creation
Merge pull request !32 from wangkang101/master
上级
3db9f84c
20b2d5fd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
4 deletion
+27
-4
src/lcrcontainer.c
src/lcrcontainer.c
+16
-0
src/lcrcontainer.h
src/lcrcontainer.h
+11
-4
未找到文件。
src/lcrcontainer.c
浏览文件 @
26771306
...
...
@@ -270,6 +270,22 @@ out_free:
free
(
path
);
}
bool
lcr_create_from_ocidata
(
const
char
*
name
,
const
char
*
lcrpath
,
const
void
*
oci_json_data
)
{
oci_runtime_spec
*
oci_spec
=
NULL
;
bool
ret
=
true
;
if
(
!
container_parse
(
NULL
,
oci_json_data
,
&
oci_spec
))
{
ret
=
false
;
goto
out_free
;
}
ret
=
lcr_create
(
name
,
lcrpath
,
oci_spec
);
out_free:
free_oci_runtime_spec
(
oci_spec
);
return
ret
;
}
static
bool
lcr_create_spec
(
struct
lxc_container
*
c
,
oci_runtime_spec
*
oci_spec
)
{
// Translate oci config
...
...
src/lcrcontainer.h
浏览文件 @
26771306
...
...
@@ -139,10 +139,17 @@ void lcr_containers_info_free(struct lcr_container_info **info_arr, size_t size)
/*
* Create a container
* param name : container name
* param lcrpath: container path
* param rootfs : the path of rootfs used for the container
* param oci_config_data : json string of oci config data
* param name : container name
* param lcrpath : container path
* param oci_json_data : json string of oci config data
*/
bool
lcr_create_from_ocidata
(
const
char
*
name
,
const
char
*
lcrpath
,
const
void
*
oci_json_data
);
/*
* Create a container
* param name : container name
* param lcrpath : container path
* param oci_config : pointer of struct oci config
*/
bool
lcr_create
(
const
char
*
name
,
const
char
*
lcrpath
,
void
*
oci_config
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录