Cisco UCS Programmability and Automation Lab v1

Overview

Cisco UCS® is an Integrated Compute Infrastructure that has supported an XML API since its introduction. UCS Manager is the service that provides the XML API endpoint along with a graphical interface and a command line. The UCS components both physical and logical are represented as XML objects in a hierarchical Object Model format and can be manipulated via the XML API.

UCS PowerTool is a library of PowerShell Cmdlets that enable the management of UCS environments from Microsoft Operating Systems, via the UCS XML API.

UCS Python SDK is a set of Python modules, each containing one or more classes, developed specifically to automate UCS Manager.
UCS Python SDK is a community supported project, the code, documentation and samples repositories are on github.com.

Scenarios

This lab includes the following scenarios:

  • Scenario 1: Launch UCS Manager PowerTool
  • Scenario 2: View Cmdlets in UCS PowerTool Library
  • Scenario 3: Query for UCS Objects
  • Scenario 4: Format the Output of PowerTool Queries
  • Scenario 5: Non-Interactive Login to UCS Manager
  • Scenario 6: Use Convert-to-UcsCmdlet with HTML5
  • Scenario 7: Introduction to UCS Python SDK
  • Scenario 8: Use Code Examples to Create Components
  • Scenario 9: Use Python Scripts to Perform Queries

Requirements

Required Optional
  • Laptop
  • Cisco AnyConnect®

Components

  • Cisco UCS Central 1.5(1b)
  • 2 x Cisco UCS Platform Emulator 3.1.2e featuring UCS 6332 FI, S3260 Storage Server, C240 Rack Server, 5108 Chassis and B-Series Blade Servers
  • 1 x Cisco UCS Platform Emulator 3.1.2e featuring UCS 6248UP FI, 5108 Chassis and B-Series Blade Servers
  • 1 x Cisco UCS Platform Emulator 3.1.2e featuring UCS Mini 6324 FI, 5108 Chassis and B-Series Blade Servers
  • Cisco UCS PowerTool Suite 2.1.1.13 featuring Cisco UCS Manager PowerTool, Cisco UCS Central PowerTool, and Cisco IMC PowerTool
  • Python 2.7.11
  • Microsoft System Center 2012 R2 Operations Manager (SCOM)
  • Microsoft Windows Server 2012 R2 Active Directory
  • Microsoft SQL Server 2012
  • Microsoft Windows 8.1 Workstation
  • CentOS 7 Linux Workstation

Features

UCS PowerTool Integration
  • All UCS objects are described in an XML schema, which defines the objects their attributes and associated values. The schema is also used to generate more than 98% of the UCS PowerTool Library. Because a UCS component must be part of the Object Model to be part of the UCS system all components of UCS are always available via the XML API.
  • UCS Manager API interaction can be categorized as follows:
    • Sessions
    • Methods
    • Queries and Filters
    • Configurations and Transactions
    • Event Subscription
  • UCS PowerTool provides services and cmdlets for all the categorizations of UCS Manager API interactions, along with cmdlets that allow for the inspection of object metadata, object hierarchical containment and object cmdlet action capabilities with pipeline object definitions.
UCS Python SDK Integration
  • UCS Python SDK is developed with PEP8 compliance and supports every Managed Object exposed by the UCS XML Object Model. A special function convert_to_ucs_python() enables automatic Python script generation from operations performed in the UCS Manager GUI. Use convert_to_ucs_python() to quickly script UCS tasks.

UCS Programmability Topology.jpgTopology

Resources

US East

US West

EMEAR

APJC

China