Developer Network Articles and Resources

NetApp Developer Session - Intro into Automating Cisco UCS

This session was about setting up the Cisco UCS emulator and the UCS Powershell toolkit to automate UCS. It included establishing connectivity and some samples. Further the session navigated through a codebase with a rich library of automation samples of UCS and OnTAP for automated setup of FlexPod stack to allow others to reuse the samples and innovate on top of it.

Link to the sample codebase:

https://communities.netapp.com/docs/DOC-13143

https://communities.netapp.com/docs/DOC-14711

Link to the recording:

https://netapp-learningcenter.webex.com/netapp-learningcenter/ldr.php?AT=pb&SP=MC&rID=65551302&rKey=de974d8102e988a4

$ucsHandle = Connect-Ucs -Name "192.168.0.219" -Credential $ucsmcred

$ucsHandle

$rootOrg = Get-UcsOrg -Level root -Ucs $ucsHandle

$rootOrg

Get-Help Get-Ucs*

Get-Member get-ucs*

Get-Help Get-Ucs*

Get-Help set-Ucs*

$res = Get-UcsOrg -Org $rootOrg -Name "gaga" -Ucs $ucsHandle

$res

$res = Get-UcsOrg -Org $rootOrg -Name "11" -Ucs $ucsHandle

Get-UcsOrg -Org $rootOrg -Name "11" -Ucs $ucsHandle

$res

$res = Get-UcsOrg -Org $rootOrg -Name "Finance" -Ucs $ucsHandle

$res

Add-UcsVlan -Name "gaga" -Id 555 -Ucs $ucsHandle

Get-Help Add-UcsVlan

Get-Help Add-UcsVlan -Examples

Get-Help Add-UcsVlan -full

$fabricEthLan = New-Object Cisco.Ucs.FabricEthLan

    $fabricEthLan.Dn = "fabric/lan"

Add-UcsVlan -FabricApplianceCloud $fabricEthLan -Name "gaga" -Id 555 -Ucs $ucsHandle

Add-UcsVlan -FabricApplianceCloud $fabricEthLan -Name "gaga" -Id 555 -DefaultNet "false" -Ucs $ucsHandle

get-help Add-UcsVlan

Add-UcsVlan -FabricLanCloud $fabricEthLan -Name "gaga" -Id 555 -Ucs $ucsHandle

history

Import-Module "C:\Program Files\Cisco\Cisco UCS PowerTool\CiscoUcsPS.psd1"

$ucsHandle

Get-Help get-ucs*

history

Add-UcsVlan -FabricLanCloud $fabricEthLan -Name "thisisourvlan" -Id 999 -DefaultNet false -Ucs $ucsHandle

Slides with background information is in the download section of this page.

Please Note:

All content posted on the NetApp Community is publicly searchable and viewable. Participation in the NetApp Community is voluntary.

In accordance with our Code of Conduct and Community Terms of Use, DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information (PII)
  • Copyrighted materials without the permission of the copyright owner

Continued non-compliance may result in NetApp Community account restrictions or termination.

Replies

Hello,

 

We can also automate configuration and monitoring of Cisco UCS using Python SDK.

 

To make UCS management easier, Cisco has provided a Python SDK library. The Python SDK library abstracts some of the low level details and provide simple APIs to manage UCS. It is easier to automate configuration and monitoring using the abstractions provided by the SDK.

 

Hope you like it.

 

Thanks.

All Community Forums