HP StorageWorks SAN Virtualization Services Platform Manager command line interface user guide (AG781-96016, March 2009)

3 Using the VSM API to traverse the
snapshot tree
This chapter explains how to traverse the snapshot tree using the VSM API (CLI commands or APIs).
The snapshot tree used to explain the following examples is shown below.
15956
PiT12
PiT6
PiT11
snapshot5
snapshot1
snapshot6
snapshot2
snapshot4
snapshot3
VirtualDisk1
PiT1
PiT2
PiT3
PiT9
PiT10
PiT4
PiT6
PiT5
PiT7
In the figure above, a black line represents a parent-child (or source-child) relationship between the
two objects. The GetSnapshotData command (or VSMGetSnapshotData API) returns (as the
source name) the name of the parent node (virtual disk, snapshot, or PiT) as determined by the above
defintions.
The source of a snapshot can only be a PiT.
The source of a PiT can be a virtual disk, PiT, or snapshot.
The traversal algorithm is as follows:
1. Find a virtual disk by name.
Run the ListVirtualDisks command and find the required virtual disk name in the returned
list.
2. Find a snapshot or PiT by name.
Run the ListSnapshots command, and find the required snapshot or PiT name in the returned
list.
The ListSnapshots command returns an unordered list with the objects “PiT1, . . .,PiT12,
snapshot1, . . . , snapshot6,” including all snapshots or PiT objects. Each returned object has a
master flag property that is TRUE for a PiT, and FALSE for a snapshot.
HP StorageWorks SAN Virtualization Services Platform Manager command line interface user
guide 71