direct-io.hg

changeset 13691:66dda30190a2

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@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Jan 29 12:19:40 2007 +0000 (2007-01-29)
parents ae881e7b0c5e
children 090079c988d1
files docs/xen-api/xenapi-datamodel.tex tools/libxen/include/xen_vdi.h tools/libxen/src/xen_vdi.c tools/python/xen/xend/XendAPI.py tools/python/xen/xend/XendVDI.py
line diff
     1.1 --- a/docs/xen-api/xenapi-datamodel.tex	Mon Jan 29 12:11:13 2007 +0000
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Mon Jan 29 12:19:40 2007 +0000
     1.3 @@ -47,7 +47,6 @@ Fields that are bound together are shown
     1.4  
     1.5  \hline
     1.6  VDI.VBDs & VBD.VDI & many-to-one\\
     1.7 -VDI.parent & VDI.children & one-to-many\\
     1.8  VBD.VM & VM.VBDs & one-to-many\\
     1.9  VIF.VM & VM.VIFs & one-to-many\\
    1.10  VIF.network & network.VIFs & one-to-many\\
    1.11 @@ -7703,8 +7702,6 @@ Quals & Field & Type & Description \\
    1.12  $\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) \\
    1.13  $\mathit{RO}_\mathit{ins}$ &  {\tt sector\_size} & int & sector size of VDI (in bytes) \\
    1.14  $\mathit{RO}_\mathit{ins}$ &  {\tt type} & vdi\_type & type of the VDI \\
    1.15 -$\mathit{RO}_\mathit{ins}$ &  {\tt parent} & VDI ref & parent disk (e.g. in the case of copy on write) \\
    1.16 -$\mathit{RO}_\mathit{run}$ &  {\tt children} & (VDI ref) Set & child disks (e.g. in the case of copy on write) \\
    1.17  $\mathit{RW}$ &  {\tt sharable} & bool & true if this disk may be shared \\
    1.18  $\mathit{RW}$ &  {\tt read\_only} & bool & true if this disk may ONLY be mounted read-only \\
    1.19  \hline
    1.20 @@ -8200,70 +8197,6 @@ value of the field
    1.21  \vspace{0.3cm}
    1.22  \vspace{0.3cm}
    1.23  \vspace{0.3cm}
    1.24 -\subsubsection{RPC name:~get\_parent}
    1.25 -
    1.26 -{\bf Overview:} 
    1.27 -Get the parent field of the given VDI.
    1.28 -
    1.29 - \noindent {\bf Signature:} 
    1.30 -\begin{verbatim} (VDI ref) get_parent (session_id s, VDI ref self)\end{verbatim}
    1.31 -
    1.32 -
    1.33 -\noindent{\bf Arguments:}
    1.34 -
    1.35 - 
    1.36 -\vspace{0.3cm}
    1.37 -\begin{tabular}{|c|c|p{7cm}|}
    1.38 - \hline
    1.39 -{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.40 -{\tt VDI ref } & self & reference to the object \\ \hline 
    1.41 -
    1.42 -\end{tabular}
    1.43 -
    1.44 -\vspace{0.3cm}
    1.45 -
    1.46 - \noindent {\bf Return Type:} 
    1.47 -{\tt 
    1.48 -VDI ref
    1.49 -}
    1.50 -
    1.51 -
    1.52 -value of the field
    1.53 -\vspace{0.3cm}
    1.54 -\vspace{0.3cm}
    1.55 -\vspace{0.3cm}
    1.56 -\subsubsection{RPC name:~get\_children}
    1.57 -
    1.58 -{\bf Overview:} 
    1.59 -Get the children field of the given VDI.
    1.60 -
    1.61 - \noindent {\bf Signature:} 
    1.62 -\begin{verbatim} ((VDI ref) Set) get_children (session_id s, VDI ref self)\end{verbatim}
    1.63 -
    1.64 -
    1.65 -\noindent{\bf Arguments:}
    1.66 -
    1.67 - 
    1.68 -\vspace{0.3cm}
    1.69 -\begin{tabular}{|c|c|p{7cm}|}
    1.70 - \hline
    1.71 -{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.72 -{\tt VDI ref } & self & reference to the object \\ \hline 
    1.73 -
    1.74 -\end{tabular}
    1.75 -
    1.76 -\vspace{0.3cm}
    1.77 -
    1.78 - \noindent {\bf Return Type:} 
    1.79 -{\tt 
    1.80 -(VDI ref) Set
    1.81 -}
    1.82 -
    1.83 -
    1.84 -value of the field
    1.85 -\vspace{0.3cm}
    1.86 -\vspace{0.3cm}
    1.87 -\vspace{0.3cm}
    1.88  \subsubsection{RPC name:~get\_sharable}
    1.89  
    1.90  {\bf Overview:} 
     2.1 --- a/tools/libxen/include/xen_vdi.h	Mon Jan 29 12:11:13 2007 +0000
     2.2 +++ b/tools/libxen/include/xen_vdi.h	Mon Jan 29 12:19:40 2007 +0000
     2.3 @@ -27,8 +27,8 @@
     2.4  
     2.5  
     2.6  /*
     2.7 - * The VDI class. 
     2.8 - *  
     2.9 + * The VDI class.
    2.10 + * 
    2.11   * A virtual disk image.
    2.12   */
    2.13  
    2.14 @@ -73,8 +73,6 @@ typedef struct xen_vdi_record
    2.15      int64_t physical_utilisation;
    2.16      int64_t sector_size;
    2.17      enum xen_vdi_type type;
    2.18 -    struct xen_vdi_record_opt *parent;
    2.19 -    struct xen_vdi_record_opt_set *children;
    2.20      bool sharable;
    2.21      bool read_only;
    2.22  } xen_vdi_record;
    2.23 @@ -257,20 +255,6 @@ xen_vdi_get_type(xen_session *session, e
    2.24  
    2.25  
    2.26  /**
    2.27 - * Get the parent field of the given VDI.
    2.28 - */
    2.29 -extern bool
    2.30 -xen_vdi_get_parent(xen_session *session, xen_vdi *result, xen_vdi vdi);
    2.31 -
    2.32 -
    2.33 -/**
    2.34 - * Get the children field of the given VDI.
    2.35 - */
    2.36 -extern bool
    2.37 -xen_vdi_get_children(xen_session *session, struct xen_vdi_set **result, xen_vdi vdi);
    2.38 -
    2.39 -
    2.40 -/**
    2.41   * Get the sharable field of the given VDI.
    2.42   */
    2.43  extern bool
     3.1 --- a/tools/libxen/src/xen_vdi.c	Mon Jan 29 12:11:13 2007 +0000
     3.2 +++ b/tools/libxen/src/xen_vdi.c	Mon Jan 29 12:19:40 2007 +0000
     3.3 @@ -66,12 +66,6 @@ static const struct_member xen_vdi_recor
     3.4          { .key = "type",
     3.5            .type = &xen_vdi_type_abstract_type_,
     3.6            .offset = offsetof(xen_vdi_record, type) },
     3.7 -        { .key = "parent",
     3.8 -          .type = &abstract_type_ref,
     3.9 -          .offset = offsetof(xen_vdi_record, parent) },
    3.10 -        { .key = "children",
    3.11 -          .type = &abstract_type_ref_set,
    3.12 -          .offset = offsetof(xen_vdi_record, children) },
    3.13          { .key = "sharable",
    3.14            .type = &abstract_type_bool,
    3.15            .offset = offsetof(xen_vdi_record, sharable) },
    3.16 @@ -103,8 +97,6 @@ xen_vdi_record_free(xen_vdi_record *reco
    3.17      free(record->name_description);
    3.18      xen_sr_record_opt_free(record->sr);
    3.19      xen_vbd_record_opt_set_free(record->vbds);
    3.20 -    xen_vdi_record_opt_free(record->parent);
    3.21 -    xen_vdi_record_opt_set_free(record->children);
    3.22      free(record);
    3.23  }
    3.24  
    3.25 @@ -331,40 +323,6 @@ xen_vdi_get_type(xen_session *session, e
    3.26  
    3.27  
    3.28  bool
    3.29 -xen_vdi_get_parent(xen_session *session, xen_vdi *result, xen_vdi vdi)
    3.30 -{
    3.31 -    abstract_value param_values[] =
    3.32 -        {
    3.33 -            { .type = &abstract_type_string,
    3.34 -              .u.string_val = vdi }
    3.35 -        };
    3.36 -
    3.37 -    abstract_type result_type = abstract_type_string;
    3.38 -
    3.39 -    *result = NULL;
    3.40 -    XEN_CALL_("VDI.get_parent");
    3.41 -    return session->ok;
    3.42 -}
    3.43 -
    3.44 -
    3.45 -bool
    3.46 -xen_vdi_get_children(xen_session *session, struct xen_vdi_set **result, xen_vdi vdi)
    3.47 -{
    3.48 -    abstract_value param_values[] =
    3.49 -        {
    3.50 -            { .type = &abstract_type_string,
    3.51 -              .u.string_val = vdi }
    3.52 -        };
    3.53 -
    3.54 -    abstract_type result_type = abstract_type_string_set;
    3.55 -
    3.56 -    *result = NULL;
    3.57 -    XEN_CALL_("VDI.get_children");
    3.58 -    return session->ok;
    3.59 -}
    3.60 -
    3.61 -
    3.62 -bool
    3.63  xen_vdi_get_sharable(xen_session *session, bool *result, xen_vdi vdi)
    3.64  {
    3.65      abstract_value param_values[] =
     4.1 --- a/tools/python/xen/xend/XendAPI.py	Mon Jan 29 12:11:13 2007 +0000
     4.2 +++ b/tools/python/xen/xend/XendAPI.py	Mon Jan 29 12:19:40 2007 +0000
     4.3 @@ -1548,9 +1548,7 @@ class XendAPI(object):
     4.4      VDI_attr_ro = ['VBDs',
     4.5                     'physical_utilisation',
     4.6                     'sector_size',
     4.7 -                   'type',
     4.8 -                   'parent',
     4.9 -                   'children']
    4.10 +                   'type']
    4.11      VDI_attr_rw = ['name_label',
    4.12                     'name_description',
    4.13                     'SR',
    4.14 @@ -1579,12 +1577,6 @@ class XendAPI(object):
    4.15      def VDI_get_type(self, session, vdi_ref):
    4.16          return xen_api_success(self._get_VDI(vdi_ref).type)
    4.17      
    4.18 -    def VDI_get_parent(self, session, vdi_ref):
    4.19 -        return xen_api_success(self._get_VDI(vdi_ref).parent)        
    4.20 -    
    4.21 -    def VDI_get_children(self, session, vdi_ref):
    4.22 -        return xen_api_success(self._get_VDI(vdi_ref).children)        
    4.23 -    
    4.24      def VDI_get_name_label(self, session, vdi_ref):
    4.25          return xen_api_success(self._get_VDI(vdi_ref).name_label)
    4.26  
    4.27 @@ -1646,8 +1638,6 @@ class XendAPI(object):
    4.28              'physical_utilisation': image.physical_utilisation,
    4.29              'sector_size': image.sector_size,
    4.30              'type': image.type,
    4.31 -            'parent': image.parent,
    4.32 -            'children': image.children,
    4.33              'sharable': image.sharable,
    4.34              'read_only': image.read_only,
    4.35              })
     5.1 --- a/tools/python/xen/xend/XendVDI.py	Mon Jan 29 12:11:13 2007 +0000
     5.2 +++ b/tools/python/xen/xend/XendVDI.py	Mon Jan 29 12:19:40 2007 +0000
     5.3 @@ -57,8 +57,6 @@ class XendVDI(AutoSaveObject):
     5.4                   'sector_size',
     5.5                   'virtual_size',
     5.6                   'physical_utilisation',
     5.7 -                 'parent',
     5.8 -                 'children',
     5.9                   'sharable',
    5.10                   'read_only']
    5.11  
    5.12 @@ -72,8 +70,6 @@ class XendVDI(AutoSaveObject):
    5.13          self.sector_size = 1024
    5.14          self.virtual_size = 0
    5.15          self.physical_utilisation = 0
    5.16 -        self.parent = None
    5.17 -        self.children = []
    5.18          self.sharable = False
    5.19          self.read_only = False
    5.20          self.type = "system"
    5.21 @@ -148,8 +144,6 @@ class XendVDI(AutoSaveObject):
    5.22                  'virtual_size': self.virtual_size,
    5.23                  'physical_utilisation': self.physical_utilisation,
    5.24                  'sector_size': self.sector_size,
    5.25 -                'parent': None,
    5.26 -                'children': [],
    5.27                  'sharable': False,
    5.28                  'readonly': False,
    5.29                  'SR': self.sr_uuid,