From: Ewan Mellor Date: Mon, 29 Jan 2007 12:19:40 +0000 (+0000) Subject: Remove the VDI.parent and VDI.children fields -- this needs more thinking out, X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15368^2~51 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8ed82355a0811ae23d8b5c98bf578d07d64e62bc;p=xen.git Remove the VDI.parent and VDI.children fields -- this needs more thinking out, and cannot be supported in this form. Signed-off-by: Ewan Mellor --- diff --git a/docs/xen-api/xenapi-datamodel.tex b/docs/xen-api/xenapi-datamodel.tex index 821ba54685..82fe147550 100644 --- a/docs/xen-api/xenapi-datamodel.tex +++ b/docs/xen-api/xenapi-datamodel.tex @@ -47,7 +47,6 @@ Fields that are bound together are shown in the following table: \hline VDI.VBDs & VBD.VDI & many-to-one\\ -VDI.parent & VDI.children & one-to-many\\ VBD.VM & VM.VBDs & one-to-many\\ VIF.VM & VM.VIFs & one-to-many\\ VIF.network & network.VIFs & one-to-many\\ @@ -7703,8 +7702,6 @@ $\mathit{RW}$ & {\tt virtual\_size} & int & size of disk as presented to the gu $\mathit{RO}_\mathit{run}$ & {\tt physical\_utilisation} & int & amount of physical space that the disk image is currently taking up on the storage repository (in bytes) \\ $\mathit{RO}_\mathit{ins}$ & {\tt sector\_size} & int & sector size of VDI (in bytes) \\ $\mathit{RO}_\mathit{ins}$ & {\tt type} & vdi\_type & type of the VDI \\ -$\mathit{RO}_\mathit{ins}$ & {\tt parent} & VDI ref & parent disk (e.g. in the case of copy on write) \\ -$\mathit{RO}_\mathit{run}$ & {\tt children} & (VDI ref) Set & child disks (e.g. in the case of copy on write) \\ $\mathit{RW}$ & {\tt sharable} & bool & true if this disk may be shared \\ $\mathit{RW}$ & {\tt read\_only} & bool & true if this disk may ONLY be mounted read-only \\ \hline @@ -8196,70 +8193,6 @@ vdi\_type } -value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~get\_parent} - -{\bf Overview:} -Get the parent field of the given VDI. - - \noindent {\bf Signature:} -\begin{verbatim} (VDI ref) get_parent (session_id s, VDI ref self)\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 } & self & reference to the object \\ \hline - -\end{tabular} - -\vspace{0.3cm} - - \noindent {\bf Return Type:} -{\tt -VDI ref -} - - -value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~get\_children} - -{\bf Overview:} -Get the children field of the given VDI. - - \noindent {\bf Signature:} -\begin{verbatim} ((VDI ref) Set) get_children (session_id s, VDI ref self)\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 } & self & reference to the object \\ \hline - -\end{tabular} - -\vspace{0.3cm} - - \noindent {\bf Return Type:} -{\tt -(VDI ref) Set -} - - value of the field \vspace{0.3cm} \vspace{0.3cm} diff --git a/tools/libxen/include/xen_vdi.h b/tools/libxen/include/xen_vdi.h index cfdbc6a61c..7478085464 100644 --- a/tools/libxen/include/xen_vdi.h +++ b/tools/libxen/include/xen_vdi.h @@ -27,8 +27,8 @@ /* - * The VDI class. - * + * The VDI class. + * * A virtual disk image. */ @@ -73,8 +73,6 @@ typedef struct xen_vdi_record int64_t physical_utilisation; int64_t sector_size; enum xen_vdi_type type; - struct xen_vdi_record_opt *parent; - struct xen_vdi_record_opt_set *children; bool sharable; bool read_only; } xen_vdi_record; @@ -256,20 +254,6 @@ extern bool xen_vdi_get_type(xen_session *session, enum xen_vdi_type *result, xen_vdi vdi); -/** - * Get the parent field of the given VDI. - */ -extern bool -xen_vdi_get_parent(xen_session *session, xen_vdi *result, xen_vdi vdi); - - -/** - * Get the children field of the given VDI. - */ -extern bool -xen_vdi_get_children(xen_session *session, struct xen_vdi_set **result, xen_vdi vdi); - - /** * Get the sharable field of the given VDI. */ diff --git a/tools/libxen/src/xen_vdi.c b/tools/libxen/src/xen_vdi.c index a8d157d232..ea15c408d2 100644 --- a/tools/libxen/src/xen_vdi.c +++ b/tools/libxen/src/xen_vdi.c @@ -66,12 +66,6 @@ static const struct_member xen_vdi_record_struct_members[] = { .key = "type", .type = &xen_vdi_type_abstract_type_, .offset = offsetof(xen_vdi_record, type) }, - { .key = "parent", - .type = &abstract_type_ref, - .offset = offsetof(xen_vdi_record, parent) }, - { .key = "children", - .type = &abstract_type_ref_set, - .offset = offsetof(xen_vdi_record, children) }, { .key = "sharable", .type = &abstract_type_bool, .offset = offsetof(xen_vdi_record, sharable) }, @@ -103,8 +97,6 @@ xen_vdi_record_free(xen_vdi_record *record) free(record->name_description); xen_sr_record_opt_free(record->sr); xen_vbd_record_opt_set_free(record->vbds); - xen_vdi_record_opt_free(record->parent); - xen_vdi_record_opt_set_free(record->children); free(record); } @@ -330,40 +322,6 @@ xen_vdi_get_type(xen_session *session, enum xen_vdi_type *result, xen_vdi vdi) } -bool -xen_vdi_get_parent(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.get_parent"); - return session->ok; -} - - -bool -xen_vdi_get_children(xen_session *session, struct xen_vdi_set **result, xen_vdi vdi) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vdi } - }; - - abstract_type result_type = abstract_type_string_set; - - *result = NULL; - XEN_CALL_("VDI.get_children"); - return session->ok; -} - - bool xen_vdi_get_sharable(xen_session *session, bool *result, xen_vdi vdi) { diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index 98377d9396..972c2b230b 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -1548,9 +1548,7 @@ class XendAPI(object): VDI_attr_ro = ['VBDs', 'physical_utilisation', 'sector_size', - 'type', - 'parent', - 'children'] + 'type'] VDI_attr_rw = ['name_label', 'name_description', 'SR', @@ -1579,12 +1577,6 @@ class XendAPI(object): def VDI_get_type(self, session, vdi_ref): return xen_api_success(self._get_VDI(vdi_ref).type) - def VDI_get_parent(self, session, vdi_ref): - return xen_api_success(self._get_VDI(vdi_ref).parent) - - def VDI_get_children(self, session, vdi_ref): - return xen_api_success(self._get_VDI(vdi_ref).children) - def VDI_get_name_label(self, session, vdi_ref): return xen_api_success(self._get_VDI(vdi_ref).name_label) @@ -1646,8 +1638,6 @@ class XendAPI(object): 'physical_utilisation': image.physical_utilisation, 'sector_size': image.sector_size, 'type': image.type, - 'parent': image.parent, - 'children': image.children, 'sharable': image.sharable, 'read_only': image.read_only, }) diff --git a/tools/python/xen/xend/XendVDI.py b/tools/python/xen/xend/XendVDI.py index f1ea99e26b..0868814c8f 100644 --- a/tools/python/xen/xend/XendVDI.py +++ b/tools/python/xen/xend/XendVDI.py @@ -57,8 +57,6 @@ class XendVDI(AutoSaveObject): 'sector_size', 'virtual_size', 'physical_utilisation', - 'parent', - 'children', 'sharable', 'read_only'] @@ -72,8 +70,6 @@ class XendVDI(AutoSaveObject): self.sector_size = 1024 self.virtual_size = 0 self.physical_utilisation = 0 - self.parent = None - self.children = [] self.sharable = False self.read_only = False self.type = "system" @@ -148,8 +144,6 @@ class XendVDI(AutoSaveObject): 'virtual_size': self.virtual_size, 'physical_utilisation': self.physical_utilisation, 'sector_size': self.sector_size, - 'parent': None, - 'children': [], 'sharable': False, 'readonly': False, 'SR': self.sr_uuid,