-----Original Message-----
From: rhevm-api-bounces(a)lists.fedorahosted.org
[mailto:rhevm-api-bounces@lists.fedorahosted.org] On Behalf Of Olivier
Renault
Sent: Wednesday, August 11, 2010 10:11 AM
To: rhevm-api(a)lists.fedorahosted.org
Subject: Re: [rhevm-api] REST mapping of some storage commands
On 08/10/2010 12:27 PM, Mark McLoughlin wrote:
Hi,
I'm going through each of the storage related powershell commands which
we don't have an equivalent for in the REST API and trying to figure out
how each should be modelled in a RESTful manner
See below for the list of powershell commands and some notes on each.
Basically, my conclusion so far is:
1) Storage server connections don't need to be modelled in the REST
API
2) We need host actions for discovering pre-configured storage
domains, iSCSI targets, LUNs and VGs
Any and all feedback very welcome.
Thanks,
Mark.
=== Storage Server Connections ===
> From a user's point of view, what is the use case for these commands?
Get-StorageServerConnections
[mp] used in getStorageDomainByConnection
- Lists all connections in the DB
New-StorageServerConnection
[mp] creates new StorageServerConnection & used in
connectStorageToServer
- Just creates a CLIStorageServerConnection, no interaction with the
backend
Add-StorageServerConnection
[mp] currently not in use (done implicitly by BE)
- Runs ConnectStorageToVds backend action which doesn't add the
connection to the DB
Connect-StorageToHost
[mp] used in connectStorageToServer
- Also runs ConnectStorageToVds backend action
Detach-StorageServerConnection
[mp] currently not in use (exist for future needs to
disconnect storage,
Livnat if I'm not mistaken adding this functionality was discussed with
Vitaly...)
- Calls RemoveStorageConnection backend action, which doesn't remove
the connection from the DB
=== Pre-Configured Storage Domains ===
What is the use case of these? e.g. is it to allow an export domain to
be imported into another instance of RHEV-M?
We could support this using a "discoverdomains" host action (similar to
target/device/VG listing below) which would return a<storage_domain/>
representation which could then be POSTed to /storagedomains/ in order
to import it
Get-PreConfiguredStorageDomains
[mp] used to review foreign s. domain (e.g which
not belongs to current
DC)
- Lists existing storage domains at a given NFS mount point
Import-PreConfiguredStorageDomain
[mp] used to import foreign s. domain
- Adds a storage domain which has already been initialized
=== Listing Targets/Devices/VGs ==
All of these would probably make sense to support as host action (rather
than including the results in the host representation) since each needs
an expensive query to be run on the host
Get-StorageDevices
[mp] used in storage domain creation, for specific LUN
selection
- Runs GetDeviceList query
Get-StorageVolumeGroups
[mp] used in storage domain creation, for specific VG
selection
- Runs GetVgList query
Get-StorageServerSendTargets
[mp] used for ISCSI connection status monitoring
- Runs DiscoverSendTargets backend query, which runs iSCSI SendTarget
on a portal listing the available targets
- This is the most RPC-like, since it requires a portal parameter.
Could we also have a command which list the disk of a given VM ? May be
also list the snapshot and enable us to move back to a previous snapshot
version ?
[mp] to list all disks of a given VM, you should invoke .GetDiskImages()
method on CLIVm entity, e.g $vm.GetDiskImages()
[mp] to list all snapshots use Get-Snapshot cmdlet
[mp] to move back to a previous snapshot use Restore-Vm cmdlet
Regards,
Olivier
_______________________________________________
rhevm-api mailing list
rhevm-api(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhevm-api
No virus found in this incoming message.
Checked by AVG -
www.avg.com
Version: 9.0.851 / Virus Database: 271.1.1/3044 - Release Date: 08/10/10
21:34:00