[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Remove the VDI.parent and VDI.children fields -- this needs more thinking out,
# HG changeset patch # User Ewan Mellor <ewan@xxxxxxxxxxxxx> # Date 1170073180 0 # Node ID 66dda30190a2a9ac705166784871971cf3f4c1ad # Parent ae881e7b0c5ed3a784a89cffadfbd180081188e0 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 <ewan@xxxxxxxxxxxxx> --- docs/xen-api/xenapi-datamodel.tex | 67 -------------------------------------- tools/libxen/include/xen_vdi.h | 20 +---------- tools/libxen/src/xen_vdi.c | 42 ----------------------- tools/python/xen/xend/XendAPI.py | 12 ------ tools/python/xen/xend/XendVDI.py | 6 --- 5 files changed, 3 insertions(+), 144 deletions(-) diff -r ae881e7b0c5e -r 66dda30190a2 docs/xen-api/xenapi-datamodel.tex --- a/docs/xen-api/xenapi-datamodel.tex Mon Jan 29 12:11:13 2007 +0000 +++ b/docs/xen-api/xenapi-datamodel.tex Mon Jan 29 12:19:40 2007 +0000 @@ -47,7 +47,6 @@ Fields that are bound together are shown \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 @@ Quals & Field & Type & Description \\ $\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 @@ -8193,70 +8190,6 @@ Get the type field of the given VDI. \noindent {\bf Return Type:} {\tt 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 } diff -r ae881e7b0c5e -r 66dda30190a2 tools/libxen/include/xen_vdi.h --- a/tools/libxen/include/xen_vdi.h Mon Jan 29 12:11:13 2007 +0000 +++ b/tools/libxen/include/xen_vdi.h Mon Jan 29 12:19:40 2007 +0000 @@ -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; @@ -257,20 +255,6 @@ xen_vdi_get_type(xen_session *session, e /** - * 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. */ extern bool diff -r ae881e7b0c5e -r 66dda30190a2 tools/libxen/src/xen_vdi.c --- a/tools/libxen/src/xen_vdi.c Mon Jan 29 12:11:13 2007 +0000 +++ b/tools/libxen/src/xen_vdi.c Mon Jan 29 12:19:40 2007 +0000 @@ -66,12 +66,6 @@ static const struct_member xen_vdi_recor { .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 *reco 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); } @@ -331,40 +323,6 @@ xen_vdi_get_type(xen_session *session, e 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) { abstract_value param_values[] = diff -r ae881e7b0c5e -r 66dda30190a2 tools/python/xen/xend/XendAPI.py --- a/tools/python/xen/xend/XendAPI.py Mon Jan 29 12:11:13 2007 +0000 +++ b/tools/python/xen/xend/XendAPI.py Mon Jan 29 12:19:40 2007 +0000 @@ -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', @@ -1578,12 +1576,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 -r ae881e7b0c5e -r 66dda30190a2 tools/python/xen/xend/XendVDI.py --- a/tools/python/xen/xend/XendVDI.py Mon Jan 29 12:11:13 2007 +0000 +++ b/tools/python/xen/xend/XendVDI.py Mon Jan 29 12:19:40 2007 +0000 @@ -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, _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |