« Back to Microsoft Discussions

UCSM .NET SDK Sample Code!!

Combination View Flat View Tree View
Threads [ Previous | Next ]
UCSM .NET SDK Sample Code!!
ucs powershell microsoft ucsm .net csharp
Answer
6/2/11 6:26 PM
Hi, Everyone!  The dev team that wrote the UCSM PowerShell toolkit and SDK built a sample app to show off the .NET integration possible.  Its a really nifty little object browser that uses the .NET classes built out for the UCSM data model.  We decided it should be posted here to give folks an idea of what's possible with the .NET code, and how to use it.  The sample code is all in C#.  We'll release some vb.net samples as well over time.
 
There are two files:
 - CiscoUCSApplication - Compiled.zip is an archive with teh compiled binary from the project.  Make sure you extract both files into a directory, then it should just run.
 - UCSApplication - SourceCode.zip is the zip file containing the Visual Studio project directory.  Assuming you're using Visual Studio, you can open the entire project once you've extracted it simply by double-clicking the .sln file inside the archive in the first folder.
 
Give it a try, and ask any questions that you might have.  We're excited to see what people can do with it!!
 
Josh
Attachments:

Many thanks for this, I can follow the provided code fine (and get it to work without issues against our UCS clusters), but I'm struggling to adapt the code for cases where the API doesn't appear to directly provide a 'Get' method:

e.g. computeBlade.getBlades(_connectionObject) is fine and returns all of the hierarchy and members I'd expect to see, including (for example) the computeBlade.totalMemory property telling me how much memory is installed in each Blade.

But how about if I want to see details for each memory slot on each blade ? I know I can do this from XML query with:
<configResolveChildren cookie="<real cookie>" inHierarchical="false" inDn="sys/chassis-1/blade-1/board/memarray-1"/>

How would I go about coding the same query from the .NET API and get the results in a useable form ?

In this particular case I'm interested in knowing the exact sizes and speeds of each individual DIMM module installed in each server, but guess the same will apply to many other classes which don't appear to have a direct 'Get' method.

Also - the CHM file for the SDK included in the download is a bit of a 'mess' for me - not sure if this is a general issue or expected, but I get a LARGE number of 'Missing <summary> documentation for....' in the CHM and the search function always returns 0 results. Is there any other (online ?) source of the API documentation ?

Many thanks, Jon.

Hi,
I am looking for a way to send simple XML data to the UCSM once i am login to the system.
do API provide any way to do it?
 
Many Thanks,
Shachar