[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Added VBD. and VIF.qos_supported_algorithms fields, with C bindings, Xend



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1172098980 0
# Node ID fd7f23e44b1163c943b725232d3647d2d7567d73
# Parent  c051ed67258a2b692f23ab6482e9b844a8fffbeb
Added VBD. and VIF.qos_supported_algorithms fields, with C bindings, Xend
implementation to follow.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 docs/xen-api/xenapi-datamodel.tex |   72 ++++++++++++++++++++++++++++++++++++--
 tools/libxen/include/xen_vbd.h    |    9 ++++
 tools/libxen/include/xen_vif.h    |    9 ++++
 tools/libxen/src/xen_vbd.c        |   21 +++++++++++
 tools/libxen/src/xen_vif.c        |   21 +++++++++++
 5 files changed, 129 insertions(+), 3 deletions(-)

diff -r c051ed67258a -r fd7f23e44b11 docs/xen-api/xenapi-datamodel.tex
--- a/docs/xen-api/xenapi-datamodel.tex Sat Feb 24 15:30:19 2007 +0000
+++ b/docs/xen-api/xenapi-datamodel.tex Wed Feb 21 23:03:00 2007 +0000
@@ -6680,7 +6680,8 @@ Quals & Field & Type & Description \\
 $\mathit{RW}$ &  {\tt MAC} & string & ethernet MAC address of virtual 
interface, as exposed to guest \\
 $\mathit{RW}$ &  {\tt MTU} & int & MTU in octets \\
 $\mathit{RW}$ &  {\tt qos/algorithm\_type} & string & QoS algorithm to use \\
-$\mathit{RW}$ &  {\tt qos/algorithm\_params} & (string $\rightarrow$ string) 
Map & Paramters for chosen QoS algorithm \\
+$\mathit{RW}$ &  {\tt qos/algorithm\_params} & (string $\rightarrow$ string) 
Map & parameters for chosen QoS algorithm \\
+$\mathit{RO}_\mathit{run}$ &  {\tt qos/supported\_algorithms} & string Set & 
supported QoS algorithms for this VIF \\
 $\mathit{RO}_\mathit{run}$ &  {\tt metrics} & VIF\_metrics ref & metrics 
associated with this VIF. \\
 \hline
 \end{longtable}
@@ -7181,6 +7182,38 @@ void
 
 
 
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_qos\_supported\_algorithms}
+
+{\bf Overview:} 
+Get the qos/supported\_algorithms field of the given VIF.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} (string Set) get_qos_supported_algorithms (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 
+string Set
+}
+
+
+value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -9787,8 +9820,9 @@ Quals & Field & Type & Description \\
 $\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 qos/algorithm\_type} & string & QoS algorithm to use \\
-$\mathit{RW}$ &  {\tt qos/algorithm\_params} & (string $\rightarrow$ string) 
Map & Paramters for chosen QoS algorithm \\
-$\mathit{RO}_\mathit{run}$ &  {\tt metrics} & VBD\_metrics ref & metrics 
associated with this VBD. \\
+$\mathit{RW}$ &  {\tt qos/algorithm\_params} & (string $\rightarrow$ string) 
Map & parameters for chosen QoS algorithm \\
+$\mathit{RO}_\mathit{run}$ &  {\tt qos/supported\_algorithms} & string Set & 
supported QoS algorithms for this VBD \\
+$\mathit{RO}_\mathit{run}$ &  {\tt metrics} & VBD\_metrics ref & metrics 
associated with this VBD \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: VBD}
@@ -10389,6 +10423,38 @@ void
 
 
 
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_qos\_supported\_algorithms}
+
+{\bf Overview:} 
+Get the qos/supported\_algorithms field of the given VBD.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} (string Set) get_qos_supported_algorithms (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 
+string Set
+}
+
+
+value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
diff -r c051ed67258a -r fd7f23e44b11 tools/libxen/include/xen_vbd.h
--- a/tools/libxen/include/xen_vbd.h    Sat Feb 24 15:30:19 2007 +0000
+++ b/tools/libxen/include/xen_vbd.h    Wed Feb 21 23:03:00 2007 +0000
@@ -20,6 +20,7 @@
 #define XEN_VBD_H
 
 #include "xen_common.h"
+#include "xen_string_set.h"
 #include "xen_string_string_map.h"
 #include "xen_vbd_decl.h"
 #include "xen_vbd_metrics_decl.h"
@@ -77,6 +78,7 @@ typedef struct xen_vbd_record
     enum xen_vbd_type type;
     char *qos_algorithm_type;
     xen_string_string_map *qos_algorithm_params;
+    struct xen_string_set *qos_supported_algorithms;
     struct xen_vbd_metrics_record_opt *metrics;
 } xen_vbd_record;
 
@@ -251,6 +253,13 @@ xen_vbd_get_qos_algorithm_params(xen_ses
 
 
 /**
+ * Get the qos/supported_algorithms field of the given VBD.
+ */
+extern bool
+xen_vbd_get_qos_supported_algorithms(xen_session *session, struct 
xen_string_set **result, xen_vbd vbd);
+
+
+/**
  * Get the metrics field of the given VBD.
  */
 extern bool
diff -r c051ed67258a -r fd7f23e44b11 tools/libxen/include/xen_vif.h
--- a/tools/libxen/include/xen_vif.h    Sat Feb 24 15:30:19 2007 +0000
+++ b/tools/libxen/include/xen_vif.h    Wed Feb 21 23:03:00 2007 +0000
@@ -21,6 +21,7 @@
 
 #include "xen_common.h"
 #include "xen_network_decl.h"
+#include "xen_string_set.h"
 #include "xen_string_string_map.h"
 #include "xen_vif_decl.h"
 #include "xen_vif_metrics_decl.h"
@@ -73,6 +74,7 @@ typedef struct xen_vif_record
     int64_t mtu;
     char *qos_algorithm_type;
     xen_string_string_map *qos_algorithm_params;
+    struct xen_string_set *qos_supported_algorithms;
     struct xen_vif_metrics_record_opt *metrics;
 } xen_vif_record;
 
@@ -240,6 +242,13 @@ xen_vif_get_qos_algorithm_params(xen_ses
 
 
 /**
+ * Get the qos/supported_algorithms field of the given VIF.
+ */
+extern bool
+xen_vif_get_qos_supported_algorithms(xen_session *session, struct 
xen_string_set **result, xen_vif vif);
+
+
+/**
  * Get the metrics field of the given VIF.
  */
 extern bool
diff -r c051ed67258a -r fd7f23e44b11 tools/libxen/src/xen_vbd.c
--- a/tools/libxen/src/xen_vbd.c        Sat Feb 24 15:30:19 2007 +0000
+++ b/tools/libxen/src/xen_vbd.c        Wed Feb 21 23:03:00 2007 +0000
@@ -72,6 +72,9 @@ static const struct_member xen_vbd_recor
         { .key = "qos_algorithm_params",
           .type = &abstract_type_string_string_map,
           .offset = offsetof(xen_vbd_record, qos_algorithm_params) },
+        { .key = "qos_supported_algorithms",
+          .type = &abstract_type_string_set,
+          .offset = offsetof(xen_vbd_record, qos_supported_algorithms) },
         { .key = "metrics",
           .type = &abstract_type_ref,
           .offset = offsetof(xen_vbd_record, metrics) }
@@ -101,6 +104,7 @@ xen_vbd_record_free(xen_vbd_record *reco
     free(record->device);
     free(record->qos_algorithm_type);
     xen_string_string_map_free(record->qos_algorithm_params);
+    xen_string_set_free(record->qos_supported_algorithms);
     xen_vbd_metrics_record_opt_free(record->metrics);
     free(record);
 }
@@ -309,6 +313,23 @@ xen_vbd_get_qos_algorithm_params(xen_ses
 
 
 bool
+xen_vbd_get_qos_supported_algorithms(xen_session *session, struct 
xen_string_set **result, xen_vbd vbd)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vbd }
+        };
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    XEN_CALL_("VBD.get_qos_supported_algorithms");
+    return session->ok;
+}
+
+
+bool
 xen_vbd_get_metrics(xen_session *session, xen_vbd_metrics *result, xen_vbd vbd)
 {
     abstract_value param_values[] =
diff -r c051ed67258a -r fd7f23e44b11 tools/libxen/src/xen_vif.c
--- a/tools/libxen/src/xen_vif.c        Sat Feb 24 15:30:19 2007 +0000
+++ b/tools/libxen/src/xen_vif.c        Wed Feb 21 23:03:00 2007 +0000
@@ -64,6 +64,9 @@ static const struct_member xen_vif_recor
         { .key = "qos_algorithm_params",
           .type = &abstract_type_string_string_map,
           .offset = offsetof(xen_vif_record, qos_algorithm_params) },
+        { .key = "qos_supported_algorithms",
+          .type = &abstract_type_string_set,
+          .offset = offsetof(xen_vif_record, qos_supported_algorithms) },
         { .key = "metrics",
           .type = &abstract_type_ref,
           .offset = offsetof(xen_vif_record, metrics) }
@@ -94,6 +97,7 @@ xen_vif_record_free(xen_vif_record *reco
     free(record->mac);
     free(record->qos_algorithm_type);
     xen_string_string_map_free(record->qos_algorithm_params);
+    xen_string_set_free(record->qos_supported_algorithms);
     xen_vif_metrics_record_opt_free(record->metrics);
     free(record);
 }
@@ -289,6 +293,23 @@ xen_vif_get_qos_algorithm_params(xen_ses
 
 
 bool
+xen_vif_get_qos_supported_algorithms(xen_session *session, struct 
xen_string_set **result, xen_vif vif)
+{
+    abstract_value param_values[] =
+        {
+            { .type = &abstract_type_string,
+              .u.string_val = vif }
+        };
+
+    abstract_type result_type = abstract_type_string_set;
+
+    *result = NULL;
+    XEN_CALL_("VIF.get_qos_supported_algorithms");
+    return session->ok;
+}
+
+
+bool
 xen_vif_get_metrics(xen_session *session, xen_vif_metrics *result, xen_vif vif)
 {
     abstract_value param_values[] =

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.