Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
885de7f8
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
885de7f8
编写于
5月 12, 2009
作者:
C
Cole Robinson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remote driver plumbing for virStorageVolCreateXMLFrom
上级
5b31c7d0
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
146 addition
and
1 deletion
+146
-1
ChangeLog
ChangeLog
+9
-0
qemud/remote.c
qemud/remote.c
+34
-0
qemud/remote_dispatch_args.h
qemud/remote_dispatch_args.h
+1
-0
qemud/remote_dispatch_prototypes.h
qemud/remote_dispatch_prototypes.h
+7
-0
qemud/remote_dispatch_ret.h
qemud/remote_dispatch_ret.h
+1
-0
qemud/remote_dispatch_table.h
qemud/remote_dispatch_table.h
+5
-0
qemud/remote_protocol.c
qemud/remote_protocol.c
+24
-0
qemud/remote_protocol.h
qemud/remote_protocol.h
+18
-0
qemud/remote_protocol.x
qemud/remote_protocol.x
+14
-1
src/remote_internal.c
src/remote_internal.c
+33
-0
未找到文件。
ChangeLog
浏览文件 @
885de7f8
Tue May 12 16:11:14 EDT 2009 Cole Robinson <crobinso@redhat.com>
* qemud/remote.c qemud/remote_dispatch_args.h
qemud/remote_dispatch_prototypes.h qemud/remote_distpatch_ret.h
qemud/remote_dispatch_table.h qemud/remote_protocol.c
qemud/remote_protocol.h qemud/remote_protocol.x
src/remote_internal.c:
Remote support for virStorageVolCreateXMLFrom
Tue May 12 16:00:49 EDT 2009 Cole Robinson <crobinso@redhat.com>
Tue May 12 16:00:49 EDT 2009 Cole Robinson <crobinso@redhat.com>
* include/libvirt/libvirt.h include/libvirt/libvirt.c
* include/libvirt/libvirt.h include/libvirt/libvirt.c
...
...
qemud/remote.c
浏览文件 @
885de7f8
...
@@ -3831,6 +3831,40 @@ remoteDispatchStorageVolCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
...
@@ -3831,6 +3831,40 @@ remoteDispatchStorageVolCreateXml (struct qemud_server *server ATTRIBUTE_UNUSED,
return
0
;
return
0
;
}
}
static
int
remoteDispatchStorageVolCreateXmlFrom
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
virConnectPtr
conn
,
remote_error
*
rerr
,
remote_storage_vol_create_xml_from_args
*
args
,
remote_storage_vol_create_xml_from_ret
*
ret
)
{
virStoragePoolPtr
pool
;
virStorageVolPtr
clonevol
,
newvol
;
pool
=
get_nonnull_storage_pool
(
conn
,
args
->
pool
);
if
(
pool
==
NULL
)
{
remoteDispatchConnError
(
rerr
,
conn
);
return
-
1
;
}
clonevol
=
get_nonnull_storage_vol
(
conn
,
args
->
clonevol
);
if
(
clonevol
==
NULL
)
{
remoteDispatchConnError
(
rerr
,
conn
);
return
-
1
;
}
newvol
=
virStorageVolCreateXMLFrom
(
pool
,
args
->
xml
,
clonevol
,
args
->
flags
);
if
(
newvol
==
NULL
)
{
remoteDispatchConnError
(
rerr
,
conn
);
return
-
1
;
}
make_nonnull_storage_vol
(
&
ret
->
vol
,
newvol
);
virStorageVolFree
(
newvol
);
return
0
;
}
static
int
static
int
remoteDispatchStorageVolDelete
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
remoteDispatchStorageVolDelete
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
...
...
qemud/remote_dispatch_args.h
浏览文件 @
885de7f8
...
@@ -105,3 +105,4 @@
...
@@ -105,3 +105,4 @@
remote_domain_get_security_label_args
val_remote_domain_get_security_label_args
;
remote_domain_get_security_label_args
val_remote_domain_get_security_label_args
;
remote_node_device_create_xml_args
val_remote_node_device_create_xml_args
;
remote_node_device_create_xml_args
val_remote_node_device_create_xml_args
;
remote_node_device_destroy_args
val_remote_node_device_destroy_args
;
remote_node_device_destroy_args
val_remote_node_device_destroy_args
;
remote_storage_vol_create_xml_from_args
val_remote_storage_vol_create_xml_from_args
;
qemud/remote_dispatch_prototypes.h
浏览文件 @
885de7f8
...
@@ -814,6 +814,13 @@ static int remoteDispatchStorageVolCreateXml(
...
@@ -814,6 +814,13 @@ static int remoteDispatchStorageVolCreateXml(
remote_error
*
err
,
remote_error
*
err
,
remote_storage_vol_create_xml_args
*
args
,
remote_storage_vol_create_xml_args
*
args
,
remote_storage_vol_create_xml_ret
*
ret
);
remote_storage_vol_create_xml_ret
*
ret
);
static
int
remoteDispatchStorageVolCreateXmlFrom
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
virConnectPtr
conn
,
remote_error
*
err
,
remote_storage_vol_create_xml_from_args
*
args
,
remote_storage_vol_create_xml_from_ret
*
ret
);
static
int
remoteDispatchStorageVolDelete
(
static
int
remoteDispatchStorageVolDelete
(
struct
qemud_server
*
server
,
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
struct
qemud_client
*
client
,
...
...
qemud/remote_dispatch_ret.h
浏览文件 @
885de7f8
...
@@ -89,3 +89,4 @@
...
@@ -89,3 +89,4 @@
remote_domain_get_security_label_ret
val_remote_domain_get_security_label_ret
;
remote_domain_get_security_label_ret
val_remote_domain_get_security_label_ret
;
remote_node_get_security_model_ret
val_remote_node_get_security_model_ret
;
remote_node_get_security_model_ret
val_remote_node_get_security_model_ret
;
remote_node_device_create_xml_ret
val_remote_node_device_create_xml_ret
;
remote_node_device_create_xml_ret
val_remote_node_device_create_xml_ret
;
remote_storage_vol_create_xml_from_ret
val_remote_storage_vol_create_xml_from_ret
;
qemud/remote_dispatch_table.h
浏览文件 @
885de7f8
...
@@ -627,3 +627,8 @@
...
@@ -627,3 +627,8 @@
.
args_filter
=
(
xdrproc_t
)
xdr_remote_node_device_destroy_args
,
.
args_filter
=
(
xdrproc_t
)
xdr_remote_node_device_destroy_args
,
.
ret_filter
=
(
xdrproc_t
)
xdr_void
,
.
ret_filter
=
(
xdrproc_t
)
xdr_void
,
},
},
{
/* StorageVolCreateXmlFrom => 125 */
.
fn
=
(
dispatch_fn
)
remoteDispatchStorageVolCreateXmlFrom
,
.
args_filter
=
(
xdrproc_t
)
xdr_remote_storage_vol_create_xml_from_args
,
.
ret_filter
=
(
xdrproc_t
)
xdr_remote_storage_vol_create_xml_from_ret
,
},
qemud/remote_protocol.c
浏览文件 @
885de7f8
...
@@ -1991,6 +1991,30 @@ xdr_remote_storage_vol_create_xml_ret (XDR *xdrs, remote_storage_vol_create_xml_
...
@@ -1991,6 +1991,30 @@ xdr_remote_storage_vol_create_xml_ret (XDR *xdrs, remote_storage_vol_create_xml_
return
TRUE
;
return
TRUE
;
}
}
bool_t
xdr_remote_storage_vol_create_xml_from_args
(
XDR
*
xdrs
,
remote_storage_vol_create_xml_from_args
*
objp
)
{
if
(
!
xdr_remote_nonnull_storage_pool
(
xdrs
,
&
objp
->
pool
))
return
FALSE
;
if
(
!
xdr_remote_nonnull_string
(
xdrs
,
&
objp
->
xml
))
return
FALSE
;
if
(
!
xdr_remote_nonnull_storage_vol
(
xdrs
,
&
objp
->
clonevol
))
return
FALSE
;
if
(
!
xdr_u_int
(
xdrs
,
&
objp
->
flags
))
return
FALSE
;
return
TRUE
;
}
bool_t
xdr_remote_storage_vol_create_xml_from_ret
(
XDR
*
xdrs
,
remote_storage_vol_create_xml_from_ret
*
objp
)
{
if
(
!
xdr_remote_nonnull_storage_vol
(
xdrs
,
&
objp
->
vol
))
return
FALSE
;
return
TRUE
;
}
bool_t
bool_t
xdr_remote_storage_vol_delete_args
(
XDR
*
xdrs
,
remote_storage_vol_delete_args
*
objp
)
xdr_remote_storage_vol_delete_args
(
XDR
*
xdrs
,
remote_storage_vol_delete_args
*
objp
)
{
{
...
...
qemud/remote_protocol.h
浏览文件 @
885de7f8
...
@@ -1120,6 +1120,19 @@ struct remote_storage_vol_create_xml_ret {
...
@@ -1120,6 +1120,19 @@ struct remote_storage_vol_create_xml_ret {
};
};
typedef
struct
remote_storage_vol_create_xml_ret
remote_storage_vol_create_xml_ret
;
typedef
struct
remote_storage_vol_create_xml_ret
remote_storage_vol_create_xml_ret
;
struct
remote_storage_vol_create_xml_from_args
{
remote_nonnull_storage_pool
pool
;
remote_nonnull_string
xml
;
remote_nonnull_storage_vol
clonevol
;
u_int
flags
;
};
typedef
struct
remote_storage_vol_create_xml_from_args
remote_storage_vol_create_xml_from_args
;
struct
remote_storage_vol_create_xml_from_ret
{
remote_nonnull_storage_vol
vol
;
};
typedef
struct
remote_storage_vol_create_xml_from_ret
remote_storage_vol_create_xml_from_ret
;
struct
remote_storage_vol_delete_args
{
struct
remote_storage_vol_delete_args
{
remote_nonnull_storage_vol
vol
;
remote_nonnull_storage_vol
vol
;
u_int
flags
;
u_int
flags
;
...
@@ -1415,6 +1428,7 @@ enum remote_procedure {
...
@@ -1415,6 +1428,7 @@ enum remote_procedure {
REMOTE_PROC_NODE_GET_SECURITY_MODEL
=
122
,
REMOTE_PROC_NODE_GET_SECURITY_MODEL
=
122
,
REMOTE_PROC_NODE_DEVICE_CREATE_XML
=
123
,
REMOTE_PROC_NODE_DEVICE_CREATE_XML
=
123
,
REMOTE_PROC_NODE_DEVICE_DESTROY
=
124
,
REMOTE_PROC_NODE_DEVICE_DESTROY
=
124
,
REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM
=
125
,
};
};
typedef
enum
remote_procedure
remote_procedure
;
typedef
enum
remote_procedure
remote_procedure
;
...
@@ -1623,6 +1637,8 @@ extern bool_t xdr_remote_storage_vol_lookup_by_path_args (XDR *, remote_storage
...
@@ -1623,6 +1637,8 @@ extern bool_t xdr_remote_storage_vol_lookup_by_path_args (XDR *, remote_storage
extern
bool_t
xdr_remote_storage_vol_lookup_by_path_ret
(
XDR
*
,
remote_storage_vol_lookup_by_path_ret
*
);
extern
bool_t
xdr_remote_storage_vol_lookup_by_path_ret
(
XDR
*
,
remote_storage_vol_lookup_by_path_ret
*
);
extern
bool_t
xdr_remote_storage_vol_create_xml_args
(
XDR
*
,
remote_storage_vol_create_xml_args
*
);
extern
bool_t
xdr_remote_storage_vol_create_xml_args
(
XDR
*
,
remote_storage_vol_create_xml_args
*
);
extern
bool_t
xdr_remote_storage_vol_create_xml_ret
(
XDR
*
,
remote_storage_vol_create_xml_ret
*
);
extern
bool_t
xdr_remote_storage_vol_create_xml_ret
(
XDR
*
,
remote_storage_vol_create_xml_ret
*
);
extern
bool_t
xdr_remote_storage_vol_create_xml_from_args
(
XDR
*
,
remote_storage_vol_create_xml_from_args
*
);
extern
bool_t
xdr_remote_storage_vol_create_xml_from_ret
(
XDR
*
,
remote_storage_vol_create_xml_from_ret
*
);
extern
bool_t
xdr_remote_storage_vol_delete_args
(
XDR
*
,
remote_storage_vol_delete_args
*
);
extern
bool_t
xdr_remote_storage_vol_delete_args
(
XDR
*
,
remote_storage_vol_delete_args
*
);
extern
bool_t
xdr_remote_storage_vol_dump_xml_args
(
XDR
*
,
remote_storage_vol_dump_xml_args
*
);
extern
bool_t
xdr_remote_storage_vol_dump_xml_args
(
XDR
*
,
remote_storage_vol_dump_xml_args
*
);
extern
bool_t
xdr_remote_storage_vol_dump_xml_ret
(
XDR
*
,
remote_storage_vol_dump_xml_ret
*
);
extern
bool_t
xdr_remote_storage_vol_dump_xml_ret
(
XDR
*
,
remote_storage_vol_dump_xml_ret
*
);
...
@@ -1837,6 +1853,8 @@ extern bool_t xdr_remote_storage_vol_lookup_by_path_args ();
...
@@ -1837,6 +1853,8 @@ extern bool_t xdr_remote_storage_vol_lookup_by_path_args ();
extern
bool_t
xdr_remote_storage_vol_lookup_by_path_ret
();
extern
bool_t
xdr_remote_storage_vol_lookup_by_path_ret
();
extern
bool_t
xdr_remote_storage_vol_create_xml_args
();
extern
bool_t
xdr_remote_storage_vol_create_xml_args
();
extern
bool_t
xdr_remote_storage_vol_create_xml_ret
();
extern
bool_t
xdr_remote_storage_vol_create_xml_ret
();
extern
bool_t
xdr_remote_storage_vol_create_xml_from_args
();
extern
bool_t
xdr_remote_storage_vol_create_xml_from_ret
();
extern
bool_t
xdr_remote_storage_vol_delete_args
();
extern
bool_t
xdr_remote_storage_vol_delete_args
();
extern
bool_t
xdr_remote_storage_vol_dump_xml_args
();
extern
bool_t
xdr_remote_storage_vol_dump_xml_args
();
extern
bool_t
xdr_remote_storage_vol_dump_xml_ret
();
extern
bool_t
xdr_remote_storage_vol_dump_xml_ret
();
...
...
qemud/remote_protocol.x
浏览文件 @
885de7f8
...
@@ -1002,6 +1002,17 @@ struct remote_storage_vol_create_xml_ret {
...
@@ -1002,6 +1002,17 @@ struct remote_storage_vol_create_xml_ret {
remote_nonnull_storage_vol
vol
;
remote_nonnull_storage_vol
vol
;
};
};
struct
remote_storage_vol_create_xml_from_args
{
remote_nonnull_storage_pool
pool
;
remote_nonnull_string
xml
;
remote_nonnull_storage_vol
clonevol
;
unsigned
flags
;
};
struct
remote_storage_vol_create_xml_from_ret
{
remote_nonnull_storage_vol
vol
;
};
struct
remote_storage_vol_delete_args
{
struct
remote_storage_vol_delete_args
{
remote_nonnull_storage_vol
vol
;
remote_nonnull_storage_vol
vol
;
unsigned
flags
;
unsigned
flags
;
...
@@ -1286,7 +1297,9 @@ enum remote_procedure {
...
@@ -1286,7 +1297,9 @@ enum remote_procedure {
REMOTE_PROC_NODE_GET_SECURITY_MODEL
=
122
,
REMOTE_PROC_NODE_GET_SECURITY_MODEL
=
122
,
REMOTE_PROC_NODE_DEVICE_CREATE_XML
=
123
,
REMOTE_PROC_NODE_DEVICE_CREATE_XML
=
123
,
REMOTE_PROC_NODE_DEVICE_DESTROY
=
124
REMOTE_PROC_NODE_DEVICE_DESTROY
=
124
,
REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM
=
125
};
};
/* Custom RPC structure. */
/* Custom RPC structure. */
...
...
src/remote_internal.c
浏览文件 @
885de7f8
...
@@ -4499,6 +4499,38 @@ done:
...
@@ -4499,6 +4499,38 @@ done:
return
vol
;
return
vol
;
}
}
static
virStorageVolPtr
remoteStorageVolCreateXMLFrom
(
virStoragePoolPtr
pool
,
const
char
*
xmlDesc
,
virStorageVolPtr
clonevol
,
unsigned
int
flags
)
{
virStorageVolPtr
newvol
=
NULL
;
remote_storage_vol_create_xml_from_args
args
;
remote_storage_vol_create_xml_from_ret
ret
;
struct
private_data
*
priv
=
pool
->
conn
->
storagePrivateData
;
remoteDriverLock
(
priv
);
make_nonnull_storage_pool
(
&
args
.
pool
,
pool
);
make_nonnull_storage_vol
(
&
args
.
clonevol
,
clonevol
);
args
.
xml
=
(
char
*
)
xmlDesc
;
args
.
flags
=
flags
;
memset
(
&
ret
,
0
,
sizeof
ret
);
if
(
call
(
pool
->
conn
,
priv
,
0
,
REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM
,
(
xdrproc_t
)
xdr_remote_storage_vol_create_xml_from_args
,
(
char
*
)
&
args
,
(
xdrproc_t
)
xdr_remote_storage_vol_create_xml_from_ret
,
(
char
*
)
&
ret
)
==
-
1
)
goto
done
;
newvol
=
get_nonnull_storage_vol
(
pool
->
conn
,
ret
.
vol
);
xdr_free
((
xdrproc_t
)
&
xdr_remote_storage_vol_create_xml_from_ret
,
(
char
*
)
&
ret
);
done:
remoteDriverUnlock
(
priv
);
return
newvol
;
}
static
int
static
int
remoteStorageVolDelete
(
virStorageVolPtr
vol
,
remoteStorageVolDelete
(
virStorageVolPtr
vol
,
unsigned
int
flags
)
unsigned
int
flags
)
...
@@ -7018,6 +7050,7 @@ static virStorageDriver storage_driver = {
...
@@ -7018,6 +7050,7 @@ static virStorageDriver storage_driver = {
.
volLookupByKey
=
remoteStorageVolLookupByKey
,
.
volLookupByKey
=
remoteStorageVolLookupByKey
,
.
volLookupByPath
=
remoteStorageVolLookupByPath
,
.
volLookupByPath
=
remoteStorageVolLookupByPath
,
.
volCreateXML
=
remoteStorageVolCreateXML
,
.
volCreateXML
=
remoteStorageVolCreateXML
,
.
volCreateXMLFrom
=
remoteStorageVolCreateXMLFrom
,
.
volDelete
=
remoteStorageVolDelete
,
.
volDelete
=
remoteStorageVolDelete
,
.
volGetInfo
=
remoteStorageVolGetInfo
,
.
volGetInfo
=
remoteStorageVolGetInfo
,
.
volGetXMLDesc
=
remoteStorageVolDumpXML
,
.
volGetXMLDesc
=
remoteStorageVolDumpXML
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录