mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
Add public API stubs for virStorageVolCreateXMLFrom
Also checkin regenerated docs due to API change.
This commit is contained in:
parent
52c5f7adc8
commit
5b31c7d08a
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
Tue May 12 16:00:49 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
* include/libvirt/libvirt.h include/libvirt/libvirt.c
|
||||
src/driver.h src/libvirt.c src/libvirt_public.syms:
|
||||
Public API definition for virStorageVolCreateXMLFrom
|
||||
* docs/devhelp/libvirt-libvirt.html
|
||||
docs/devhelp/libvirt-virterror.html
|
||||
docs/html/libvirt-libvirt.html docs/html/libvirt-virterror.html
|
||||
docs/libvirt-api.xml docs/libvirt-refs.xml:
|
||||
Regenerate API documentation.
|
||||
|
||||
Tue May 12 15:58:28 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
* src/storage_backend.c: Document a function
|
||||
|
@ -245,6 +245,7 @@ typedef int <a href="#virEventAddHandleFunc">virEventAddHandleFunc</a> (int fd,
|
||||
int <a href="#virNetworkUndefine">virNetworkUndefine</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network);
|
||||
int <a href="#virConnectListDefinedStoragePools">virConnectListDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames);
|
||||
typedef void <a href="#virEventTimeoutCallback">virEventTimeoutCallback</a> (int timer, <br/> void * opaque);
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXMLFrom">virStorageVolCreateXMLFrom</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br/> unsigned int flags);
|
||||
int <a href="#virNodeDeviceNumOfCaps">virNodeDeviceNumOfCaps</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev);
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virNetworkGetConnect">virNetworkGetConnect</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> net);
|
||||
unsigned long long <a href="#virNodeGetFreeMemory">virNodeGetFreeMemory</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
@ -1333,6 +1334,10 @@ The content of this structure is not made public by the API.
|
||||
<div class="refsect2" lang="en"><h3><a name="virStorageVolCreateXML"/>virStorageVolCreateXML ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXML (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virStorageVolCreateXMLFrom"/>virStorageVolCreateXMLFrom ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXMLFrom (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Create a storage volume in the parent pool, using the 'clonevol' volume as input. Information for the new volume (name, perms) are passed via a typical volume XML description.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to parent pool for the new volume</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>clonevol</tt></i>:</span></td><td>storage volume to use as input</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virStorageVolDelete"/>virStorageVolDelete ()</h3><pre class="programlisting">int virStorageVolDelete (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> unsigned int flags)<br/>
|
||||
</pre><p>Delete the storage volume from the pool</p>
|
||||
|
@ -176,6 +176,7 @@ void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvi
|
||||
<a name="VIR_ERR_INVALID_NODE_DEVICE">VIR_ERR_INVALID_NODE_DEVICE</a> = 52 /* invalid node device object */
|
||||
<a name="VIR_ERR_NO_NODE_DEVICE">VIR_ERR_NO_NODE_DEVICE</a> = 53 /* node device not found */
|
||||
<a name="VIR_ERR_NO_SECURITY_MODEL">VIR_ERR_NO_SECURITY_MODEL</a> = 54 /* security model not found */
|
||||
<a name="VIR_ERR_OPERATION_INVALID">VIR_ERR_OPERATION_INVALID</a> = 55 /* operation is not applicable at this time */
|
||||
};
|
||||
</pre><p/>
|
||||
</div>
|
||||
|
@ -246,6 +246,7 @@ int <a href="#virStoragePoolRefresh">virStoragePoolRefresh</a> (<a href="libvir
|
||||
int <a href="#virStoragePoolSetAutostart">virStoragePoolSetAutostart</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int autostart)
|
||||
int <a href="#virStoragePoolUndefine">virStoragePoolUndefine</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXML">virStorageVolCreateXML</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> unsigned int flags)
|
||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXMLFrom">virStorageVolCreateXMLFrom</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br /> unsigned int flags)
|
||||
int <a href="#virStorageVolDelete">virStorageVolDelete</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)
|
||||
int <a href="#virStorageVolFree">virStorageVolFree</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virStorageVolGetConnect">virStorageVolGetConnect</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
||||
@ -505,7 +506,8 @@ int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.
|
||||
</pre><p>Request that the pool refresh its list of volumes. This may involve communicating with a remote server, and/or initializing new devices at the OS layer</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags to control refresh behaviour (currently unused, use 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the volume list was refreshed, -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolSetAutostart" id="virStoragePoolSetAutostart"><code>virStoragePoolSetAutostart</code></a></h3><pre class="programlisting">int virStoragePoolSetAutostart (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int autostart)<br />
|
||||
</pre><p>Sets the autostart flag</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>autostart</tt></i>:</span></td><td>new flag setting</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolUndefine" id="virStoragePoolUndefine"><code>virStoragePoolUndefine</code></a></h3><pre class="programlisting">int virStoragePoolUndefine (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
|
||||
</pre><p>Undefine an inactive storage pool</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if creation failed</td></tr></tbody></table></div><h3><a name="virStorageVolCreateXML" id="virStorageVolCreateXML"><code>virStorageVolCreateXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXML (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> unsigned int flags)<br />
|
||||
</pre><p>Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolDelete" id="virStorageVolDelete"><code>virStorageVolDelete</code></a></h3><pre class="programlisting">int virStorageVolDelete (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)<br />
|
||||
</pre><p>Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolCreateXMLFrom" id="virStorageVolCreateXMLFrom"><code>virStorageVolCreateXMLFrom</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXMLFrom (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br /> unsigned int flags)<br />
|
||||
</pre><p>Create a storage volume in the parent pool, using the 'clonevol' volume as input. Information for the new volume (name, perms) are passed via a typical volume XML description.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to parent pool for the new volume</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>clonevol</tt></i>:</span></td><td>storage volume to use as input</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolDelete" id="virStorageVolDelete"><code>virStorageVolDelete</code></a></h3><pre class="programlisting">int virStorageVolDelete (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)<br />
|
||||
</pre><p>Delete the storage volume from the pool</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>future flags, use 0 for now</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error</td></tr></tbody></table></div><h3><a name="virStorageVolFree" id="virStorageVolFree"><code>virStorageVolFree</code></a></h3><pre class="programlisting">int virStorageVolFree (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
|
||||
</pre><p>Release the storage volume handle. The underlying storage volume continues to exist.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error</td></tr></tbody></table></div><h3><a name="virStorageVolGetConnect" id="virStorageVolGetConnect"><code>virStorageVolGetConnect</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virStorageVolGetConnect (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
|
||||
</pre><p>Provides the connection pointer associated with a storage volume. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the volume object together.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to a pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div><h3><a name="virStorageVolGetInfo" id="virStorageVolGetInfo"><code>virStorageVolGetInfo</code></a></h3><pre class="programlisting">int virStorageVolGetInfo (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> <a href="libvirt-libvirt.html#virStorageVolInfoPtr">virStorageVolInfoPtr</a> info)<br />
|
||||
|
File diff suppressed because one or more lines are too long
@ -295,6 +295,7 @@
|
||||
<exports symbol='virNetworkUndefine' type='function'/>
|
||||
<exports symbol='virConnectListDefinedStoragePools' type='function'/>
|
||||
<exports symbol='virEventTimeoutCallback' type='function'/>
|
||||
<exports symbol='virStorageVolCreateXMLFrom' type='function'/>
|
||||
<exports symbol='virNodeDeviceNumOfCaps' type='function'/>
|
||||
<exports symbol='virNetworkGetConnect' type='function'/>
|
||||
<exports symbol='virNodeGetFreeMemory' type='function'/>
|
||||
@ -365,15 +366,16 @@
|
||||
<exports symbol='VIR_ERR_GNUTLS_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_POST_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OS_TYPE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENSTORE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPERATION_INVALID' type='enum'/>
|
||||
<exports symbol='VIR_WAR_NO_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_CONN' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NONE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OK' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENXM' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NETWORK' type='enum'/>
|
||||
<exports symbol='VIR_ERR_XML_DETAIL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NET' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENXM' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENSTORE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_NAME' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_ROOT' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPERATION_FAILED' type='enum'/>
|
||||
@ -581,6 +583,7 @@
|
||||
<enum name='VIR_ERR_OPEN_FAILED' file='virterror' value='30' type='virErrorNumber' info='failed to open a conf file'/>
|
||||
<enum name='VIR_ERR_OPERATION_DENIED' file='virterror' value='29' type='virErrorNumber' info='operation forbidden on read-only connections'/>
|
||||
<enum name='VIR_ERR_OPERATION_FAILED' file='virterror' value='9' type='virErrorNumber' info='a command to hypervisor failed'/>
|
||||
<enum name='VIR_ERR_OPERATION_INVALID' file='virterror' value='55' type='virErrorNumber' info=' operation is not applicable at this time'/>
|
||||
<enum name='VIR_ERR_OS_TYPE' file='virterror' value='16' type='virErrorNumber' info='unknown OS type'/>
|
||||
<enum name='VIR_ERR_PARSE_FAILED' file='virterror' value='32' type='virErrorNumber' info='failed to parse a conf file'/>
|
||||
<enum name='VIR_ERR_POST_FAILED' file='virterror' value='11' type='virErrorNumber' info='a HTTP POST command to failed'/>
|
||||
@ -1776,6 +1779,14 @@ see note above'/>
|
||||
<arg name='xmldesc' type='const char *' info='description of volume to create'/>
|
||||
<arg name='flags' type='unsigned int' info='flags for creation (unused, pass 0)'/>
|
||||
</function>
|
||||
<function name='virStorageVolCreateXMLFrom' file='libvirt' module='libvirt'>
|
||||
<info>Create a storage volume in the parent pool, using the 'clonevol' volume as input. Information for the new volume (name, perms) are passed via a typical volume XML description.</info>
|
||||
<return type='virStorageVolPtr' info='the storage volume, or NULL on error'/>
|
||||
<arg name='pool' type='virStoragePoolPtr' info='pointer to parent pool for the new volume'/>
|
||||
<arg name='xmldesc' type='const char *' info='description of volume to create'/>
|
||||
<arg name='clonevol' type='virStorageVolPtr' info='storage volume to use as input'/>
|
||||
<arg name='flags' type='unsigned int' info='flags for creation (unused, pass 0)'/>
|
||||
</function>
|
||||
<function name='virStorageVolDelete' file='libvirt' module='libvirt'>
|
||||
<info>Delete the storage volume from the pool</info>
|
||||
<return type='int' info='0 on success, or -1 on error'/>
|
||||
|
@ -96,6 +96,7 @@
|
||||
<reference name='VIR_ERR_OPEN_FAILED' href='html/libvirt-virterror.html#VIR_ERR_OPEN_FAILED'/>
|
||||
<reference name='VIR_ERR_OPERATION_DENIED' href='html/libvirt-virterror.html#VIR_ERR_OPERATION_DENIED'/>
|
||||
<reference name='VIR_ERR_OPERATION_FAILED' href='html/libvirt-virterror.html#VIR_ERR_OPERATION_FAILED'/>
|
||||
<reference name='VIR_ERR_OPERATION_INVALID' href='html/libvirt-virterror.html#VIR_ERR_OPERATION_INVALID'/>
|
||||
<reference name='VIR_ERR_OS_TYPE' href='html/libvirt-virterror.html#VIR_ERR_OS_TYPE'/>
|
||||
<reference name='VIR_ERR_PARSE_FAILED' href='html/libvirt-virterror.html#VIR_ERR_PARSE_FAILED'/>
|
||||
<reference name='VIR_ERR_POST_FAILED' href='html/libvirt-virterror.html#VIR_ERR_POST_FAILED'/>
|
||||
@ -400,6 +401,7 @@
|
||||
<reference name='virStoragePoolUndefine' href='html/libvirt-libvirt.html#virStoragePoolUndefine'/>
|
||||
<reference name='virStorageVol' href='html/libvirt-libvirt.html#virStorageVol'/>
|
||||
<reference name='virStorageVolCreateXML' href='html/libvirt-libvirt.html#virStorageVolCreateXML'/>
|
||||
<reference name='virStorageVolCreateXMLFrom' href='html/libvirt-libvirt.html#virStorageVolCreateXMLFrom'/>
|
||||
<reference name='virStorageVolDelete' href='html/libvirt-libvirt.html#virStorageVolDelete'/>
|
||||
<reference name='virStorageVolDeleteFlags' href='html/libvirt-libvirt.html#virStorageVolDeleteFlags'/>
|
||||
<reference name='virStorageVolFree' href='html/libvirt-libvirt.html#virStorageVolFree'/>
|
||||
@ -520,6 +522,7 @@
|
||||
<ref name='VIR_ERR_OPEN_FAILED'/>
|
||||
<ref name='VIR_ERR_OPERATION_DENIED'/>
|
||||
<ref name='VIR_ERR_OPERATION_FAILED'/>
|
||||
<ref name='VIR_ERR_OPERATION_INVALID'/>
|
||||
<ref name='VIR_ERR_OS_TYPE'/>
|
||||
<ref name='VIR_ERR_PARSE_FAILED'/>
|
||||
<ref name='VIR_ERR_POST_FAILED'/>
|
||||
@ -828,6 +831,7 @@
|
||||
<ref name='virStoragePoolUndefine'/>
|
||||
<ref name='virStorageVol'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolDelete'/>
|
||||
<ref name='virStorageVolDeleteFlags'/>
|
||||
<ref name='virStorageVolFree'/>
|
||||
@ -905,6 +909,7 @@
|
||||
</type>
|
||||
<type name='virStorageVolPtr'>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolLookupByKey'/>
|
||||
<ref name='virStorageVolLookupByName'/>
|
||||
<ref name='virStorageVolLookupByPath'/>
|
||||
@ -969,6 +974,7 @@
|
||||
<ref name='virStoragePoolGetXMLDesc'/>
|
||||
<ref name='virStoragePoolRefresh'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolDelete'/>
|
||||
<ref name='virStorageVolGetXMLDesc'/>
|
||||
</type>
|
||||
@ -1213,6 +1219,7 @@
|
||||
<ref name='virStoragePoolSetAutostart'/>
|
||||
<ref name='virStoragePoolUndefine'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolLookupByName'/>
|
||||
</type>
|
||||
<type name='virStorageVolInfoPtr'>
|
||||
@ -1220,6 +1227,7 @@
|
||||
</type>
|
||||
<type name='virStorageVolPtr'>
|
||||
<ref name='virStoragePoolLookupByVolume'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolDelete'/>
|
||||
<ref name='virStorageVolFree'/>
|
||||
<ref name='virStorageVolGetConnect'/>
|
||||
@ -1547,6 +1555,7 @@
|
||||
<ref name='virStoragePoolUndefine'/>
|
||||
<ref name='virStorageVol'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolDelete'/>
|
||||
<ref name='virStorageVolDeleteFlags'/>
|
||||
<ref name='virStorageVolFree'/>
|
||||
@ -1611,6 +1620,7 @@
|
||||
<ref name='VIR_ERR_OPEN_FAILED'/>
|
||||
<ref name='VIR_ERR_OPERATION_DENIED'/>
|
||||
<ref name='VIR_ERR_OPERATION_FAILED'/>
|
||||
<ref name='VIR_ERR_OPERATION_INVALID'/>
|
||||
<ref name='VIR_ERR_OS_TYPE'/>
|
||||
<ref name='VIR_ERR_PARSE_FAILED'/>
|
||||
<ref name='VIR_ERR_POST_FAILED'/>
|
||||
@ -1796,6 +1806,7 @@
|
||||
<ref name='virNodeDeviceCreateXML'/>
|
||||
<ref name='virStoragePoolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='Current'>
|
||||
<ref name='_virStoragePoolInfo'/>
|
||||
@ -1998,6 +2009,9 @@
|
||||
<ref name='virDomainBlockStats'/>
|
||||
<ref name='virDomainInterfaceStats'/>
|
||||
</word>
|
||||
<word name='Information'>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='Initialize'>
|
||||
<ref name='virInitialize'/>
|
||||
</word>
|
||||
@ -2662,6 +2676,7 @@
|
||||
<ref name='virNodeDeviceReset'/>
|
||||
<ref name='virSetErrorFunc'/>
|
||||
<ref name='virStoragePoolRef'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolRef'/>
|
||||
</word>
|
||||
<word name='area'>
|
||||
@ -3047,6 +3062,9 @@
|
||||
<word name='client'>
|
||||
<ref name='virConnectGetCapabilities'/>
|
||||
</word>
|
||||
<word name='clonevol'>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='closes'>
|
||||
<ref name='virConnectClose'/>
|
||||
</word>
|
||||
@ -3229,6 +3247,7 @@
|
||||
<word name='create'>
|
||||
<ref name='virNetworkDefineXML'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='created'>
|
||||
<ref name='virNodeDeviceCreateXML'/>
|
||||
@ -3238,6 +3257,7 @@
|
||||
<ref name='virStoragePoolDefineXML'/>
|
||||
<ref name='virStoragePoolUndefine'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='credentials'>
|
||||
<ref name='_virConnectAuth'/>
|
||||
@ -3350,6 +3370,7 @@
|
||||
<ref name='virStoragePoolCreateXML'/>
|
||||
<ref name='virStoragePoolDefineXML'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='descriptor'>
|
||||
<ref name='virEventAddHandleFunc'/>
|
||||
@ -3762,6 +3783,7 @@
|
||||
<ref name='virStoragePoolGetXMLDesc'/>
|
||||
<ref name='virStoragePoolRefresh'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolDelete'/>
|
||||
<ref name='virStorageVolGetXMLDesc'/>
|
||||
</word>
|
||||
@ -4174,6 +4196,9 @@
|
||||
<ref name='virInitialize'/>
|
||||
<ref name='virStoragePoolRefresh'/>
|
||||
</word>
|
||||
<word name='input'>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='inside'>
|
||||
<ref name='virDomainGetVcpus'/>
|
||||
</word>
|
||||
@ -5016,6 +5041,7 @@
|
||||
</word>
|
||||
<word name='parent'>
|
||||
<ref name='virNodeDeviceGetParent'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='part'>
|
||||
<ref name='_virError'/>
|
||||
@ -5043,11 +5069,13 @@
|
||||
<ref name='virNodeListDevices'/>
|
||||
<ref name='virNodeNumOfDevices'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolGetXMLDesc'/>
|
||||
</word>
|
||||
<word name='passed'>
|
||||
<ref name='virConnectDomainEventRegister'/>
|
||||
<ref name='virConnectGetURI'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='path'>
|
||||
<ref name='virDomainBlockPeek'/>
|
||||
@ -5085,6 +5113,9 @@
|
||||
<word name='permission'>
|
||||
<ref name='virDomainBlockPeek'/>
|
||||
</word>
|
||||
<word name='perms'>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='persistent'>
|
||||
<ref name='virDomainCreateXML'/>
|
||||
<ref name='virDomainDefineXML'/>
|
||||
@ -6111,6 +6142,9 @@
|
||||
<ref name='virConnectFindStoragePoolSources'/>
|
||||
<ref name='virDomainMigrate'/>
|
||||
</word>
|
||||
<word name='typical'>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='typically'>
|
||||
<ref name='virConnectRef'/>
|
||||
<ref name='virDomainMigrate'/>
|
||||
@ -6188,6 +6222,7 @@
|
||||
<ref name='virNodeNumOfDevices'/>
|
||||
<ref name='virStoragePoolRefresh'/>
|
||||
<ref name='virStorageVolCreateXML'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolGetXMLDesc'/>
|
||||
</word>
|
||||
<word name='updates'>
|
||||
@ -6238,6 +6273,7 @@
|
||||
<ref name='virStoragePoolDefineXML'/>
|
||||
<ref name='virStoragePoolGetConnect'/>
|
||||
<ref name='virStoragePoolRefresh'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolDelete'/>
|
||||
<ref name='virStorageVolGetConnect'/>
|
||||
</word>
|
||||
@ -6312,6 +6348,7 @@
|
||||
<ref name='virNodeDeviceDettach'/>
|
||||
<ref name='virNodeDeviceRef'/>
|
||||
<ref name='virStoragePoolRef'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
<ref name='virStorageVolRef'/>
|
||||
</word>
|
||||
<word name='usual'>
|
||||
@ -6364,6 +6401,7 @@
|
||||
</word>
|
||||
<word name='via'>
|
||||
<ref name='virConnectOpenAuth'/>
|
||||
<ref name='virStorageVolCreateXMLFrom'/>
|
||||
</word>
|
||||
<word name='virConnect'>
|
||||
<ref name='virConnectDomainEventCallback'/>
|
||||
|
@ -1047,6 +1047,10 @@ const char* virStorageVolGetKey (virStorageVolPtr vol);
|
||||
virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool,
|
||||
const char *xmldesc,
|
||||
unsigned int flags);
|
||||
virStorageVolPtr virStorageVolCreateXMLFrom (virStoragePoolPtr pool,
|
||||
const char *xmldesc,
|
||||
virStorageVolPtr clonevol,
|
||||
unsigned int flags);
|
||||
int virStorageVolDelete (virStorageVolPtr vol,
|
||||
unsigned int flags);
|
||||
int virStorageVolRef (virStorageVolPtr vol);
|
||||
|
@ -1047,6 +1047,10 @@ const char* virStorageVolGetKey (virStorageVolPtr vol);
|
||||
virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool,
|
||||
const char *xmldesc,
|
||||
unsigned int flags);
|
||||
virStorageVolPtr virStorageVolCreateXMLFrom (virStoragePoolPtr pool,
|
||||
const char *xmldesc,
|
||||
virStorageVolPtr clonevol,
|
||||
unsigned int flags);
|
||||
int virStorageVolDelete (virStorageVolPtr vol,
|
||||
unsigned int flags);
|
||||
int virStorageVolRef (virStorageVolPtr vol);
|
||||
|
@ -586,6 +586,11 @@ typedef char *
|
||||
typedef char *
|
||||
(*virDrvStorageVolGetPath) (virStorageVolPtr vol);
|
||||
|
||||
typedef virStorageVolPtr
|
||||
(*virDrvStorageVolCreateXMLFrom) (virStoragePoolPtr pool,
|
||||
const char *xmldesc,
|
||||
virStorageVolPtr clone,
|
||||
unsigned int flags);
|
||||
|
||||
|
||||
typedef struct _virStorageDriver virStorageDriver;
|
||||
@ -633,6 +638,7 @@ struct _virStorageDriver {
|
||||
virDrvStorageVolLookupByKey volLookupByKey;
|
||||
virDrvStorageVolLookupByPath volLookupByPath;
|
||||
virDrvStorageVolCreateXML volCreateXML;
|
||||
virDrvStorageVolCreateXMLFrom volCreateXMLFrom;
|
||||
virDrvStorageVolDelete volDelete;
|
||||
virDrvStorageVolGetInfo volGetInfo;
|
||||
virDrvStorageVolGetXMLDesc volGetXMLDesc;
|
||||
|
@ -6766,6 +6766,65 @@ error:
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virStorageVolCreateXMLFrom:
|
||||
* @pool: pointer to parent pool for the new volume
|
||||
* @xmldesc: description of volume to create
|
||||
* @clonevol: storage volume to use as input
|
||||
* @flags: flags for creation (unused, pass 0)
|
||||
*
|
||||
* Create a storage volume in the parent pool, using the
|
||||
* 'clonevol' volume as input. Information for the new
|
||||
* volume (name, perms) are passed via a typical volume
|
||||
* XML description.
|
||||
*
|
||||
* return the storage volume, or NULL on error
|
||||
*/
|
||||
virStorageVolPtr
|
||||
virStorageVolCreateXMLFrom(virStoragePoolPtr pool,
|
||||
const char *xmldesc,
|
||||
virStorageVolPtr clonevol,
|
||||
unsigned int flags)
|
||||
{
|
||||
DEBUG("pool=%p, flags=%u, clonevol=%p", pool, flags, clonevol);
|
||||
|
||||
virResetLastError();
|
||||
|
||||
if (!VIR_IS_STORAGE_POOL(pool)) {
|
||||
virLibConnError(NULL, VIR_ERR_INVALID_STORAGE_POOL, __FUNCTION__);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (!VIR_IS_STORAGE_VOL(clonevol)) {
|
||||
virLibConnError(NULL, VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (pool->conn->flags & VIR_CONNECT_RO ||
|
||||
clonevol->conn->flags & VIR_CONNECT_RO) {
|
||||
virLibConnError(pool->conn, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (pool->conn->storageDriver &&
|
||||
pool->conn->storageDriver->volCreateXMLFrom) {
|
||||
virStorageVolPtr ret;
|
||||
ret = pool->conn->storageDriver->volCreateXMLFrom (pool, xmldesc,
|
||||
clonevol, flags);
|
||||
if (!ret)
|
||||
goto error;
|
||||
return ret;
|
||||
}
|
||||
|
||||
virLibConnError (pool->conn, VIR_ERR_NO_SUPPORT, __FUNCTION__);
|
||||
|
||||
error:
|
||||
/* Copy to connection error object for back compatability */
|
||||
virSetConnError(pool->conn);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virStorageVolDelete:
|
||||
* @vol: pointer to storage volume
|
||||
@ -7009,8 +7068,6 @@ error:
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* virNodeNumOfDevices:
|
||||
* @conn: pointer to the hypervisor connection
|
||||
|
@ -265,3 +265,8 @@ LIBVIRT_0.6.3 {
|
||||
} LIBVIRT_0.6.1;
|
||||
|
||||
# .... define new API here using predicted next version number ....
|
||||
|
||||
LIBVIRT_0.6.4 {
|
||||
global:
|
||||
virStorageVolCreateXMLFrom;
|
||||
} LIBVIRT_0.6.3;
|
||||
|
Loading…
Reference in New Issue
Block a user