Remove VBD.driver, VIF.type, VIF.name, VTPM.driver. This modelling was never
authorEwan Mellor <ewan@xensource.com>
Mon, 29 Jan 2007 00:05:40 +0000 (00:05 +0000)
committerEwan Mellor <ewan@xensource.com>
Mon, 29 Jan 2007 00:05:40 +0000 (00:05 +0000)
correct, and the values are best left implicit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
12 files changed:
docs/xen-api/xenapi-datamodel.tex
tools/libxen/include/xen_driver_type.h [deleted file]
tools/libxen/include/xen_driver_type_internal.h [deleted file]
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 [deleted file]
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

index c30baa9c33a341a76a64af11f2e974723fdd181b..15c27e9c8d9d423be61779bc3d591142e87a8816 100644 (file)
@@ -272,16 +272,6 @@ The following enumeration types are used:
 \hline
 \end{longtable}
 
-\vspace{1cm}
-\begin{longtable}{|ll|}
-\hline
-{\tt enum driver\_type} & \\
-\hline
-\hspace{0.5cm}{\tt ioemu} & use hardware emulation \\
-\hspace{0.5cm}{\tt paravirtualised} & use paravirtualised driver \\
-\hline
-\end{longtable}
-
 \vspace{1cm}
 
 \newpage
@@ -5807,8 +5797,6 @@ references to objects with match names
 Quals & Field & Type & Description \\
 \hline
 $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
-$\mathit{RW}$ &  {\tt name} & string & human-readable name of the interface \\
-$\mathit{RW}$ &  {\tt type} & driver\_type & interface type \\
 $\mathit{RW}$ &  {\tt device} & string & name of network device as exposed to guest e.g. eth0 \\
 $\mathit{RW}$ &  {\tt network} & network ref & virtual network to which this vif is connected \\
 $\mathit{RW}$ &  {\tt VM} & VM ref & virtual machine to which this vif is connected \\
@@ -5914,72 +5902,6 @@ void
 
 
 
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_type}
-
-{\bf Overview:} 
-Get the type field of the given VIF.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (driver_type) get_type (session_id s, VIF 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 VIF ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-driver\_type
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~set\_type}
-
-{\bf Overview:} 
-Set the type field of the given VIF.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} void set_type (session_id s, VIF ref self, driver_type value)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & reference to the object \\ \hline 
-
-{\tt driver\_type } & value & New value to set \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-void
-}
-
-
-
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -8652,7 +8574,6 @@ $\mathit{RW}$ &  {\tt device} & string & device seen by the guest e.g. hda1 \\
 $\mathit{RW}$ &  {\tt bootable} & bool & true if this VBD is bootable \\
 $\mathit{RW}$ &  {\tt mode} & vbd\_mode & the mode the VBD should be mounted with \\
 $\mathit{RW}$ &  {\tt type} & vbd\_type & how the VBD will appear to the guest (e.g. disk or CD) \\
-$\mathit{RW}$ &  {\tt driver} & driver\_type & the style of driver \\
 $\mathit{RO}_\mathit{run}$ &  {\tt io/read\_kbs} & float & Read bandwidth (KiB/s) \\
 $\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB/s) \\
 \hline
@@ -9117,72 +9038,6 @@ void
 
 
 
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_driver}
-
-{\bf Overview:} 
-Get the driver field of the given VBD.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (driver_type) get_driver (session_id s, VBD 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 VBD ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-driver\_type
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~set\_driver}
-
-{\bf Overview:} 
-Set the driver field of the given VBD.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} void set_driver (session_id s, VBD ref self, driver_type value)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & reference to the object \\ \hline 
-
-{\tt driver\_type } & value & New value to set \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-void
-}
-
-
-
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -9393,7 +9248,6 @@ Quals & Field & Type & Description \\
 $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 $\mathit{RO}_\mathit{ins}$ &  {\tt VM} & VM ref & the virtual machine \\
 $\mathit{RO}_\mathit{ins}$ &  {\tt backend} & VM ref & the domain where the backend is located \\
-$\mathit{RO}_\mathit{ins}$ &  {\tt driver} & driver\_type & the style of driver \\
 $\mathit{RO}_\mathit{ins}$ &  {\tt instance} & int & the instance number the virtual TPM represents \\
 \hline
 \end{longtable}
@@ -9490,38 +9344,6 @@ VM ref
 }
 
 
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_driver}
-
-{\bf Overview:} 
-Get the driver field of the given VTPM.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (driver_type) get_driver (session_id s, VTPM 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 VTPM ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-driver\_type
-}
-
-
 value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
diff --git a/tools/libxen/include/xen_driver_type.h b/tools/libxen/include/xen_driver_type.h
deleted file mode 100644 (file)
index 585db28..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2006, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_DRIVER_TYPE_H
-#define XEN_DRIVER_TYPE_H
-
-
-#include "xen_common.h"
-
-
-enum xen_driver_type
-{
-    /**
-     * use hardware emulation
-     */
-    XEN_DRIVER_TYPE_IOEMU,
-
-    /**
-     * use paravirtualised driver
-     */
-    XEN_DRIVER_TYPE_PARAVIRTUALISED
-};
-
-
-typedef struct xen_driver_type_set
-{
-    size_t size;
-    enum xen_driver_type contents[];
-} xen_driver_type_set;
-
-/**
- * Allocate a xen_driver_type_set of the given size.
- */
-extern xen_driver_type_set *
-xen_driver_type_set_alloc(size_t size);
-
-/**
- * Free the given xen_driver_type_set.  The given set must have been
- * allocated by this library.
- */
-extern void
-xen_driver_type_set_free(xen_driver_type_set *set);
-
-
-/**
- * Return the name corresponding to the given code.  This string must
- * not be modified or freed.
- */
-extern const char *
-xen_driver_type_to_string(enum xen_driver_type val);
-
-
-/**
- * Return the correct code for the given string, or set the session
- * object to failure and return an undefined value if the given string does
- * not match a known code.
- */
-extern enum xen_driver_type
-xen_driver_type_from_string(xen_session *session, const char *str);
-
-
-#endif
diff --git a/tools/libxen/include/xen_driver_type_internal.h b/tools/libxen/include/xen_driver_type_internal.h
deleted file mode 100644 (file)
index c44639f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2006, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-
-/*
- * Declarations of the abstract types used during demarshalling of enum
- * xen_driver_type.  Internal to this library -- do not use from outside.
- */
-
-
-#ifndef XEN_DRIVER_TYPE_INTERNAL_H
-#define XEN_DRIVER_TYPE_INTERNAL_H
-
-
-#include "xen_internal.h"
-
-
-extern const abstract_type xen_driver_type_abstract_type_;
-extern const abstract_type xen_driver_type_set_abstract_type_;
-
-
-#endif
index d3cb1a88767900cb1d48d3ee71503f6fbfb0fb3c..7080530a638b6ee2060ec65d1c6b4ede17bc4f76 100644 (file)
@@ -20,7 +20,6 @@
 #define XEN_VBD_H
 
 #include "xen_common.h"
-#include "xen_driver_type.h"
 #include "xen_vbd_decl.h"
 #include "xen_vbd_mode.h"
 #include "xen_vdi_decl.h"
@@ -28,8 +27,8 @@
 
 
 /*
- * The VBD class. 
- *  
+ * The VBD class.
+ * 
  * A virtual block device.
  */
 
@@ -72,7 +71,6 @@ typedef struct xen_vbd_record
     char *image;
     bool bootable;
     enum xen_vbd_mode mode;
-    enum xen_driver_type driver;
     double io_read_kbs;
     double io_write_kbs;
 } xen_vbd_record;
@@ -226,13 +224,6 @@ extern bool
 xen_vbd_get_mode(xen_session *session, enum xen_vbd_mode *result, xen_vbd vbd);
 
 
-/**
- * Get the driver field of the given VBD.
- */
-extern bool
-xen_vbd_get_driver(xen_session *session, enum xen_driver_type *result, xen_vbd vbd);
-
-
 /**
  * Get the io/read_kbs field of the given VBD.
  */
@@ -282,13 +273,6 @@ extern bool
 xen_vbd_set_mode(xen_session *session, xen_vbd vbd, enum xen_vbd_mode mode);
 
 
-/**
- * Set the driver field of the given VBD.
- */
-extern bool
-xen_vbd_set_driver(xen_session *session, xen_vbd vbd, enum xen_driver_type driver);
-
-
 /**
  * Change the media in the device for CDROM-like devices only. For
  * other devices, detach the VBD and attach a new one
index 4efc3f08513bcdc3a61ac5eca31967e959041d37..f0d4f0765190d29914a851dd917ebf9a9898f9da 100644 (file)
 #define XEN_VIF_H
 
 #include "xen_common.h"
-#include "xen_driver_type.h"
 #include "xen_network_decl.h"
 #include "xen_vif_decl.h"
 #include "xen_vm_decl.h"
 
 
 /*
- * The VIF class. 
- *  
+ * The VIF class.
+ * 
  * A virtual network interface.
  */
 
@@ -65,8 +64,6 @@ typedef struct xen_vif_record
 {
     xen_vif handle;
     char *uuid;
-    char *name;
-    enum xen_driver_type type;
     char *device;
     struct xen_network_record_opt *network;
     struct xen_vm_record_opt *vm;
@@ -190,20 +187,6 @@ extern bool
 xen_vif_get_uuid(xen_session *session, char **result, xen_vif vif);
 
 
-/**
- * Get the name field of the given VIF.
- */
-extern bool
-xen_vif_get_name(xen_session *session, char **result, xen_vif vif);
-
-
-/**
- * Get the type field of the given VIF.
- */
-extern bool
-xen_vif_get_type(xen_session *session, enum xen_driver_type *result, xen_vif vif);
-
-
 /**
  * Get the device field of the given VIF.
  */
@@ -253,20 +236,6 @@ extern bool
 xen_vif_get_io_write_kbs(xen_session *session, double *result, xen_vif vif);
 
 
-/**
- * Set the name field of the given VIF.
- */
-extern bool
-xen_vif_set_name(xen_session *session, xen_vif vif, char *name);
-
-
-/**
- * Set the type field of the given VIF.
- */
-extern bool
-xen_vif_set_type(xen_session *session, xen_vif vif, enum xen_driver_type type);
-
-
 /**
  * Set the device field of the given VIF.
  */
index a04c8d4de36427ba07eda61f478b9c73d5b0a230..e0388ef4cdf7fac45fef0b81b11f1ccd80dd002c 100644 (file)
@@ -21,7 +21,6 @@
 #define XEN_VTPM_H
 
 #include "xen_common.h"
-#include "xen_driver_type.h"
 #include "xen_vm_decl.h"
 #include "xen_vtpm_decl.h"
 
@@ -67,7 +66,6 @@ typedef struct xen_vtpm_record
     char *uuid;
     struct xen_vm_record_opt *vm;
     struct xen_vm_record_opt *backend;
-    enum xen_driver_type driver;
     int64_t instance;
 } xen_vtpm_record;
 
@@ -199,13 +197,6 @@ extern bool
 xen_vtpm_get_backend(xen_session *session, xen_vm *result, xen_vtpm vtpm);
 
 
-/**
- * Get the driver field of the given VTPM.
- */
-extern bool
-xen_vtpm_get_driver(xen_session *session, enum xen_driver_type *result, xen_vtpm vtpm);
-
-
 /**
  * Get the instance field of the given VTPM.
  */
diff --git a/tools/libxen/src/xen_driver_type.c b/tools/libxen/src/xen_driver_type.c
deleted file mode 100644 (file)
index fe95d84..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2006, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#include <string.h>
-
-#include "xen_internal.h"
-#include "xen_driver_type.h"
-#include "xen_driver_type_internal.h"
-
-
-/*
- * Maintain this in the same order as the enum declaration!
- */
-static const char *lookup_table[] =
-{
-    "ioemu",
-    "paravirtualised"
-};
-
-
-extern xen_driver_type_set *
-xen_driver_type_set_alloc(size_t size)
-{
-    return calloc(1, sizeof(xen_driver_type_set) +
-                  size * sizeof(enum xen_driver_type));
-}
-
-
-extern void
-xen_driver_type_set_free(xen_driver_type_set *set)
-{
-    free(set);
-}
-
-
-const char *
-xen_driver_type_to_string(enum xen_driver_type val)
-{
-    return lookup_table[val];
-}
-
-
-extern enum xen_driver_type
-xen_driver_type_from_string(xen_session *session, const char *str)
-{
-    return ENUM_LOOKUP(session, str, lookup_table);
-}
-
-
-const abstract_type xen_driver_type_abstract_type_ =
-    {
-        .typename = ENUM,
-        .enum_marshaller =
-             (const char *(*)(int))&xen_driver_type_to_string,
-        .enum_demarshaller =
-             (int (*)(xen_session *, const char *))&xen_driver_type_from_string
-    };
-
-
-const abstract_type xen_driver_type_set_abstract_type_ =
-    {
-        .typename = SET,
-        .child = &xen_driver_type_abstract_type_
-    };
-
-
index 3bd8ba560c9cecb7a4f79f32b4e1a8f1425c4a6a..f581f85da74cc6010f3e579b186ec0cfee492446 100644 (file)
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 
 #include "xen_common.h"
-#include "xen_driver_type_internal.h"
 #include "xen_internal.h"
 #include "xen_vbd.h"
 #include "xen_vbd_mode_internal.h"
@@ -61,9 +60,6 @@ static const struct_member xen_vbd_record_struct_members[] =
         { .key = "mode",
           .type = &xen_vbd_mode_abstract_type_,
           .offset = offsetof(xen_vbd_record, mode) },
-        { .key = "driver",
-          .type = &xen_driver_type_abstract_type_,
-          .offset = offsetof(xen_vbd_record, driver) },
         { .key = "io_read_kbs",
           .type = &abstract_type_float,
           .offset = offsetof(xen_vbd_record, io_read_kbs) },
@@ -253,23 +249,6 @@ xen_vbd_get_mode(xen_session *session, enum xen_vbd_mode *result, xen_vbd vbd)
 }
 
 
-bool
-xen_vbd_get_driver(xen_session *session, enum xen_driver_type *result, xen_vbd vbd)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vbd }
-        };
-
-    abstract_type result_type = xen_driver_type_abstract_type_;
-    char *result_str = NULL;
-    XEN_CALL_("VBD.get_driver");
-    *result = xen_driver_type_from_string(session, result_str);
-    return session->ok;
-}
-
-
 bool
 xen_vbd_get_io_read_kbs(xen_session *session, double *result, xen_vbd vbd)
 {
@@ -382,22 +361,6 @@ xen_vbd_set_mode(xen_session *session, xen_vbd vbd, enum xen_vbd_mode mode)
 }
 
 
-bool
-xen_vbd_set_driver(xen_session *session, xen_vbd vbd, enum xen_driver_type driver)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vbd },
-            { .type = &xen_driver_type_abstract_type_,
-              .u.string_val = xen_driver_type_to_string(driver) }
-        };
-
-    xen_call_(session, "VBD.set_driver", param_values, 2, NULL, NULL);
-    return session->ok;
-}
-
-
 bool
 xen_vbd_media_change(xen_session *session, xen_vbd vbd, xen_vdi vdi)
 {
index 82b4a15b311f459e9cd7589c5567ceb4074dda79..dd9e173a6a5ed7f5b1b49c644f15a523bab7c55c 100644 (file)
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 
 #include "xen_common.h"
-#include "xen_driver_type_internal.h"
 #include "xen_internal.h"
 #include "xen_network.h"
 #include "xen_vif.h"
@@ -42,12 +41,6 @@ static const struct_member xen_vif_record_struct_members[] =
         { .key = "uuid",
           .type = &abstract_type_string,
           .offset = offsetof(xen_vif_record, uuid) },
-        { .key = "name",
-          .type = &abstract_type_string,
-          .offset = offsetof(xen_vif_record, name) },
-        { .key = "type",
-          .type = &xen_driver_type_abstract_type_,
-          .offset = offsetof(xen_vif_record, type) },
         { .key = "device",
           .type = &abstract_type_string,
           .offset = offsetof(xen_vif_record, device) },
@@ -90,7 +83,6 @@ xen_vif_record_free(xen_vif_record *record)
     }
     free(record->handle);
     free(record->uuid);
-    free(record->name);
     free(record->device);
     xen_network_record_opt_free(record->network);
     xen_vm_record_opt_free(record->vm);
@@ -170,38 +162,6 @@ xen_vif_destroy(xen_session *session, xen_vif vif)
 }
 
 
-bool
-xen_vif_get_name(xen_session *session, char **result, xen_vif vif)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vif }
-        };
-
-    abstract_type result_type = abstract_type_string;
-
-    *result = NULL;
-    XEN_CALL_("VIF.get_name");
-    return session->ok;
-}
-
-
-bool
-xen_vif_get_type(xen_session *session, enum xen_driver_type *result, xen_vif vif)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vif }
-        };
-
-    abstract_type result_type = xen_driver_type_abstract_type_;
-    XEN_CALL_("VIF.get_type");
-    return session->ok;
-}
-
-
 bool
 xen_vif_get_device(xen_session *session, char **result, xen_vif vif)
 {
@@ -318,38 +278,6 @@ xen_vif_get_io_write_kbs(xen_session *session, double *result, xen_vif vif)
 }
 
 
-bool
-xen_vif_set_name(xen_session *session, xen_vif vif, char *name)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vif },
-            { .type = &abstract_type_string,
-              .u.string_val = name }
-        };
-
-    xen_call_(session, "VIF.set_name", param_values, 2, NULL, NULL);
-    return session->ok;
-}
-
-
-bool
-xen_vif_set_type(xen_session *session, xen_vif vif, enum xen_driver_type type)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vif },
-            { .type = &xen_driver_type_abstract_type_,
-              .u.string_val = xen_driver_type_to_string(type) }
-        };
-
-    xen_call_(session, "VIF.set_type", param_values, 2, NULL, NULL);
-    return session->ok;
-}
-
-
 bool
 xen_vif_set_device(xen_session *session, xen_vif vif, char *device)
 {
index 7c482be45956f28fa866a76d92e7c17f3680dce2..1e56bec56dab2505fe47a5681efe860a10d048da 100644 (file)
@@ -22,7 +22,6 @@
 #include <stdlib.h>
 
 #include "xen_common.h"
-#include "xen_driver_type_internal.h"
 #include "xen_internal.h"
 #include "xen_vm.h"
 #include "xen_vtpm.h"
@@ -48,9 +47,6 @@ static const struct_member xen_vtpm_record_struct_members[] =
         { .key = "backend",
           .type = &abstract_type_ref,
           .offset = offsetof(xen_vtpm_record, backend) },
-        { .key = "driver",
-          .type = &xen_driver_type_abstract_type_,
-          .offset = offsetof(xen_vtpm_record, driver) },
         { .key = "instance",
           .type = &abstract_type_int,
           .offset = offsetof(xen_vtpm_record, instance) }
@@ -186,21 +182,6 @@ xen_vtpm_get_backend(xen_session *session, xen_vm *result, xen_vtpm vtpm)
 }
 
 
-bool
-xen_vtpm_get_driver(xen_session *session, enum xen_driver_type *result, xen_vtpm vtpm)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vtpm }
-        };
-
-    abstract_type result_type = xen_driver_type_abstract_type_;
-    XEN_CALL_("VTPM.get_driver");
-    return session->ok;
-}
-
-
 bool
 xen_vtpm_get_instance(xen_session *session, int64_t *result, xen_vtpm vtpm)
 {
index 1e10ef4223e8bfa20609c34652320efb6cab6e5e..f83bd9a39988263c7806822c00b1e21571bd5518 100644 (file)
@@ -382,8 +382,7 @@ static xen_vm create_new_vm(xen_session *session)
             .vm = &vm_record_opt,
             .vdi = &vdi0_record_opt,
             .device = "xvda1",
-            .mode = XEN_VBD_MODE_RW,
-            .driver = XEN_DRIVER_TYPE_PARAVIRTUALISED
+            .mode = XEN_VBD_MODE_RW
         };
 
     xen_vbd vbd0;
index d861488496d6112c8bce2c57f6d7e46b0cde98a6..a24af6a6874e6e5af12bf3e30183b8c10111fd3e 100644 (file)
@@ -1338,8 +1338,7 @@ class XendAPI(object):
                    'device',
                    'bootable',
                    'mode',
-                   'type',                   
-                   'driver']
+                   'type']
 
     VBD_attr_inst = VBD_attr_rw
 
@@ -1424,9 +1423,6 @@ class XendAPI(object):
     def VBD_get_mode(self, session, vbd_ref):
         return self._VBD_get(vbd_ref, 'mode')
 
-    def VBD_get_driver(self, session, vbd_ref):
-        return self._VBD_get(vbd_ref, 'driver')
-
     def VBD_get_type(self, session, vbd_ref):
         return self._VBD_get(vbd_ref, 'type')
 
@@ -1455,9 +1451,7 @@ class XendAPI(object):
 
     VIF_attr_ro = ['io_read_kbs',
                    'io_write_kbs']
-    VIF_attr_rw = ['name',
-                   'type',
-                   'device',
+    VIF_attr_rw = ['device',
                    'network',
                    'VM',
                    'MAC',
@@ -1518,10 +1512,6 @@ class XendAPI(object):
         vm = xendom.get_vm_with_dev_uuid('vif', vif_ref)        
         return xen_api_success(vm.get_uuid())
     
-    def VIF_get_name(self, session, vif_ref):
-        xendom = XendDomain.instance()
-        return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
-                                                               'name'))
     def VIF_get_MTU(self, session, vif_ref):
         xendom = XendDomain.instance()
         return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
@@ -1531,17 +1521,10 @@ class XendAPI(object):
         return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
                                                                'MAC'))
 
-    def VIF_get_type(self, session, vif_ref):
-        xendom = XendDomain.instance()
-        return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
-                                                               'type'))
-    
-
     def VIF_get_device(self, session, vif_ref):
         xendom = XendDomain.instance()
         return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref,
                                                                'device'))
-    
  
     def VIF_get_io_read_kbs(self, session, vif_ref):
         xendom = XendDomain.instance()
@@ -1695,8 +1678,7 @@ class XendAPI(object):
     VTPM_attr_rw = [ ]
     VTPM_attr_ro = ['VM',
                     'backend',
-                    'instance',
-                    'driver']
+                    'instance']
 
     VTPM_attr_inst = VTPM_attr_rw
 
@@ -1734,20 +1716,6 @@ class XendAPI(object):
             instance = -1
         return xen_api_success(instance)
 
-    def VTPM_get_driver(self, session, vtpm_ref):
-        xendom = XendDomain.instance()
-        vm = xendom.get_vm_with_dev_uuid('vtpm', vtpm_ref)
-        if not vm:
-            return xen_api_error(['VTPM_HANDLE_INVALID', vtpm_ref])
-        cfg = vm.get_dev_xenapi_config('vtpm', vtpm_ref)
-        if not cfg:
-            return xen_api_error(['VTPM_HANDLE_INVALID', vtpm_ref])
-        if cfg.has_key('type'):
-            driver = cfg['type']
-        else:
-            driver = "Unknown"
-        return xen_api_success(driver)
-
     def VTPM_get_backend(self, session, vtpm_ref):
         xendom = XendDomain.instance()
         vm = xendom.get_vm_with_dev_uuid('vtpm', vtpm_ref)