Skip to content

Commit

Permalink
Added description of the examples in the READMEs.
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantina Chremmou <[email protected]>
  • Loading branch information
kc284 committed Aug 22, 2023
1 parent 3d10ae1 commit d432153
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 1 deletion.
21 changes: 21 additions & 0 deletions c/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# libxenserver usage examples

## Overview

The following simple examples are included in this repository:

- `test_enumerate`: Shows how to enumerate the various API objects.

- `test_event_handling`: Shows how to listen for events on a connection.

- `test_get_records`: Shows how to obtain information on API objects such as
hosts, VMs, and storage repositories.

- `test_failures`: Shows how to translate between error strings and
`enum_xen_api_failure`.

- `test_vm_async_migrate`: Shows how to use asynchronous API calls to migrate
running VMs from a slave host to the pool master.

- `test_vm_ops`: Shows how to query the capabilities of a host, create a VM,
attach a fresh blank disk image to the VM, and then perform various powercycle
operations.

## Dependencies

The examples need `libxenserver` which is dependent upon the
Expand Down
11 changes: 11 additions & 0 deletions csharp/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# XenServer.NET usage examples

## Overview

The XenServer.NET examples are shipped as a Microsoft Visual Studio solution.
It includes the following files:

- `GetVariousRecords`: logs to a XenServer host and displays information about
hosts, storage, and virtual machines.

- `VmPowerStates`: logs to a XenServer host, finds a VM and takes it through
the various power states. Requires a shutdown VM to be already installed.

## How to run the examples

Open `XenSdkSample.sln` inside Visual Studio 2022 and compile the solution.
Expand Down
29 changes: 29 additions & 0 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ This folder contains of a number of test programs that can be used as pedagogica
examples accompanying XenServerJava (com.xenserver.xen-api). They are
structured as a Maven project.

## Overview

Running the main file `RunTests` runs a series of examples included in the
same directory:

- `AddNetwork`: Adds a new internal network not attached to any NICs.

- `AsyncVMCreate`: Makes asynchronously a new VM from a built-in template,
starts, and stops it.

- `CreateVM`: Creates a VM on the default SR with a network and DVD drive.

- `EventMonitor`: Listens for events on a connection and prints each event out
as it is received.

- `GetVariousRecords`: Retrieves the records for various types of objects.

- `SessionReuse`: Shows how a Session object can be shared among multiple Connections.

- `SharedStorage`: Creates a shared NFS SR.

- `StartAllVMs`: Connects to a host and tries to start each VM on it.

- `VMlifecycle`: Takes a VM through the various lifecycle states. Requires a
shutdown VM with tools installed.

- `VdiAndSrOps`: Performs various SR and VDI tests, including creating
a dummy SR.

## Dependencies

This code depends on XenServerJava, which in turns depends upon Apache XML-RPC
Expand Down
11 changes: 10 additions & 1 deletion powershell/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# XenServer PowerShell Module usage examples
# XenServer PowerShell Module usage examples

## Overview

- `AutomatedTestCore.ps1`: Shows how to log into a host, create a storage
repository and a VM, and then perform various powercycle operations.

- `HttpTest.ps1`: Shows how to log into a host, create a VM, and then perform
operations such as VM importing and exporting, patch upload, and retrieval
of performance statistics.
26 changes: 26 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# XenAPI.py usage examples

## Overview

The following Python examples are included in this repository:

- `fixpbds.py` - reconfigures the settings used to access shared storage.

- `install.py` - installs a Debian VM, connects it to a network, starts it up and
waits for it to report its IP address.

- `license.py` - uploads a fresh license to a XenServer host.

- `permute.py` - selects a set of VMs and uses live migration to move them
simultaneously among hosts.

- `powercycle.py` - selects a set of VMs and powercycles them.

- `provision.py`: - parses/regenerates the "disk provisioning" XML contained
within templates

- `shutdown.py`: - shows how to prepare and shutdown a host.

- `vm_start_async.py` - shows how to invoke operations asynchronously.

- `watch-all-events.py` - registers for all events and prints details
when they occur.

## How to run the scripts

Each script requires 3 command line arguments:
Expand Down

0 comments on commit d432153

Please sign in to comment.