Class XenClient.TemplateOperations
Implements the XenClient virtual machine template operations.
Namespace: Neon.XenServer
Assembly: Neon.XenServer.dll
Syntax
public class XenClient.TemplateOperations
Methods
Destroy(XenTemplate)
Removes a virtual machine template.
Declaration
public void Destroy(XenTemplate template)
Parameters
Type | Name | Description |
---|---|---|
XenTemplate | template | The target template. |
Exceptions
Type | Condition |
---|---|
XenException | Thrown if the operation failed. |
Find(string, string)
Finds a specific virtual machine template by name or unique ID.
Declaration
public XenTemplate Find(string name = null, string uuid = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Specifies the target name. |
string | uuid | Specifies the target unique ID. |
Returns
Type | Description |
---|---|
XenTemplate | The named item or |
Remarks
note
One of name
or uuid
must be specified.
Exceptions
Type | Condition |
---|---|
XenException | Thrown if the operation failed. |
ImportVmTemplate(string, string, string, string)
Installs from an XVA or OVA virtual machine template file on the local workstation to the remote XenServer host an XVA or OVA virtual machine template, optionally renaming it.
Declaration
public XenTemplate ImportVmTemplate(string path, string name = null, string repositoryNameOrUuid = "Local storage", string description = null)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to the template file on the local workstation. |
string | name | The optional template name. |
string | repositoryNameOrUuid | Optionally specifies the target storage repository by name or UUID. |
string | description | Optionally specifies the template description. |
Returns
Type | Description |
---|---|
XenTemplate | The installed template. |
Exceptions
Type | Condition |
---|---|
XenException | Thrown if the operation failed. |
List()
Lists the XenServer virtual machine templates.
Declaration
public List<XenTemplate> List()
Returns
Type | Description |
---|---|
List<XenTemplate> | The list of templates. |
Exceptions
Type | Condition |
---|---|
XenException | Thrown if the operation failed. |
Rename(XenTemplate, string)
Renames a virtual machine template.
Declaration
public XenTemplate Rename(XenTemplate template, string newName)
Parameters
Type | Name | Description |
---|---|---|
XenTemplate | template | The target template. |
string | newName | The new template name. |
Returns
Type | Description |
---|---|
XenTemplate | The modified template. |
Exceptions
Type | Condition |
---|---|
XenException | Thrown if the operation failed. |