$\mathit{RW}$ & {\tt platform/enable\_audio} & bool & emulate audio \\
$\mathit{RO}_\mathit{ins}$ & {\tt PCI\_bus} & string & PCI bus path for pass-through devices \\
$\mathit{RO}_\mathit{run}$ & {\tt tools\_version} & (string $\rightarrow$ string) Map & versions of installed paravirtualised drivers \\
-$\mathit{RW}$ & {\tt otherConfig} & (string $\rightarrow$ string) Map & additional configuration \\
+$\mathit{RW}$ & {\tt other\_config} & (string $\rightarrow$ string) Map & additional configuration \\
\hline
\end{longtable}
\subsection{Additional RPCs associated with class: VM}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
-\subsubsection{RPC name:~get\_otherConfig}
+\subsubsection{RPC name:~get\_other\_config}
{\bf Overview:}
-Get the otherConfig field of the given VM.
+Get the other\_config field of the given VM.
\noindent {\bf Signature:}
-\begin{verbatim} ((string -> string) Map) get_otherConfig (session_id s, VM ref self)\end{verbatim}
+\begin{verbatim} ((string -> string) Map) get_other_config (session_id s, VM ref self)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
-\subsubsection{RPC name:~set\_otherConfig}
+\subsubsection{RPC name:~set\_other\_config}
{\bf Overview:}
-Set the otherConfig field of the given VM.
+Set the other\_config field of the given VM.
\noindent {\bf Signature:}
-\begin{verbatim} void set_otherConfig (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
+\begin{verbatim} void set_other_config (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
-\subsubsection{RPC name:~add\_to\_otherConfig}
+\subsubsection{RPC name:~add\_to\_other\_config}
{\bf Overview:}
-map add message derived from field otherConfig of object VM
+Add the given key-value pair to the other\_config field of the given VM.
\noindent {\bf Signature:}
-\begin{verbatim} void add_to_otherConfig (session_id s, VM ref self, string key, string value)\end{verbatim}
+\begin{verbatim} void add_to_other_config (session_id s, VM ref self, string key, string value)\end{verbatim}
\noindent{\bf Arguments:}
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
-\subsubsection{RPC name:~remove\_from\_otherConfig}
+\subsubsection{RPC name:~remove\_from\_other\_config}
{\bf Overview:}
-map remove message derived from field otherConfig of object VM
+Remove the given key and its corresponding value from the other\_config
+field of the given VM. If the key is not in that Map, then do nothing.
\noindent {\bf Signature:}
-\begin{verbatim} void remove_from_otherConfig (session_id s, VM ref self, string key)\end{verbatim}
+\begin{verbatim} void remove_from_other_config (session_id s, VM ref self, string key)\end{verbatim}
\noindent{\bf Arguments:}
bool platform_enable_audio;
char *pci_bus;
xen_string_string_map *tools_version;
- xen_string_string_map *otherconfig;
+ xen_string_string_map *other_config;
} xen_vm_record;
/**
/**
- * Get the otherConfig field of the given VM.
+ * Get the other_config field of the given VM.
*/
extern bool
-xen_vm_get_otherconfig(xen_session *session, xen_string_string_map **result, xen_vm vm);
+xen_vm_get_other_config(xen_session *session, xen_string_string_map **result, xen_vm vm);
/**
/**
- * Set the otherConfig field of the given VM.
+ * Set the other_config field of the given VM.
*/
extern bool
-xen_vm_set_otherconfig(xen_session *session, xen_vm vm, xen_string_string_map *otherconfig);
+xen_vm_set_other_config(xen_session *session, xen_vm vm, xen_string_string_map *other_config);
+
+
+/**
+ * Add the given key-value pair to the other_config field of the given
+ * VM.
+ */
+extern bool
+xen_vm_add_to_other_config(xen_session *session, xen_vm vm, char *key, char *value);
+
+
+/**
+ * Remove the given key and its corresponding value from the
+ * other_config field of the given VM. If the key is not in that Map, then do
+ * nothing.
+ */
+extern bool
+xen_vm_remove_from_other_config(xen_session *session, xen_vm vm, char *key);
/**
{ .key = "tools_version",
.type = &abstract_type_string_string_map,
.offset = offsetof(xen_vm_record, tools_version) },
- { .key = "otherConfig",
+ { .key = "other_config",
.type = &abstract_type_string_string_map,
- .offset = offsetof(xen_vm_record, otherconfig) }
+ .offset = offsetof(xen_vm_record, other_config) }
};
const abstract_type xen_vm_record_abstract_type_ =
free(record->platform_serial);
free(record->pci_bus);
xen_string_string_map_free(record->tools_version);
- xen_string_string_map_free(record->otherconfig);
+ xen_string_string_map_free(record->other_config);
free(record);
}
bool
-xen_vm_get_otherconfig(xen_session *session, xen_string_string_map **result, xen_vm vm)
+xen_vm_get_other_config(xen_session *session, xen_string_string_map **result, xen_vm vm)
{
abstract_value param_values[] =
{
abstract_type result_type = abstract_type_string_string_map;
*result = NULL;
- XEN_CALL_("VM.get_otherConfig");
+ XEN_CALL_("VM.get_other_config");
return session->ok;
}
bool
-xen_vm_set_otherconfig(xen_session *session, xen_vm vm, xen_string_string_map *otherconfig)
+xen_vm_set_other_config(xen_session *session, xen_vm vm, xen_string_string_map *other_config)
{
abstract_value param_values[] =
{
{ .type = &abstract_type_string,
.u.string_val = vm },
{ .type = &abstract_type_string_string_map,
- .u.set_val = (arbitrary_set *)otherconfig }
+ .u.set_val = (arbitrary_set *)other_config }
};
- xen_call_(session, "VM.set_otherConfig", param_values, 2, NULL, NULL);
+ xen_call_(session, "VM.set_other_config", param_values, 2, NULL, NULL);
+ return session->ok;
+}
+
+
+bool
+xen_vm_add_to_other_config(xen_session *session, xen_vm vm, char *key, char *value)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vm },
+ { .type = &abstract_type_string,
+ .u.string_val = key },
+ { .type = &abstract_type_string,
+ .u.string_val = value }
+ };
+
+ xen_call_(session, "VM.add_to_other_config", param_values, 3, NULL, NULL);
+ return session->ok;
+}
+
+
+bool
+xen_vm_remove_from_other_config(xen_session *session, xen_vm vm, char *key)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vm },
+ { .type = &abstract_type_string,
+ .u.string_val = key }
+ };
+
+ xen_call_(session, "VM.remove_from_other_config", param_values, 2, NULL, NULL);
return session->ok;
}
'platform_clock_offset',
'platform_enable_audio',
'platform_keymap',
- 'otherConfig']
+ 'other_config']
VM_methods = [('clone', 'VM'),
('start', None),
('hard_reboot', None),
('suspend', None),
('resume', None),
- ('add_to_otherConfig', None),
- ('remove_from_otherConfig', None)]
+ ('add_to_other_config', None),
+ ('remove_from_other_config', None)]
VM_funcs = [('create', 'VM'),
('get_by_name_label', 'Set(VM)')]
'platform_keymap',
'grub_cmdline',
'PCI_bus',
- 'otherConfig']
+ 'other_config']
def VM_get(self, name, session, vm_ref):
return xen_api_success(
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
return xen_api_success(dom.get_platform_keymap())
- def VM_get_otherConfig(self, session, vm_ref):
- return self.VM_get('otherConfig', session, vm_ref)
+ def VM_get_other_config(self, session, vm_ref):
+ return self.VM_get('otherconfig', session, vm_ref)
def VM_set_name_label(self, session, vm_ref, label):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
def VM_set_platform_enable_audio(self, session, vm_ref, value):
return self.VM_set('platform_enable_audio', session, vm_ref, value)
- def VM_set_otherConfig(self, session, vm_ref, value):
+ def VM_set_other_config(self, session, vm_ref, value):
return self.VM_set('otherconfig', session, vm_ref, value)
- def VM_add_to_otherConfig(self, session, vm_ref, key, value):
+ def VM_add_to_other_config(self, session, vm_ref, key, value):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
if dom and 'otherconfig' in dom.info:
dom.info['otherconfig'][key] = value
return xen_api_success_void()
- def VM_remove_from_otherConfig(self, session, vm_ref, key):
+ def VM_remove_from_other_config(self, session, vm_ref, key):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
if dom and 'otherconfig' in dom.info \
and key in dom.info['otherconfig']:
'platform_keymap': xeninfo.get_platform_keymap(),
'PCI_bus': xeninfo.get_pci_bus(),
'tools_version': xeninfo.get_tools_version(),
- 'otherConfig': xeninfo.info.get('otherconfig'),
+ 'other_config': xeninfo.info.get('otherconfig'),
}
return xen_api_success(record)