Remove VM.actions_after_suspend, which never made any sense.
authorEwan Mellor <ewan@xensource.com>
Tue, 30 Jan 2007 00:34:31 +0000 (00:34 +0000)
committerEwan Mellor <ewan@xensource.com>
Tue, 30 Jan 2007 00:34:31 +0000 (00:34 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
docs/xen-api/xenapi-datamodel.tex
tools/libxen/include/xen_vm.h
tools/libxen/src/xen_vm.c
tools/libxen/test/test_bindings.c

index 47b6a7e9195acf4b570ad032bd3c7e8863ac02a3..5e34bb63e9fd128519df2b546a14e2cecb05558a 100644 (file)
@@ -1034,7 +1034,6 @@ $\mathit{RW}$ &  {\tt VCPUs/number} & int & Current number of VCPUs \\
 $\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/utilisation} & (int $\rightarrow$ float) Map & Utilisation for all of guest's current VCPUs \\
 $\mathit{RW}$ &  {\tt actions/after\_shutdown} & on\_normal\_exit & action to take after the guest has shutdown itself \\
 $\mathit{RW}$ &  {\tt actions/after\_reboot} & on\_normal\_exit & action to take after the guest has rebooted itself \\
-$\mathit{RW}$ &  {\tt actions/after\_suspend} & on\_normal\_exit & action to take after the guest has suspended itself \\
 $\mathit{RW}$ &  {\tt actions/after\_crash} & on\_crash\_behaviour & action to take if the guest crashes \\
 $\mathit{RO}_\mathit{run}$ &  {\tt consoles} & (console ref) Set & virtual console devices \\
 $\mathit{RO}_\mathit{run}$ &  {\tt VIFs} & (VIF ref) Set & virtual network interfaces \\
@@ -2455,72 +2454,6 @@ void
 
 
 
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_actions\_after\_suspend}
-
-{\bf Overview:} 
-Get the actions/after\_suspend field of the given VM.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (on_normal_exit) get_actions_after_suspend (session_id s, VM 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 VM ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-on\_normal\_exit
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~set\_actions\_after\_suspend}
-
-{\bf Overview:} 
-Set the actions/after\_suspend field of the given VM.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} void set_actions_after_suspend (session_id s, VM ref self, on_normal_exit value)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & reference to the object \\ \hline 
-
-{\tt on\_normal\_exit } & 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}
index 091cb34239814548afa71ca3ffbddea920b91e2b..0ef8c4eb7ed2913ddf3a7ee782198ebb46877a1b 100644 (file)
@@ -120,7 +120,6 @@ typedef struct xen_vm_record
     xen_int_float_map *vcpus_utilisation;
     enum xen_on_normal_exit actions_after_shutdown;
     enum xen_on_normal_exit actions_after_reboot;
-    enum xen_on_normal_exit actions_after_suspend;
     enum xen_on_crash_behaviour actions_after_crash;
     struct xen_console_record_opt_set *consoles;
     struct xen_vif_record_opt_set *vifs;
@@ -391,13 +390,6 @@ extern bool
 xen_vm_get_actions_after_reboot(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm);
 
 
-/**
- * Get the actions/after_suspend field of the given VM.
- */
-extern bool
-xen_vm_get_actions_after_suspend(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm);
-
-
 /**
  * Get the actions/after_crash field of the given VM.
  */
@@ -615,13 +607,6 @@ extern bool
 xen_vm_set_actions_after_reboot(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_reboot);
 
 
-/**
- * Set the actions/after_suspend field of the given VM.
- */
-extern bool
-xen_vm_set_actions_after_suspend(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_suspend);
-
-
 /**
  * Set the actions/after_crash field of the given VM.
  */
index 83e107e858c9c8d7c1583ac2376a98c0f84dd8b9..ef26a6836672ab123d21f187812eb1d9217120e9 100644 (file)
@@ -103,9 +103,6 @@ static const struct_member xen_vm_record_struct_members[] =
         { .key = "actions_after_reboot",
           .type = &xen_on_normal_exit_abstract_type_,
           .offset = offsetof(xen_vm_record, actions_after_reboot) },
-        { .key = "actions_after_suspend",
-          .type = &xen_on_normal_exit_abstract_type_,
-          .offset = offsetof(xen_vm_record, actions_after_suspend) },
         { .key = "actions_after_crash",
           .type = &xen_on_crash_behaviour_abstract_type_,
           .offset = offsetof(xen_vm_record, actions_after_crash) },
@@ -587,21 +584,6 @@ xen_vm_get_actions_after_reboot(xen_session *session, enum xen_on_normal_exit *r
 }
 
 
-bool
-xen_vm_get_actions_after_suspend(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vm }
-        };
-
-    abstract_type result_type = xen_on_normal_exit_abstract_type_;
-    XEN_CALL_("VM.get_actions_after_suspend");
-    return session->ok;
-}
-
-
 bool
 xen_vm_get_actions_after_crash(xen_session *session, enum xen_on_crash_behaviour *result, xen_vm vm)
 {
@@ -1111,22 +1093,6 @@ xen_vm_set_actions_after_reboot(xen_session *session, xen_vm vm, enum xen_on_nor
 }
 
 
-bool
-xen_vm_set_actions_after_suspend(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_suspend)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vm },
-            { .type = &xen_on_normal_exit_abstract_type_,
-              .u.string_val = xen_on_normal_exit_to_string(after_suspend) }
-        };
-
-    xen_call_(session, "VM.set_actions_after_suspend", param_values, 2, NULL, NULL);
-    return session->ok;
-}
-
-
 bool
 xen_vm_set_actions_after_crash(xen_session *session, xen_vm vm, enum xen_on_crash_behaviour after_crash)
 {
index f83bd9a39988263c7806822c00b1e21571bd5518..cfd1fb69e7c928fe42b159fef74700d113119613 100644 (file)
@@ -277,13 +277,6 @@ int main(int argc, char **argv)
  */
 static xen_vm create_new_vm(xen_session *session)
 {
-    xen_cpu_feature_set *empty_cpu_feature_set =
-        xen_cpu_feature_set_alloc(0);
-
-    xen_cpu_feature_set *force_off_cpu_feature_set =
-        xen_cpu_feature_set_alloc(1);
-    force_off_cpu_feature_set->contents[0] = XEN_CPU_FEATURE_MMX;
-
     xen_vm_record vm_record =
         {
             .name_label = "NewVM",
@@ -297,13 +290,8 @@ static xen_vm create_new_vm(xen_session *session)
             .vcpus_policy = "credit",
             .vcpus_params = "",
             .vcpus_number = 2,
-            .vcpus_features_required = empty_cpu_feature_set,
-            .vcpus_features_can_use = empty_cpu_feature_set,
-            .vcpus_features_force_on = empty_cpu_feature_set,
-            .vcpus_features_force_off = force_off_cpu_feature_set,
             .actions_after_shutdown = XEN_ON_NORMAL_EXIT_DESTROY,
             .actions_after_reboot = XEN_ON_NORMAL_EXIT_RESTART,
-            .actions_after_suspend = XEN_ON_NORMAL_EXIT_DESTROY,
             .actions_after_crash = XEN_ON_CRASH_BEHAVIOUR_PRESERVE,
             .hvm_boot = "",
             .pv_bootloader = "pygrub",
@@ -317,9 +305,6 @@ static xen_vm create_new_vm(xen_session *session)
     xen_vm vm;
     xen_vm_create(session, &vm, &vm_record);
 
-    xen_cpu_feature_set_free(empty_cpu_feature_set);
-    xen_cpu_feature_set_free(force_off_cpu_feature_set);
-
     if (!session->ok)
     {
         fprintf(stderr, "VM creation failed.\n");