\hline
\end{longtable}
\subsection{RPCs associated with class: VDI}
-\subsubsection{RPC name:~snapshot}
-
-{\bf Overview:}
-Take an exact copy of the VDI; the snapshot lives in the same Storage
-Repository as its parent.
-
- \noindent {\bf Signature:}
-\begin{verbatim} (VDI ref) snapshot (session_id s, VDI ref vdi)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & vdi & The VDI to snapshot \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-VDI ref
-}
-
-
-The ID of the newly created VDI.
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~resize}
-
-{\bf Overview:}
-Resize the vdi to the size.
-
- \noindent {\bf Signature:}
-\begin{verbatim} void resize (session_id s, VDI ref vdi, int size)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & vdi & The VDI to resize \\ \hline
-
-{\tt int } & size & The new size of the VDI \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
\subsubsection{RPC name:~get\_all}
{\bf Overview:}
xen_vdi_remove_from_other_config(xen_session *session, xen_vdi vdi, char *key);
-/**
- * Take an exact copy of the VDI; the snapshot lives in the same
- * Storage Repository as its parent.
- */
-extern bool
-xen_vdi_snapshot(xen_session *session, xen_vdi *result, xen_vdi vdi);
-
-
-/**
- * Resize the vdi to the size.
- */
-extern bool
-xen_vdi_resize(xen_session *session, xen_vdi vdi, int64_t size);
-
-
/**
* Return a list of all the VDIs known to the system.
*/
}
-bool
-xen_vdi_snapshot(xen_session *session, xen_vdi *result, xen_vdi vdi)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = vdi }
- };
-
- abstract_type result_type = abstract_type_string;
-
- *result = NULL;
- XEN_CALL_("VDI.snapshot");
- return session->ok;
-}
-
-
-bool
-xen_vdi_resize(xen_session *session, xen_vdi vdi, int64_t size)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = vdi },
- { .type = &abstract_type_int,
- .u.int_val = size }
- };
-
- xen_call_(session, "VDI.resize", param_values, 2, NULL, NULL);
- return session->ok;
-}
-
-
bool
xen_vdi_get_all(xen_session *session, struct xen_vdi_set **result)
{
'other_config']
VDI_attr_inst = VDI_attr_ro + VDI_attr_rw
- VDI_methods = [('snapshot', 'VDI'), ('destroy', None)]
+ VDI_methods = [('destroy', None)]
VDI_funcs = [('create', 'VDI'),
('get_by_name_label', 'Set(VDI)')]
return xen_api_success_void()
# Object Methods
- def VDI_snapshot(self, session, vdi_ref):
- return xen_api_todo()
def VDI_destroy(self, session, vdi_ref):
sr = XendNode.instance().get_sr_containing_vdi(vdi_ref)