Legacy HDS Forums

Automagic label generator for HCS

Discussion created by Legacy HDS Forums on Aug 25, 2011
Latest reply on Nov 18, 2013 by Cris Danci

Originally posted by: cris

Hi Guys,

I had to add a whole bunch of labels tonight in HCS for a large ESX environment, so I decided to automate the process. I've thrown together a small c# application that will poll HCS and automatically update the labels of the volumes to reflect the datastore names in VMware.

I've only tested it in one environment (AMS) and it seemed to work fine. It should work for the USP/VSP since the API call I'm using just returns a attribute called devNum, that is a numeric number for an AMS and a CU:LDEV number on the enterprise array.

[u]If anyone has a test environment [/u](both enterprise or modular) and want to have a crack at it, you can download it from [url="http://www.cris.com.au/downloads/download.php?id=2"]http://www.cris.com.au/downloads/download.php?id=2[/url] [u]FOR THE MOMENT, its not for PRODUCTION[/u] (green fields (ESX, HCS and array) of test environments ONLY) [u]DO NOT USE IT IN A PRODUCTION ENVIROMENT[/u]

Here are some requirements:

HDvM address (IP address or host)
HDvM username
HDvM password
ESX Server, which is the name that appears in HCS (a DNS short name or an IP address won;t work because its not a direct connection)
HCS 7.1.1
The ESX host being poll to already be added through the vMA
A host refresh to be done and completed on the ESX server being polled.

Couple of points.
1. Only one ESX server needs to be done in the cluster if all ESX hosts share the same LUNs.
2. API responses are logged to a file called API_Response.log that is saved in the execution directory. If you have issues please post this file and I'll be more than happy to look at it

Hope it helps someone!