ia64/xen-unstable

changeset 13715:bb15af2c2b4a

Remove VBD.driver, VIF.type, VIF.name, VTPM.driver. This modelling was never
correct, and the values are best left implicit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Jan 29 00:05:40 2007 +0000 (2007-01-29)
parents 9db1847845d6
children ae881e7b0c5e
files docs/xen-api/xenapi-datamodel.tex tools/libxen/include/xen_driver_type.h tools/libxen/include/xen_driver_type_internal.h tools/libxen/include/xen_vbd.h tools/libxen/include/xen_vif.h tools/libxen/include/xen_vtpm.h tools/libxen/src/xen_driver_type.c tools/libxen/src/xen_vbd.c tools/libxen/src/xen_vif.c tools/libxen/src/xen_vtpm.c tools/libxen/test/test_bindings.c tools/python/xen/xend/XendAPI.py
line diff
     1.1 --- a/docs/xen-api/xenapi-datamodel.tex	Sun Jan 28 23:07:37 2007 +0000
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Mon Jan 29 00:05:40 2007 +0000
     1.3 @@ -273,16 +273,6 @@ The following enumeration types are used
     1.4  \end{longtable}
     1.5  
     1.6  \vspace{1cm}
     1.7 -\begin{longtable}{|ll|}
     1.8 -\hline
     1.9 -{\tt enum driver\_type} & \\
    1.10 -\hline
    1.11 -\hspace{0.5cm}{\tt ioemu} & use hardware emulation \\
    1.12 -\hspace{0.5cm}{\tt paravirtualised} & use paravirtualised driver \\
    1.13 -\hline
    1.14 -\end{longtable}
    1.15 -
    1.16 -\vspace{1cm}
    1.17  
    1.18  \newpage
    1.19  \section{Class: session}
    1.20 @@ -5807,8 +5797,6 @@ references to objects with match names
    1.21  Quals & Field & Type & Description \\
    1.22  \hline
    1.23  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
    1.24 -$\mathit{RW}$ &  {\tt name} & string & human-readable name of the interface \\
    1.25 -$\mathit{RW}$ &  {\tt type} & driver\_type & interface type \\
    1.26  $\mathit{RW}$ &  {\tt device} & string & name of network device as exposed to guest e.g. eth0 \\
    1.27  $\mathit{RW}$ &  {\tt network} & network ref & virtual network to which this vif is connected \\
    1.28  $\mathit{RW}$ &  {\tt VM} & VM ref & virtual machine to which this vif is connected \\
    1.29 @@ -5917,72 +5905,6 @@ void
    1.30  \vspace{0.3cm}
    1.31  \vspace{0.3cm}
    1.32  \vspace{0.3cm}
    1.33 -\subsubsection{RPC name:~get\_type}
    1.34 -
    1.35 -{\bf Overview:} 
    1.36 -Get the type field of the given VIF.
    1.37 -
    1.38 - \noindent {\bf Signature:} 
    1.39 -\begin{verbatim} (driver_type) get_type (session_id s, VIF ref self)\end{verbatim}
    1.40 -
    1.41 -
    1.42 -\noindent{\bf Arguments:}
    1.43 -
    1.44 - 
    1.45 -\vspace{0.3cm}
    1.46 -\begin{tabular}{|c|c|p{7cm}|}
    1.47 - \hline
    1.48 -{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.49 -{\tt VIF ref } & self & reference to the object \\ \hline 
    1.50 -
    1.51 -\end{tabular}
    1.52 -
    1.53 -\vspace{0.3cm}
    1.54 -
    1.55 - \noindent {\bf Return Type:} 
    1.56 -{\tt 
    1.57 -driver\_type
    1.58 -}
    1.59 -
    1.60 -
    1.61 -value of the field
    1.62 -\vspace{0.3cm}
    1.63 -\vspace{0.3cm}
    1.64 -\vspace{0.3cm}
    1.65 -\subsubsection{RPC name:~set\_type}
    1.66 -
    1.67 -{\bf Overview:} 
    1.68 -Set the type field of the given VIF.
    1.69 -
    1.70 - \noindent {\bf Signature:} 
    1.71 -\begin{verbatim} void set_type (session_id s, VIF ref self, driver_type value)\end{verbatim}
    1.72 -
    1.73 -
    1.74 -\noindent{\bf Arguments:}
    1.75 -
    1.76 - 
    1.77 -\vspace{0.3cm}
    1.78 -\begin{tabular}{|c|c|p{7cm}|}
    1.79 - \hline
    1.80 -{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.81 -{\tt VIF ref } & self & reference to the object \\ \hline 
    1.82 -
    1.83 -{\tt driver\_type } & value & New value to set \\ \hline 
    1.84 -
    1.85 -\end{tabular}
    1.86 -
    1.87 -\vspace{0.3cm}
    1.88 -
    1.89 - \noindent {\bf Return Type:} 
    1.90 -{\tt 
    1.91 -void
    1.92 -}
    1.93 -
    1.94 -
    1.95 -
    1.96 -\vspace{0.3cm}
    1.97 -\vspace{0.3cm}
    1.98 -\vspace{0.3cm}
    1.99  \subsubsection{RPC name:~get\_device}
   1.100  
   1.101  {\bf Overview:} 
   1.102 @@ -8652,7 +8574,6 @@ Quals & Field & Type & Description \\
   1.103  $\mathit{RW}$ &  {\tt bootable} & bool & true if this VBD is bootable \\
   1.104  $\mathit{RW}$ &  {\tt mode} & vbd\_mode & the mode the VBD should be mounted with \\
   1.105  $\mathit{RW}$ &  {\tt type} & vbd\_type & how the VBD will appear to the guest (e.g. disk or CD) \\
   1.106 -$\mathit{RW}$ &  {\tt driver} & driver\_type & the style of driver \\
   1.107  $\mathit{RO}_\mathit{run}$ &  {\tt io/read\_kbs} & float & Read bandwidth (KiB/s) \\
   1.108  $\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB/s) \\
   1.109  \hline
   1.110 @@ -9120,72 +9041,6 @@ void
   1.111  \vspace{0.3cm}
   1.112  \vspace{0.3cm}
   1.113  \vspace{0.3cm}
   1.114 -\subsubsection{RPC name:~get\_driver}
   1.115 -
   1.116 -{\bf Overview:} 
   1.117 -Get the driver field of the given VBD.
   1.118 -
   1.119 - \noindent {\bf Signature:} 
   1.120 -\begin{verbatim} (driver_type) get_driver (session_id s, VBD ref self)\end{verbatim}
   1.121 -
   1.122 -
   1.123 -\noindent{\bf Arguments:}
   1.124 -
   1.125 - 
   1.126 -\vspace{0.3cm}
   1.127 -\begin{tabular}{|c|c|p{7cm}|}
   1.128 - \hline
   1.129 -{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.130 -{\tt VBD ref } & self & reference to the object \\ \hline 
   1.131 -
   1.132 -\end{tabular}
   1.133 -
   1.134 -\vspace{0.3cm}
   1.135 -
   1.136 - \noindent {\bf Return Type:} 
   1.137 -{\tt 
   1.138 -driver\_type
   1.139 -}
   1.140 -
   1.141 -
   1.142 -value of the field
   1.143 -\vspace{0.3cm}
   1.144 -\vspace{0.3cm}
   1.145 -\vspace{0.3cm}
   1.146 -\subsubsection{RPC name:~set\_driver}
   1.147 -
   1.148 -{\bf Overview:} 
   1.149 -Set the driver field of the given VBD.
   1.150 -
   1.151 - \noindent {\bf Signature:} 
   1.152 -\begin{verbatim} void set_driver (session_id s, VBD ref self, driver_type value)\end{verbatim}
   1.153 -
   1.154 -
   1.155 -\noindent{\bf Arguments:}
   1.156 -
   1.157 - 
   1.158 -\vspace{0.3cm}
   1.159 -\begin{tabular}{|c|c|p{7cm}|}
   1.160 - \hline
   1.161 -{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.162 -{\tt VBD ref } & self & reference to the object \\ \hline 
   1.163 -
   1.164 -{\tt driver\_type } & value & New value to set \\ \hline 
   1.165 -
   1.166 -\end{tabular}
   1.167 -
   1.168 -\vspace{0.3cm}
   1.169 -
   1.170 - \noindent {\bf Return Type:} 
   1.171 -{\tt 
   1.172 -void
   1.173 -}
   1.174 -
   1.175 -
   1.176 -
   1.177 -\vspace{0.3cm}
   1.178 -\vspace{0.3cm}
   1.179 -\vspace{0.3cm}
   1.180  \subsubsection{RPC name:~get\_io\_read\_kbs}
   1.181  
   1.182  {\bf Overview:} 
   1.183 @@ -9393,7 +9248,6 @@ Quals & Field & Type & Description \\
   1.184  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
   1.185  $\mathit{RO}_\mathit{ins}$ &  {\tt VM} & VM ref & the virtual machine \\
   1.186  $\mathit{RO}_\mathit{ins}$ &  {\tt backend} & VM ref & the domain where the backend is located \\
   1.187 -$\mathit{RO}_\mathit{ins}$ &  {\tt driver} & driver\_type & the style of driver \\
   1.188  $\mathit{RO}_\mathit{ins}$ &  {\tt instance} & int & the instance number the virtual TPM represents \\
   1.189  \hline
   1.190  \end{longtable}
   1.191 @@ -9494,38 +9348,6 @@ value of the field
   1.192  \vspace{0.3cm}
   1.193  \vspace{0.3cm}
   1.194  \vspace{0.3cm}
   1.195 -\subsubsection{RPC name:~get\_driver}
   1.196 -
   1.197 -{\bf Overview:} 
   1.198 -Get the driver field of the given VTPM.
   1.199 -
   1.200 - \noindent {\bf Signature:} 
   1.201 -\begin{verbatim} (driver_type) get_driver (session_id s, VTPM ref self)\end{verbatim}
   1.202 -
   1.203 -
   1.204 -\noindent{\bf Arguments:}
   1.205 -
   1.206 - 
   1.207 -\vspace{0.3cm}
   1.208 -\begin{tabular}{|c|c|p{7cm}|}
   1.209 - \hline
   1.210 -{\bf type} & {\bf name} & {\bf description} \\ \hline
   1.211 -{\tt VTPM ref } & self & reference to the object \\ \hline 
   1.212 -
   1.213 -\end{tabular}
   1.214 -
   1.215 -\vspace{0.3cm}
   1.216 -
   1.217 - \noindent {\bf Return Type:} 
   1.218 -{\tt 
   1.219 -driver\_type
   1.220 -}
   1.221 -
   1.222 -
   1.223 -value of the field
   1.224 -\vspace{0.3cm}
   1.225 -\vspace{0.3cm}
   1.226 -\vspace{0.3cm}
   1.227  \subsubsection{RPC name:~get\_instance}
   1.228  
   1.229  {\bf Overview:} 
     2.1 --- a/tools/libxen/include/xen_driver_type.h	Sun Jan 28 23:07:37 2007 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,77 +0,0 @@
     2.4 -/*
     2.5 - * Copyright (c) 2006, XenSource Inc.
     2.6 - *
     2.7 - * This library is free software; you can redistribute it and/or
     2.8 - * modify it under the terms of the GNU Lesser General Public
     2.9 - * License as published by the Free Software Foundation; either
    2.10 - * version 2.1 of the License, or (at your option) any later version.
    2.11 - *
    2.12 - * This library is distributed in the hope that it will be useful,
    2.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    2.15 - * Lesser General Public License for more details.
    2.16 - *
    2.17 - * You should have received a copy of the GNU Lesser General Public
    2.18 - * License along with this library; if not, write to the Free Software
    2.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
    2.20 - */
    2.21 -
    2.22 -#ifndef XEN_DRIVER_TYPE_H
    2.23 -#define XEN_DRIVER_TYPE_H
    2.24 -
    2.25 -
    2.26 -#include "xen_common.h"
    2.27 -
    2.28 -
    2.29 -enum xen_driver_type
    2.30 -{
    2.31 -    /**
    2.32 -     * use hardware emulation
    2.33 -     */
    2.34 -    XEN_DRIVER_TYPE_IOEMU,
    2.35 -
    2.36 -    /**
    2.37 -     * use paravirtualised driver
    2.38 -     */
    2.39 -    XEN_DRIVER_TYPE_PARAVIRTUALISED
    2.40 -};
    2.41 -
    2.42 -
    2.43 -typedef struct xen_driver_type_set
    2.44 -{
    2.45 -    size_t size;
    2.46 -    enum xen_driver_type contents[];
    2.47 -} xen_driver_type_set;
    2.48 -
    2.49 -/**
    2.50 - * Allocate a xen_driver_type_set of the given size.
    2.51 - */
    2.52 -extern xen_driver_type_set *
    2.53 -xen_driver_type_set_alloc(size_t size);
    2.54 -
    2.55 -/**
    2.56 - * Free the given xen_driver_type_set.  The given set must have been
    2.57 - * allocated by this library.
    2.58 - */
    2.59 -extern void
    2.60 -xen_driver_type_set_free(xen_driver_type_set *set);
    2.61 -
    2.62 -
    2.63 -/**
    2.64 - * Return the name corresponding to the given code.  This string must
    2.65 - * not be modified or freed.
    2.66 - */
    2.67 -extern const char *
    2.68 -xen_driver_type_to_string(enum xen_driver_type val);
    2.69 -
    2.70 -
    2.71 -/**
    2.72 - * Return the correct code for the given string, or set the session
    2.73 - * object to failure and return an undefined value if the given string does
    2.74 - * not match a known code.
    2.75 - */
    2.76 -extern enum xen_driver_type
    2.77 -xen_driver_type_from_string(xen_session *session, const char *str);
    2.78 -
    2.79 -
    2.80 -#endif
     3.1 --- a/tools/libxen/include/xen_driver_type_internal.h	Sun Jan 28 23:07:37 2007 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,37 +0,0 @@
     3.4 -/*
     3.5 - * Copyright (c) 2006, XenSource Inc.
     3.6 - *
     3.7 - * This library is free software; you can redistribute it and/or
     3.8 - * modify it under the terms of the GNU Lesser General Public
     3.9 - * License as published by the Free Software Foundation; either
    3.10 - * version 2.1 of the License, or (at your option) any later version.
    3.11 - *
    3.12 - * This library is distributed in the hope that it will be useful,
    3.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    3.15 - * Lesser General Public License for more details.
    3.16 - *
    3.17 - * You should have received a copy of the GNU Lesser General Public
    3.18 - * License along with this library; if not, write to the Free Software
    3.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
    3.20 - */
    3.21 -
    3.22 -
    3.23 -/*
    3.24 - * Declarations of the abstract types used during demarshalling of enum
    3.25 - * xen_driver_type.  Internal to this library -- do not use from outside.
    3.26 - */
    3.27 -
    3.28 -
    3.29 -#ifndef XEN_DRIVER_TYPE_INTERNAL_H
    3.30 -#define XEN_DRIVER_TYPE_INTERNAL_H
    3.31 -
    3.32 -
    3.33 -#include "xen_internal.h"
    3.34 -
    3.35 -
    3.36 -extern const abstract_type xen_driver_type_abstract_type_;
    3.37 -extern const abstract_type xen_driver_type_set_abstract_type_;
    3.38 -
    3.39 -
    3.40 -#endif
     4.1 --- a/tools/libxen/include/xen_vbd.h	Sun Jan 28 23:07:37 2007 +0000
     4.2 +++ b/tools/libxen/include/xen_vbd.h	Mon Jan 29 00:05:40 2007 +0000
     4.3 @@ -20,7 +20,6 @@
     4.4  #define XEN_VBD_H
     4.5  
     4.6  #include "xen_common.h"
     4.7 -#include "xen_driver_type.h"
     4.8  #include "xen_vbd_decl.h"
     4.9  #include "xen_vbd_mode.h"
    4.10  #include "xen_vdi_decl.h"
    4.11 @@ -28,8 +27,8 @@
    4.12  
    4.13  
    4.14  /*
    4.15 - * The VBD class. 
    4.16 - *  
    4.17 + * The VBD class.
    4.18 + * 
    4.19   * A virtual block device.
    4.20   */
    4.21  
    4.22 @@ -72,7 +71,6 @@ typedef struct xen_vbd_record
    4.23      char *image;
    4.24      bool bootable;
    4.25      enum xen_vbd_mode mode;
    4.26 -    enum xen_driver_type driver;
    4.27      double io_read_kbs;
    4.28      double io_write_kbs;
    4.29  } xen_vbd_record;
    4.30 @@ -227,13 +225,6 @@ xen_vbd_get_mode(xen_session *session, e
    4.31  
    4.32  
    4.33  /**
    4.34 - * Get the driver field of the given VBD.
    4.35 - */
    4.36 -extern bool
    4.37 -xen_vbd_get_driver(xen_session *session, enum xen_driver_type *result, xen_vbd vbd);
    4.38 -
    4.39 -
    4.40 -/**
    4.41   * Get the io/read_kbs field of the given VBD.
    4.42   */
    4.43  extern bool
    4.44 @@ -283,13 +274,6 @@ xen_vbd_set_mode(xen_session *session, x
    4.45  
    4.46  
    4.47  /**
    4.48 - * Set the driver field of the given VBD.
    4.49 - */
    4.50 -extern bool
    4.51 -xen_vbd_set_driver(xen_session *session, xen_vbd vbd, enum xen_driver_type driver);
    4.52 -
    4.53 -
    4.54 -/**
    4.55   * Change the media in the device for CDROM-like devices only. For
    4.56   * other devices, detach the VBD and attach a new one
    4.57   */
     5.1 --- a/tools/libxen/include/xen_vif.h	Sun Jan 28 23:07:37 2007 +0000
     5.2 +++ b/tools/libxen/include/xen_vif.h	Mon Jan 29 00:05:40 2007 +0000
     5.3 @@ -20,15 +20,14 @@
     5.4  #define XEN_VIF_H
     5.5  
     5.6  #include "xen_common.h"
     5.7 -#include "xen_driver_type.h"
     5.8  #include "xen_network_decl.h"
     5.9  #include "xen_vif_decl.h"
    5.10  #include "xen_vm_decl.h"
    5.11  
    5.12  
    5.13  /*
    5.14 - * The VIF class. 
    5.15 - *  
    5.16 + * The VIF class.
    5.17 + * 
    5.18   * A virtual network interface.
    5.19   */
    5.20  
    5.21 @@ -65,8 +64,6 @@ typedef struct xen_vif_record
    5.22  {
    5.23      xen_vif handle;
    5.24      char *uuid;
    5.25 -    char *name;
    5.26 -    enum xen_driver_type type;
    5.27      char *device;
    5.28      struct xen_network_record_opt *network;
    5.29      struct xen_vm_record_opt *vm;
    5.30 @@ -191,20 +188,6 @@ xen_vif_get_uuid(xen_session *session, c
    5.31  
    5.32  
    5.33  /**
    5.34 - * Get the name field of the given VIF.
    5.35 - */
    5.36 -extern bool
    5.37 -xen_vif_get_name(xen_session *session, char **result, xen_vif vif);
    5.38 -
    5.39 -
    5.40 -/**
    5.41 - * Get the type field of the given VIF.
    5.42 - */
    5.43 -extern bool
    5.44 -xen_vif_get_type(xen_session *session, enum xen_driver_type *result, xen_vif vif);
    5.45 -
    5.46 -
    5.47 -/**
    5.48   * Get the device field of the given VIF.
    5.49   */
    5.50  extern bool
    5.51 @@ -254,20 +237,6 @@ xen_vif_get_io_write_kbs(xen_session *se
    5.52  
    5.53  
    5.54  /**
    5.55 - * Set the name field of the given VIF.
    5.56 - */
    5.57 -extern bool
    5.58 -xen_vif_set_name(xen_session *session, xen_vif vif, char *name);
    5.59 -
    5.60 -
    5.61 -/**
    5.62 - * Set the type field of the given VIF.
    5.63 - */
    5.64 -extern bool
    5.65 -xen_vif_set_type(xen_session *session, xen_vif vif, enum xen_driver_type type);
    5.66 -
    5.67 -
    5.68 -/**
    5.69   * Set the device field of the given VIF.
    5.70   */
    5.71  extern bool
     6.1 --- a/tools/libxen/include/xen_vtpm.h	Sun Jan 28 23:07:37 2007 +0000
     6.2 +++ b/tools/libxen/include/xen_vtpm.h	Mon Jan 29 00:05:40 2007 +0000
     6.3 @@ -21,7 +21,6 @@
     6.4  #define XEN_VTPM_H
     6.5  
     6.6  #include "xen_common.h"
     6.7 -#include "xen_driver_type.h"
     6.8  #include "xen_vm_decl.h"
     6.9  #include "xen_vtpm_decl.h"
    6.10  
    6.11 @@ -67,7 +66,6 @@ typedef struct xen_vtpm_record
    6.12      char *uuid;
    6.13      struct xen_vm_record_opt *vm;
    6.14      struct xen_vm_record_opt *backend;
    6.15 -    enum xen_driver_type driver;
    6.16      int64_t instance;
    6.17  } xen_vtpm_record;
    6.18  
    6.19 @@ -200,13 +198,6 @@ xen_vtpm_get_backend(xen_session *sessio
    6.20  
    6.21  
    6.22  /**
    6.23 - * Get the driver field of the given VTPM.
    6.24 - */
    6.25 -extern bool
    6.26 -xen_vtpm_get_driver(xen_session *session, enum xen_driver_type *result, xen_vtpm vtpm);
    6.27 -
    6.28 -
    6.29 -/**
    6.30   * Get the instance field of the given VTPM.
    6.31   */
    6.32  extern bool
     7.1 --- a/tools/libxen/src/xen_driver_type.c	Sun Jan 28 23:07:37 2007 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,81 +0,0 @@
     7.4 -/*
     7.5 - * Copyright (c) 2006, XenSource Inc.
     7.6 - *
     7.7 - * This library is free software; you can redistribute it and/or
     7.8 - * modify it under the terms of the GNU Lesser General Public
     7.9 - * License as published by the Free Software Foundation; either
    7.10 - * version 2.1 of the License, or (at your option) any later version.
    7.11 - *
    7.12 - * This library is distributed in the hope that it will be useful,
    7.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    7.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    7.15 - * Lesser General Public License for more details.
    7.16 - *
    7.17 - * You should have received a copy of the GNU Lesser General Public
    7.18 - * License along with this library; if not, write to the Free Software
    7.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
    7.20 - */
    7.21 -
    7.22 -#include <string.h>
    7.23 -
    7.24 -#include "xen_internal.h"
    7.25 -#include "xen_driver_type.h"
    7.26 -#include "xen_driver_type_internal.h"
    7.27 -
    7.28 -
    7.29 -/*
    7.30 - * Maintain this in the same order as the enum declaration!
    7.31 - */
    7.32 -static const char *lookup_table[] =
    7.33 -{
    7.34 -    "ioemu",
    7.35 -    "paravirtualised"
    7.36 -};
    7.37 -
    7.38 -
    7.39 -extern xen_driver_type_set *
    7.40 -xen_driver_type_set_alloc(size_t size)
    7.41 -{
    7.42 -    return calloc(1, sizeof(xen_driver_type_set) +
    7.43 -                  size * sizeof(enum xen_driver_type));
    7.44 -}
    7.45 -
    7.46 -
    7.47 -extern void
    7.48 -xen_driver_type_set_free(xen_driver_type_set *set)
    7.49 -{
    7.50 -    free(set);
    7.51 -}
    7.52 -
    7.53 -
    7.54 -const char *
    7.55 -xen_driver_type_to_string(enum xen_driver_type val)
    7.56 -{
    7.57 -    return lookup_table[val];
    7.58 -}
    7.59 -
    7.60 -
    7.61 -extern enum xen_driver_type
    7.62 -xen_driver_type_from_string(xen_session *session, const char *str)
    7.63 -{
    7.64 -    return ENUM_LOOKUP(session, str, lookup_table);
    7.65 -}
    7.66 -
    7.67 -
    7.68 -const abstract_type xen_driver_type_abstract_type_ =
    7.69 -    {
    7.70 -        .typename = ENUM,
    7.71 -        .enum_marshaller =
    7.72 -             (const char *(*)(int))&xen_driver_type_to_string,
    7.73 -        .enum_demarshaller =
    7.74 -             (int (*)(xen_session *, const char *))&xen_driver_type_from_string
    7.75 -    };
    7.76 -
    7.77 -
    7.78 -const abstract_type xen_driver_type_set_abstract_type_ =
    7.79 -    {
    7.80 -        .typename = SET,
    7.81 -        .child = &xen_driver_type_abstract_type_
    7.82 -    };
    7.83 -
    7.84 -
     8.1 --- a/tools/libxen/src/xen_vbd.c	Sun Jan 28 23:07:37 2007 +0000
     8.2 +++ b/tools/libxen/src/xen_vbd.c	Mon Jan 29 00:05:40 2007 +0000
     8.3 @@ -21,7 +21,6 @@
     8.4  #include <stdlib.h>
     8.5  
     8.6  #include "xen_common.h"
     8.7 -#include "xen_driver_type_internal.h"
     8.8  #include "xen_internal.h"
     8.9  #include "xen_vbd.h"
    8.10  #include "xen_vbd_mode_internal.h"
    8.11 @@ -61,9 +60,6 @@ static const struct_member xen_vbd_recor
    8.12          { .key = "mode",
    8.13            .type = &xen_vbd_mode_abstract_type_,
    8.14            .offset = offsetof(xen_vbd_record, mode) },
    8.15 -        { .key = "driver",
    8.16 -          .type = &xen_driver_type_abstract_type_,
    8.17 -          .offset = offsetof(xen_vbd_record, driver) },
    8.18          { .key = "io_read_kbs",
    8.19            .type = &abstract_type_float,
    8.20            .offset = offsetof(xen_vbd_record, io_read_kbs) },
    8.21 @@ -254,23 +250,6 @@ xen_vbd_get_mode(xen_session *session, e
    8.22  
    8.23  
    8.24  bool
    8.25 -xen_vbd_get_driver(xen_session *session, enum xen_driver_type *result, xen_vbd vbd)
    8.26 -{
    8.27 -    abstract_value param_values[] =
    8.28 -        {
    8.29 -            { .type = &abstract_type_string,
    8.30 -              .u.string_val = vbd }
    8.31 -        };
    8.32 -
    8.33 -    abstract_type result_type = xen_driver_type_abstract_type_;
    8.34 -    char *result_str = NULL;
    8.35 -    XEN_CALL_("VBD.get_driver");
    8.36 -    *result = xen_driver_type_from_string(session, result_str);
    8.37 -    return session->ok;
    8.38 -}
    8.39 -
    8.40 -
    8.41 -bool
    8.42  xen_vbd_get_io_read_kbs(xen_session *session, double *result, xen_vbd vbd)
    8.43  {
    8.44      abstract_value param_values[] =
    8.45 @@ -383,22 +362,6 @@ xen_vbd_set_mode(xen_session *session, x
    8.46  
    8.47  
    8.48  bool
    8.49 -xen_vbd_set_driver(xen_session *session, xen_vbd vbd, enum xen_driver_type driver)
    8.50 -{
    8.51 -    abstract_value param_values[] =
    8.52 -        {
    8.53 -            { .type = &abstract_type_string,
    8.54 -              .u.string_val = vbd },
    8.55 -            { .type = &xen_driver_type_abstract_type_,
    8.56 -              .u.string_val = xen_driver_type_to_string(driver) }
    8.57 -        };
    8.58 -
    8.59 -    xen_call_(session, "VBD.set_driver", param_values, 2, NULL, NULL);
    8.60 -    return session->ok;
    8.61 -}
    8.62 -
    8.63 -
    8.64 -bool
    8.65  xen_vbd_media_change(xen_session *session, xen_vbd vbd, xen_vdi vdi)
    8.66  {
    8.67      abstract_value param_values[] =
     9.1 --- a/tools/libxen/src/xen_vif.c	Sun Jan 28 23:07:37 2007 +0000
     9.2 +++ b/tools/libxen/src/xen_vif.c	Mon Jan 29 00:05:40 2007 +0000
     9.3 @@ -21,7 +21,6 @@
     9.4  #include <stdlib.h>
     9.5  
     9.6  #include "xen_common.h"
     9.7 -#include "xen_driver_type_internal.h"
     9.8  #include "xen_internal.h"
     9.9  #include "xen_network.h"
    9.10  #include "xen_vif.h"
    9.11 @@ -42,12 +41,6 @@ static const struct_member xen_vif_recor
    9.12          { .key = "uuid",
    9.13            .type = &abstract_type_string,
    9.14            .offset = offsetof(xen_vif_record, uuid) },
    9.15 -        { .key = "name",
    9.16 -          .type = &abstract_type_string,
    9.17 -          .offset = offsetof(xen_vif_record, name) },
    9.18 -        { .key = "type",
    9.19 -          .type = &xen_driver_type_abstract_type_,
    9.20 -          .offset = offsetof(xen_vif_record, type) },
    9.21          { .key = "device",
    9.22            .type = &abstract_type_string,
    9.23            .offset = offsetof(xen_vif_record, device) },
    9.24 @@ -90,7 +83,6 @@ xen_vif_record_free(xen_vif_record *reco
    9.25      }
    9.26      free(record->handle);
    9.27      free(record->uuid);
    9.28 -    free(record->name);
    9.29      free(record->device);
    9.30      xen_network_record_opt_free(record->network);
    9.31      xen_vm_record_opt_free(record->vm);
    9.32 @@ -171,38 +163,6 @@ xen_vif_destroy(xen_session *session, xe
    9.33  
    9.34  
    9.35  bool
    9.36 -xen_vif_get_name(xen_session *session, char **result, xen_vif vif)
    9.37 -{
    9.38 -    abstract_value param_values[] =
    9.39 -        {
    9.40 -            { .type = &abstract_type_string,
    9.41 -              .u.string_val = vif }
    9.42 -        };
    9.43 -
    9.44 -    abstract_type result_type = abstract_type_string;
    9.45 -
    9.46 -    *result = NULL;
    9.47 -    XEN_CALL_("VIF.get_name");
    9.48 -    return session->ok;
    9.49 -}
    9.50 -
    9.51 -
    9.52 -bool
    9.53 -xen_vif_get_type(xen_session *session, enum xen_driver_type *result, xen_vif vif)
    9.54 -{
    9.55 -    abstract_value param_values[] =
    9.56 -        {
    9.57 -            { .type = &abstract_type_string,
    9.58 -              .u.string_val = vif }
    9.59 -        };
    9.60 -
    9.61 -    abstract_type result_type = xen_driver_type_abstract_type_;
    9.62 -    XEN_CALL_("VIF.get_type");
    9.63 -    return session->ok;
    9.64 -}
    9.65 -
    9.66 -
    9.67 -bool
    9.68  xen_vif_get_device(xen_session *session, char **result, xen_vif vif)
    9.69  {
    9.70      abstract_value param_values[] =
    9.71 @@ -319,38 +279,6 @@ xen_vif_get_io_write_kbs(xen_session *se
    9.72  
    9.73  
    9.74  bool
    9.75 -xen_vif_set_name(xen_session *session, xen_vif vif, char *name)
    9.76 -{
    9.77 -    abstract_value param_values[] =
    9.78 -        {
    9.79 -            { .type = &abstract_type_string,
    9.80 -              .u.string_val = vif },
    9.81 -            { .type = &abstract_type_string,
    9.82 -              .u.string_val = name }
    9.83 -        };
    9.84 -
    9.85 -    xen_call_(session, "VIF.set_name", param_values, 2, NULL, NULL);
    9.86 -    return session->ok;
    9.87 -}
    9.88 -
    9.89 -
    9.90 -bool
    9.91 -xen_vif_set_type(xen_session *session, xen_vif vif, enum xen_driver_type type)
    9.92 -{
    9.93 -    abstract_value param_values[] =
    9.94 -        {
    9.95 -            { .type = &abstract_type_string,
    9.96 -              .u.string_val = vif },
    9.97 -            { .type = &xen_driver_type_abstract_type_,
    9.98 -              .u.string_val = xen_driver_type_to_string(type) }
    9.99 -        };
   9.100 -
   9.101 -    xen_call_(session, "VIF.set_type", param_values, 2, NULL, NULL);
   9.102 -    return session->ok;
   9.103 -}
   9.104 -
   9.105 -
   9.106 -bool
   9.107  xen_vif_set_device(xen_session *session, xen_vif vif, char *device)
   9.108  {
   9.109      abstract_value param_values[] =
    10.1 --- a/tools/libxen/src/xen_vtpm.c	Sun Jan 28 23:07:37 2007 +0000
    10.2 +++ b/tools/libxen/src/xen_vtpm.c	Mon Jan 29 00:05:40 2007 +0000
    10.3 @@ -22,7 +22,6 @@
    10.4  #include <stdlib.h>
    10.5  
    10.6  #include "xen_common.h"
    10.7 -#include "xen_driver_type_internal.h"
    10.8  #include "xen_internal.h"
    10.9  #include "xen_vm.h"
   10.10  #include "xen_vtpm.h"
   10.11 @@ -48,9 +47,6 @@ static const struct_member xen_vtpm_reco
   10.12          { .key = "backend",
   10.13            .type = &abstract_type_ref,
   10.14            .offset = offsetof(xen_vtpm_record, backend) },
   10.15 -        { .key = "driver",
   10.16 -          .type = &xen_driver_type_abstract_type_,
   10.17 -          .offset = offsetof(xen_vtpm_record, driver) },
   10.18          { .key = "instance",
   10.19            .type = &abstract_type_int,
   10.20            .offset = offsetof(xen_vtpm_record, instance) }
   10.21 @@ -187,21 +183,6 @@ xen_vtpm_get_backend(xen_session *sessio
   10.22  
   10.23  
   10.24  bool
   10.25 -xen_vtpm_get_driver(xen_session *session, enum xen_driver_type *result, xen_vtpm vtpm)
   10.26 -{
   10.27 -    abstract_value param_values[] =
   10.28 -        {
   10.29 -            { .type = &abstract_type_string,
   10.30 -              .u.string_val = vtpm }
   10.31 -        };
   10.32 -
   10.33 -    abstract_type result_type = xen_driver_type_abstract_type_;
   10.34 -    XEN_CALL_("VTPM.get_driver");
   10.35 -    return session->ok;
   10.36 -}
   10.37 -
   10.38 -
   10.39 -bool
   10.40  xen_vtpm_get_instance(xen_session *session, int64_t *result, xen_vtpm vtpm)
   10.41  {
   10.42      abstract_value param_values[] =
    11.1 --- a/tools/libxen/test/test_bindings.c	Sun Jan 28 23:07:37 2007 +0000
    11.2 +++ b/tools/libxen/test/test_bindings.c	Mon Jan 29 00:05:40 2007 +0000
    11.3 @@ -382,8 +382,7 @@ static xen_vm create_new_vm(xen_session 
    11.4              .vm = &vm_record_opt,
    11.5              .vdi = &vdi0_record_opt,
    11.6              .device = "xvda1",
    11.7 -            .mode = XEN_VBD_MODE_RW,
    11.8 -            .driver = XEN_DRIVER_TYPE_PARAVIRTUALISED
    11.9 +            .mode = XEN_VBD_MODE_RW
   11.10          };
   11.11  
   11.12      xen_vbd vbd0;
    12.1 --- a/tools/python/xen/xend/XendAPI.py	Sun Jan 28 23:07:37 2007 +0000
    12.2 +++ b/tools/python/xen/xend/XendAPI.py	Mon Jan 29 00:05:40 2007 +0000
    12.3 @@ -1338,8 +1338,7 @@ class XendAPI(object):
    12.4                     'device',
    12.5                     'bootable',
    12.6                     'mode',
    12.7 -                   'type',                   
    12.8 -                   'driver']
    12.9 +                   'type']
   12.10  
   12.11      VBD_attr_inst = VBD_attr_rw
   12.12  
   12.13 @@ -1424,9 +1423,6 @@ class XendAPI(object):
   12.14      def VBD_get_mode(self, session, vbd_ref):
   12.15          return self._VBD_get(vbd_ref, 'mode')
   12.16  
   12.17 -    def VBD_get_driver(self, session, vbd_ref):
   12.18 -        return self._VBD_get(vbd_ref, 'driver')
   12.19 -
   12.20      def VBD_get_type(self, session, vbd_ref):
   12.21          return self._VBD_get(vbd_ref, 'type')
   12.22  
   12.23 @@ -1455,9 +1451,7 @@ class XendAPI(object):
   12.24  
   12.25      VIF_attr_ro = ['io_read_kbs',
   12.26                     'io_write_kbs']
   12.27 -    VIF_attr_rw = ['name',
   12.28 -                   'type',
   12.29 -                   'device',
   12.30 +    VIF_attr_rw = ['device',
   12.31                     'network',
   12.32                     'VM',
   12.33                     'MAC',
   12.34 @@ -1518,10 +1512,6 @@ class XendAPI(object):
   12.35          vm = xendom.get_vm_with_dev_uuid('vif', vif_ref)        
   12.36          return xen_api_success(vm.get_uuid())
   12.37      
   12.38 -    def VIF_get_name(self, session, vif_ref):
   12.39 -        xendom = XendDomain.instance()
   12.40 -        return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
   12.41 -                                                               'name'))
   12.42      def VIF_get_MTU(self, session, vif_ref):
   12.43          xendom = XendDomain.instance()
   12.44          return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
   12.45 @@ -1531,17 +1521,10 @@ class XendAPI(object):
   12.46          return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
   12.47                                                                 'MAC'))
   12.48  
   12.49 -    def VIF_get_type(self, session, vif_ref):
   12.50 -        xendom = XendDomain.instance()
   12.51 -        return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
   12.52 -                                                               'type'))
   12.53 -    
   12.54 -
   12.55      def VIF_get_device(self, session, vif_ref):
   12.56          xendom = XendDomain.instance()
   12.57          return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
   12.58                                                                 'device'))
   12.59 -    
   12.60   
   12.61      def VIF_get_io_read_kbs(self, session, vif_ref):
   12.62          xendom = XendDomain.instance()
   12.63 @@ -1695,8 +1678,7 @@ class XendAPI(object):
   12.64      VTPM_attr_rw = [ ]
   12.65      VTPM_attr_ro = ['VM',
   12.66                      'backend',
   12.67 -                    'instance',
   12.68 -                    'driver']
   12.69 +                    'instance']
   12.70  
   12.71      VTPM_attr_inst = VTPM_attr_rw
   12.72  
   12.73 @@ -1734,20 +1716,6 @@ class XendAPI(object):
   12.74              instance = -1
   12.75          return xen_api_success(instance)
   12.76  
   12.77 -    def VTPM_get_driver(self, session, vtpm_ref):
   12.78 -        xendom = XendDomain.instance()
   12.79 -        vm = xendom.get_vm_with_dev_uuid('vtpm', vtpm_ref)
   12.80 -        if not vm:
   12.81 -            return xen_api_error(['VTPM_HANDLE_INVALID', vtpm_ref])
   12.82 -        cfg = vm.get_dev_xenapi_config('vtpm', vtpm_ref)
   12.83 -        if not cfg:
   12.84 -            return xen_api_error(['VTPM_HANDLE_INVALID', vtpm_ref])
   12.85 -        if cfg.has_key('type'):
   12.86 -            driver = cfg['type']
   12.87 -        else:
   12.88 -            driver = "Unknown"
   12.89 -        return xen_api_success(driver)
   12.90 -
   12.91      def VTPM_get_backend(self, session, vtpm_ref):
   12.92          xendom = XendDomain.instance()
   12.93          vm = xendom.get_vm_with_dev_uuid('vtpm', vtpm_ref)