End to End Automation with REST API in Dell EMC OpenManage Enterprise 3.0 This technical paper describes the uses of REST API use in Dell EMC OpenManage Enterprise 3.0 for Systems Management. Abstract This technical paper describes the uses of REST API use in Dell EMC OpenManage Enterprise 3.0 for Systems Management.
Executive summary Revisions Date Description January 2019 Initial release Acknowledgements This paper was produced by the following members of the Dell EMC storage engineering team: Authors: Reg Stumpe, Pushkala Iyer, Raajeev Kalyanaraman, Amit M Anand, Rakesh Ayolasomyajul, Bhavya DN The information in this publication is provided “as is.” Dell Inc.
Contents Revisions.............................................................................................................................................................................2 Acknowledgements .............................................................................................................................................................2 1 Executive summary ..........................................................................................................................
Executive summary 1 Executive summary OpenManage Enterprise 3.0 is the logical follow-on to the existing OpenManage Essentials (OME) console or its predecessor OpenManage‒Tech Release. OpenManage Enterprise provides REST APIs that can be used by an administrator who wants to invoke it in a programmatic manner. This technical white paper describes some of those use-cases and puts lists the corresponding APIs that must be used. 4 End to End Automation with REST API in Dell EMC OpenManage Enterprise 3.
2 Introduction to REST API in OpenManage Enterprise OpenManage Enterprise 3.0 is the logical follow-on to the existing OpenManage Essentials (OME) console or its predecessor OpenManage Tech Release. The core features of a management console, such as Discovery, Inventory, Monitoring Alerts, Firmware Updates, Reporting, and Configuration are supported with OpenManage Enterprise 3.0.
Introduction to REST API in OpenManage Enterprise A successful discovery task creation returns the following: Response payload from DiscoveryConfigService Enumerating the Jobs by using the JobService will indicate that the Discovery Job has run, because it was instructed to run immediately (Run Now).
Job Service response listing discovery job Note—A python script to discover devices by hostname is attached. 7 End to End Automation with REST API in Dell EMC OpenManage Enterprise 3.
Introduction to REST API in OpenManage Enterprise 2.2 Listing devices, and filtering by type and status After devices are discovered, they can be enumerated by using the DeviceService. The DeviceService on the OpenManage Enterprise appliance encapsulates all details about the devices managed by the appliance, such as the device types that are managed, devices that are managed, their status, and devices that can be globally excluded from being managed or monitored by the console.
The following screen shot shows that there are 72 devices. Screen shot showing 72 devices Note—The following is a simple Python script to list devices. • • 9 One use-case would be to filter the device list by a certain type of devices (say, by Type = Chassis). This can be done using the filter options. https://IP/api/DeviceService/Devices?$filter=Type eq 2000 would return a list of Chassis devices. Another use-case is to figure out which of the devices are powered on.
Introduction to REST API in OpenManage Enterprise 2.3 Retrieving device inventory The api https://IP/api/DeviceService/Devices(id)/InventoryDetails returns the inventory collected for the device, specified by the device ID (id). This Python script retrieves the inventory details of a specific device. 2.4 Get list of groups OpenManage Enterprise has support for both static and dynamic groups that the user can create.
2.7 Get list of reports The most frequently used reports are built-in and available in OpenManage Enterprise. OpenManage Enterprise also enables you to build custom reports, if the built-in reports do not meet your requirements. Both pre-canned and custom reports can be listed by using the ReportService API https://IP/api/ReportService/ReportDefs. The following Python script lists the reports available in an appliance. 2.8 Run a report A report can be run by using the RunReport api on ReportService.
Introduction to REST API in OpenManage Enterprise 2.10 Create Identity Pool Identity Pools provide sets of values that can be used to assign a unique virtual identity to a device for network operations. Virtual identities are used for stateless computing—for example, for transferring (migrating) virtual identity from one device to another.
The example above includes an iSCSI sub-pool; the “IpRange” string is expressed as a range of IP addresses, with a separate “SubnetMask” value specified. Alternatively, the “IpRange” could have been expressed in CIDR format, and the “SubnetMask” value omitted. Note that the starting MAC address (“StartingAddress”) for each protocol sub-pool is expressed as a Base64 value. Several encoder/decoder applications are available online.
Introduction to REST API in OpenManage Enterprise • By cloning a built-in template provided by OpenManage Enterprise. This section discusses the first option—Creating a template from a reference device. A device must be discovered by OpenManage Enterprise before it can be used as a reference device.
The payload used to assign an Identity Pool to a template is also used to specify network-specific settings to use when deploying the template to devices. This network information consists of VLAN Network settings and bandwidth settings for partitioned NIC ports. The following URI and payload are used to create a system configuration template: HTTP Method: URI: POST https:///api/TemplateService/Actions/ TemplateService.
Introduction to REST API in OpenManage Enterprise 2.13 Deploy Template Deploy Template refers to taking the system configuration defined in a template and applying that configuration to one or more target devices. As discussed earlier, when a template is created, it may contain configuration settings for specific functional areas (such as iDRAC, BIOS, and RAID) or a full system configuration. In most cases, deployment involves full system configurations.
If this functionality was not provided in OpenManage Enterprise, you would have to access each target device after deployment completed and customize its boot attributes as required at that point. Being able to do this customization in the Deploy Template wizard is a lot more convenient. Values set in the wizard for boot option attributes are included in the Deploy Template API (discussed below).
Introduction to REST API in OpenManage Enterprise The following example payload requests information about identity values reserved for deployment of template 19 for device 6664: { "TemplateId" : 19, "BaseEntityId" : 6664 } Note that this payload requests assigned identity info for a single target device. When there are multiple target devices, it must be invoked separately for each one.
{ "Id": 5, "Name": "NetModel", "Description": "Hierarchy containing NIC and BIOS Network Settings and Boot Options", "AttributeGroupNames": [], "AttributeGroups": [ { "GroupNameId": 1001, "DisplayName": "NICModel", "SubAttributeGroups": [ { "GroupNameId": 3001, "DisplayName": "Fibre Channel in Mezzanine 2C", "SubAttributeGroups": [ { "GroupNameId": 1, "DisplayName": "Port", "SubAttributeGroups": [ { "GroupNameId": 0, "DisplayName": "BootOptions", "SubAttributeGroups": [], "Attributes": [ { "AttributeId": 0,
Introduction to REST API in OpenManage Enterprise The preceding shows the Boot Option identities for Port 1 of Fibre Channel in Mezzanine 2C. The first “attribute” (with AttributeId 0) provides a title (“First Taget”) for the attributes in that set of boot options.
The full reply listing includes reserved identities and boot options for every card, port, and partition for the specified device, based on the specified template. Deploy Template The Deploy Template API uses the following URI: HTTP Method: URI: POST https:///api/TemplateService/Actions/TemplateService.
Introduction to REST API in OpenManage Enterprise The request does not include any reserved identities, as they are already marked as reserved in the database. It does include the following attributes: ➢ iDRAC Management attributes The iDRAC Management IP page of the Deploy Template wizard enables you to specify a required IP addressing method. One of the following may be selected: “Don’t change IP settings”, “Set as DHCP”, or “Set static IP for each device”.
A Technical support and resources Dell.com/support is focused on meeting customer needs with proven services and support. The Dell EMC OpenManage Enterprise and OpenManage Enterprise-Modular Edition RESTful API Guide available on the support site is a full reference of all APIs supported by the OpenManage Enterprise appliance. 23 End to End Automation with REST API in Dell EMC OpenManage Enterprise 3.