├── source ├── includes │ ├── _ilo4_events.md │ ├── _ilo5_evtshdr.md │ ├── _ilo5_events.md │ ├── _ilo5_reference.md │ ├── _ilo5_troubleshooting.md │ ├── _ilo4_reference.md │ ├── _ilo4_evtshdr.md │ ├── _ilo5_msgreghdr.md │ ├── _ilo4_msgreghdr.md │ ├── _ilo5_resttool.md │ ├── _ilo4_resources.md │ ├── _ilo5_resources.md │ ├── _ilo5_errata.md │ ├── _ilo5_vnic.md │ ├── _ilo4_errata.md │ ├── _ilo5_introduction.md │ ├── _ilo5_serialinterface.md │ ├── _ilo4_errorhandling.md │ ├── _ilo5_errorhandling.md │ ├── _ilo5_bestpractice.md │ ├── _ilo4_bestpractice.md │ ├── _ilo4_subscribing.md │ ├── _ilo5_subscribing.md │ ├── _ilo5_performingaction.md │ ├── _ilo5_time.md │ ├── _ilo4_hprest.md │ ├── _ilo4_performingaction.md │ ├── _ilo4_resourcedefnhdr.md │ ├── _ilo5_resourcedefnhdr.md │ ├── _ilo5_backupandrestore.md │ ├── _ilo4_introduction.md │ ├── _ilo5_securityservice.md │ ├── _ilo5_authentication.md │ ├── _ilo4_authentication.md │ ├── _ilo5_drivebaymapping.md │ ├── _ilo4_gettingstarted.md │ ├── _ilo4_navigating.md │ ├── _ilo5_navigating.md │ ├── _ilo5_logging.md │ ├── _ilo5_securesystemerase.md │ └── _ilo5_gettingstarted.md ├── fonts │ ├── slate.eot │ ├── slate.ttf │ ├── slate.woff │ ├── slate.woff2 │ └── slate.svg ├── images │ ├── logo.png │ └── navbar.png ├── javascripts │ ├── all_nosearch.js │ ├── all.js │ ├── app │ │ ├── _toc.js │ │ ├── _search.js │ │ └── _lang.js │ └── lib │ │ ├── _jquery.highlight.js │ │ ├── _energize.js │ │ └── _imagesloaded.min.js ├── index.html.md ├── ilo4 │ └── index.html.md ├── stylesheets │ ├── _icon-font.scss │ ├── print.css.scss │ └── _variables.scss ├── ilo5 │ └── index.html.md └── layouts │ └── layout.erb ├── .travis.yml ├── Gemfile ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE.md └── CODEOWNERS ├── lib └── multilang.rb ├── .gitignore ├── LICENSE ├── config.rb ├── Vagrantfile ├── CHANGELOG.md ├── Gemfile.lock ├── font-selection.json ├── README.md └── deploy.sh /source/includes/_ilo4_events.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/includes/_ilo5_evtshdr.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/includes/_ilo5_events.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/includes/_ilo5_reference.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/includes/_ilo5_troubleshooting.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/fonts/slate.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/ilo-rest-api-docs/HEAD/source/fonts/slate.eot -------------------------------------------------------------------------------- /source/fonts/slate.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/ilo-rest-api-docs/HEAD/source/fonts/slate.ttf -------------------------------------------------------------------------------- /source/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/ilo-rest-api-docs/HEAD/source/images/logo.png -------------------------------------------------------------------------------- /source/fonts/slate.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/ilo-rest-api-docs/HEAD/source/fonts/slate.woff -------------------------------------------------------------------------------- /source/fonts/slate.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/ilo-rest-api-docs/HEAD/source/fonts/slate.woff2 -------------------------------------------------------------------------------- /source/images/navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/ilo-rest-api-docs/HEAD/source/images/navbar.png -------------------------------------------------------------------------------- /source/javascripts/all_nosearch.js: -------------------------------------------------------------------------------- 1 | //= require ./lib/_energize 2 | //= require ./app/_lang 3 | //= require ./app/_toc 4 | -------------------------------------------------------------------------------- /source/javascripts/all.js: -------------------------------------------------------------------------------- 1 | //= require ./lib/_energize 2 | //= require ./app/_lang 3 | //= require ./app/_search 4 | //= require ./app/_toc 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: ruby 4 | 5 | rvm: 6 | - 2.2.5 7 | - 2.3.3 8 | - 2.4.0 9 | 10 | cache: bundler 11 | script: bundle exec middleman build 12 | -------------------------------------------------------------------------------- /source/includes/_ilo4_reference.md: -------------------------------------------------------------------------------- 1 | # Reference 2 | 3 | The API conforms to the Redfish standard. For more details see [http:// www.dmtf.org/standards/redfish](http:// www.dmtf.org/standards/redfish) 4 | 5 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Middleman 4 | gem 'middleman', '~>4.2.1' 5 | gem 'middleman-syntax', '~> 3.0.0' 6 | gem 'middleman-autoprefixer', '~> 2.7.0' 7 | gem "middleman-sprockets", "~> 4.1.0" 8 | gem 'rouge', '~> 2.0.5' 9 | gem 'redcarpet', '~> 3.4.0' 10 | -------------------------------------------------------------------------------- /source/index.html.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: API Reference 3 | 4 | language_tabs: 5 | - shell: cURL 6 | - python 7 | 8 | toc_footers: 9 | - Documentation Powered by Slate 10 | 11 | includes: 12 | 13 | 14 | search: false 15 | --- 16 | -------------------------------------------------------------------------------- /source/includes/_ilo4_evtshdr.md: -------------------------------------------------------------------------------- 1 | ## Event Definitions 2 | 3 | iLO's REST API has an event subscription service enabling clients to subscribe to events (in the form of Redfish-style POST operations) to a URI of choice. The following events are defined by iLO. 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /source/includes/_ilo5_msgreghdr.md: -------------------------------------------------------------------------------- 1 | # Response Message Definitions 2 | 3 | API Responses are discussed in the section Handling Error Responses. The responses contain one or more "MessageId" properties each corresponding to an entry in a message registry. This section is a reference for the defined message registry entries. 4 | 5 | -------------------------------------------------------------------------------- /source/includes/_ilo4_msgreghdr.md: -------------------------------------------------------------------------------- 1 | ## Response Message Definitions 2 | 3 | API Responses are discussed in the section Handling Error Responses. The responses contain one or more "MessageId" properties each corresponding to an entry in a message registry. This section is a reference for the defined message registry entries. 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /source/includes/_ilo5_resttool.md: -------------------------------------------------------------------------------- 1 | # Using the RESTful Interface Tool 2 | 3 | Although not a requirement, you can use the RESTful Interface Tool with the RESTful API. This 4 | command line tool provides a level of abstraction and convenience above direct access to the 5 | RESTful API. For more information, see: [http://www.hpe.com/info/resttool](http://www.hpe.com/info/resttool). 6 | 7 | 8 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Make sure you've checked off all these things before submitting: 2 | 3 | - [ ] This pull request isn't for a company's fork, it's intended for the upstream Slate shared by everybody. 4 | - [ ] This pull request is submitted to the `dev` branch. 5 | - [ ] If it makes frontend changes, this pull request has been tested in the latest version of Firefox, Chrome, IE, and Safari. 6 | -------------------------------------------------------------------------------- /source/includes/_ilo4_resources.md: -------------------------------------------------------------------------------- 1 | # Other Web Resources 2 | 3 | * Redfish 1.0 DMTF standard at [http://www.dmtf.org/standards/redfish](http:// www.dmtf.org/standards/redfish) 4 | 5 | * HPE RESTful API Home page: [http://www.hpe.com/info/restfulapi](http://www.hpe.com/info/restfulapi). 6 | 7 | * Example Python code: [https://github.com/HewlettPackard/python-proliant-sdk](https://github.com/HewlettPackard/python-proliant-sdk). 8 | 9 | -------------------------------------------------------------------------------- /source/includes/_ilo5_resources.md: -------------------------------------------------------------------------------- 1 | # Other Web Resources 2 | 3 | * Redfish DMTF standard at [http://www.dmtf.org/standards/redfish](http://www.dmtf.org/standards/redfish). 4 | 5 | * HPE RESTful API Home page: [http://www.hpe.com/info/restfulapi](http://www.hpe.com/info/restfulapi). 6 | 7 | * Example Python code: [https://github.com/HewlettPackard/python-ilorest-library](https://github.com/HewlettPackard/python-ilorest-library). 8 | -------------------------------------------------------------------------------- /lib/multilang.rb: -------------------------------------------------------------------------------- 1 | module Multilang 2 | def block_code(code, full_lang_name) 3 | parts = full_lang_name.split('--') 4 | rouge_lang_name = parts[0] || "" 5 | super(code, rouge_lang_name).sub("highlight #{rouge_lang_name}") do |match| 6 | match + " tab-" + full_lang_name 7 | end 8 | end 9 | end 10 | 11 | require 'middleman-core/renderers/redcarpet' 12 | Middleman::Renderers::MiddlemanRedcarpetHTML.send :include, Multilang 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | If this is a question or feature request, make sure to: 2 | 3 | - [ ] The title starts with `Question:` or `Feature:`. 4 | 5 | If this is an bug report, not a question, make sure to: 6 | 7 | - [ ] I'm not running Windows (which is unsupported), or if I am, I can confirm this issue appears on another platform, or Vagrant. 8 | - [ ] This issue appears in the latest `dev` branch. 9 | - [ ] I've included my browser and Ruby version in this issue. 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | coverage 6 | InstalledFiles 7 | lib/bundler/man 8 | pkg 9 | rdoc 10 | spec/reports 11 | test/tmp 12 | test/version_tmp 13 | tmp 14 | *.DS_STORE 15 | build/ 16 | .cache 17 | .vagrant 18 | .sass-cache 19 | 20 | # YARD artifacts 21 | .yardoc 22 | _yardoc 23 | doc/ 24 | .idea/ 25 | 26 | source/includes/_ilo5_new_feature_template-FDZ.md 27 | source/includes/_ilo5_new_feature_template-Nanada.md 28 | PRIVATE-Doc-Update-Instructions.md 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008-2013 Concur Technologies, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | not use this file except in compliance with the License. You may obtain 5 | a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | License for the specific language governing permissions and limitations 13 | under the License. -------------------------------------------------------------------------------- /source/ilo4/index.html.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: API Reference 3 | 4 | language_tabs: 5 | - shell: cURL 6 | - python 7 | 8 | toc_footers: 9 | - Documentation Powered by Slate 10 | 11 | includes: 12 | - ilo4_introduction 13 | - ilo4_gettingstarted 14 | - ilo4_navigating 15 | - ilo4_authentication 16 | - ilo4_performingaction 17 | - ilo4_exampleuse 18 | - ilo4_errorhandling 19 | - ilo4_subscribing 20 | - ilo4_hprest 21 | - ilo4_bestpractice 22 | - ilo4_errata 23 | - ilo4_resources 24 | - ilo4_reference 25 | - ilo4_resourcedefnhdr 26 | - ilo4_resourcedefns 27 | - ilo4_msgreghdr 28 | - ilo4_msgregs 29 | - ilo4_evtshdr 30 | - ilo4_events 31 | 32 | search: false 33 | --- 34 | -------------------------------------------------------------------------------- /source/includes/_ilo5_errata.md: -------------------------------------------------------------------------------- 1 | # Errata 2 | 3 | ## EthernetInterfaces for ComputerSystem 4 | In iLO 5 1.10, the link (@odata.id) to the EthernetInterfacesCollection is in the wrong location in the ComputerSystem resource. It should be a link directly from the root of the resource. 5 | 6 | ```json 7 | { 8 | "EthernetInterfaces": { 9 | "@odata.id": "" 10 | } 11 | } 12 | ``` 13 | 14 | In iLO 5 1.10 it is instead in the Hpe OEM sub-object: 15 | 16 | ```json 17 | { 18 | "Oem": { 19 | "Hpe": { 20 | "EthernetInterfaces": { 21 | "@odata.id": "" 22 | } 23 | } 24 | } 25 | } 26 | ``` 27 | 28 | Future iLO 5 firmware will correct this by adding the additional corrected link. 29 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Code owners list. 2 | # Each line is a file pattern followed by one or more owners. 3 | # These owners will be the default owners for everything in 4 | # the repo. Unless a later match takes precedence. 5 | 6 | # If a sub directory has additional owners than the root directory, then that rule should 7 | # come after the rule for the root directory. Because the latter takes precedence. 8 | # Be careful to add the owner of the root directory to the latter rule. 9 | 10 | # Default owners. 11 | # If a file doesn't match any of the below rules, then this rule will apply. 12 | * @malhotrs @nandagopal-nv @umaurmi 13 | 14 | # Owners for git settings. 15 | /.github/ @malhotrs @nandagopal-nv 16 | -------------------------------------------------------------------------------- /source/stylesheets/_icon-font.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'slate'; 3 | src:font-url('slate.eot?-syv14m'); 4 | src:font-url('slate.eot?#iefix-syv14m') format('embedded-opentype'), 5 | font-url('slate.woff2?-syv14m') format('woff2'), 6 | font-url('slate.woff?-syv14m') format('woff'), 7 | font-url('slate.ttf?-syv14m') format('truetype'), 8 | font-url('slate.svg?-syv14m#slate') format('svg'); 9 | font-weight: normal; 10 | font-style: normal; 11 | } 12 | 13 | %icon { 14 | font-family: 'slate'; 15 | speak: none; 16 | font-style: normal; 17 | font-weight: normal; 18 | font-variant: normal; 19 | text-transform: none; 20 | line-height: 1; 21 | } 22 | 23 | %icon-exclamation-sign { 24 | @extend %icon; 25 | content: "\e600"; 26 | } 27 | %icon-info-sign { 28 | @extend %icon; 29 | content: "\e602"; 30 | } 31 | %icon-ok-sign { 32 | @extend %icon; 33 | content: "\e606"; 34 | } 35 | %icon-search { 36 | @extend %icon; 37 | content: "\e607"; 38 | } 39 | -------------------------------------------------------------------------------- /source/ilo5/index.html.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: iLO 5 Redfish API Reference document 3 | 4 | language_tabs: 5 | - shell: cURL 6 | - python 7 | 8 | toc_footers: 9 | - Documentation Powered by Slate 10 | 11 | includes: 12 | - ilo5_introduction 13 | - ilo5_changelog 14 | - ilo5_gettingstarted 15 | - ilo5_navigating 16 | - ilo5_authentication 17 | - ilo5_performingaction 18 | - ilo5_adaptation 19 | - ilo5_accountservice 20 | - ilo5_time 21 | - ilo5_exampleuse 22 | - ilo5_updateservicedoc 23 | - ilo5_biosdoc 24 | - ilo5_sslcertdoc 25 | - ilo5_securityservice 26 | - ilo5_vnic 27 | - ilo5_securesystemerase 28 | - ilo5_storage 29 | - ilo5_frus 30 | - ilo5_logging 31 | - ilo5_serialinterface 32 | - ilo5_configurepmm 33 | - ilo5_drivebaymapping 34 | - ilo5_errorhandling 35 | - ilo5_subscribing 36 | - ilo5_resttool 37 | - ilo5_bestpractice 38 | - ilo5_errata 39 | - ilo5_resources 40 | - ilo5_reference 41 | - ilo5_resmap 42 | - ilo5_resourcedefnhdr 43 | - ilo5_resourcedefns 44 | - ilo5_msgreghdr 45 | - ilo5_msgregs 46 | - ilo5_evtshdr 47 | - ilo5_events 48 | - ilo5_troubleshooting 49 | 50 | search: false 51 | --- 52 | -------------------------------------------------------------------------------- /config.rb: -------------------------------------------------------------------------------- 1 | # Markdown 2 | set :markdown_engine, :redcarpet 3 | set :markdown, 4 | fenced_code_blocks: true, 5 | smartypants: true, 6 | disable_indented_code_blocks: true, 7 | prettify: true, 8 | tables: true, 9 | with_toc_data: true, 10 | no_intra_emphasis: true 11 | 12 | # Assets 13 | set :css_dir, 'stylesheets' 14 | set :js_dir, 'javascripts' 15 | set :images_dir, 'images' 16 | set :fonts_dir, 'fonts' 17 | 18 | # Activate the syntax highlighter 19 | activate :syntax 20 | #ready do ### MRG - this caused an error in ./deploy.sh and middleman build --verbose ('split' not defined) 21 | # require './lib/multilang.rb' 22 | #end 23 | 24 | activate :sprockets 25 | 26 | activate :autoprefixer do |config| 27 | config.browsers = ['last 2 version', 'Firefox ESR'] 28 | config.cascade = false 29 | config.inline = true 30 | end 31 | 32 | # Github pages require relative links 33 | activate :relative_assets 34 | set :relative_links, true 35 | 36 | # Build Configuration 37 | configure :build do 38 | # If you're having trouble with Middleman hanging, commenting 39 | # out the following two lines has been known to help 40 | activate :minify_css 41 | activate :minify_javascript 42 | # activate :relative_assets 43 | # activate :asset_hash 44 | # activate :gzip 45 | end 46 | 47 | # Deploy Configuration 48 | # If you want Middleman to listen on a different port, you can set that below 49 | set :port, 4567 50 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | Vagrant.configure(2) do |config| 2 | config.vm.box = "ubuntu/trusty64" 3 | config.vm.network :forwarded_port, guest: 4567, host: 4567 4 | 5 | config.vm.provision "bootstrap", 6 | type: "shell", 7 | inline: <<-SHELL 8 | sudo apt-get update 9 | sudo apt-get install -yq ruby2.0 ruby2.0-dev pkg-config build-essential nodejs git libxml2-dev libxslt-dev 10 | sudo apt-get autoremove -yq 11 | gem2.0 install --no-ri --no-rdoc bundler 12 | SHELL 13 | 14 | # add the local user git config to the vm 15 | config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" 16 | 17 | config.vm.provision "install", 18 | type: "shell", 19 | privileged: false, 20 | inline: <<-SHELL 21 | echo "==============================================" 22 | echo "Installing app dependencies" 23 | cd /vagrant 24 | bundle config build.nokogiri --use-system-libraries 25 | bundle install 26 | SHELL 27 | 28 | config.vm.provision "run", 29 | type: "shell", 30 | privileged: false, 31 | run: "always", 32 | inline: <<-SHELL 33 | echo "==============================================" 34 | echo "Starting up middleman at http://localhost:4567" 35 | echo "If it does not come up, check the ~/middleman.log file for any error messages" 36 | cd /vagrant 37 | bundle exec middleman server --force-polling --latency=1 &> ~/middleman.log & 38 | SHELL 39 | end 40 | -------------------------------------------------------------------------------- /source/includes/_ilo5_vnic.md: -------------------------------------------------------------------------------- 1 | # Managing the iLO Redfish Host Interface ("Virtual NIC") 2 | iLO 5 1.40 adds a virtual network interface to access iLO's HTTPS resources (including the Redfish API and the Web GUI) to the host. This interface is disabled by default in Gen10 servers but may be enabled by default in future servers. 3 | 4 | When accessing iLO 5 through the virtual network interface, authentication is enforced. 5 | 6 | ## Enabling the Virtual NIC 7 | The Virtual NIC (also known as the Redfish Host API) is disabled by default but may be enabled either though the Web GUI or by a Redfish operation. An iLO reset is required for this change to take effect. 8 | 9 | > PATCH /redfish/v1/Managers/{managerId}/ 10 | 11 | ```json 12 | { 13 | "Oem": { 14 | "Hpe": { 15 | "VirtualNICEnabled": true 16 | } 17 | } 18 | } 19 | ``` 20 | 21 | ## Using the Virtual NIC 22 | When enabled, software running on the server operating system may access the iLO 5 Web GUI or Redfish API using IP address `16.1.15.1`. Normal authentication is required. 23 | 24 | **NOTE: The Virtual NIC does NOT act as a passthrough to traffic on the iLO 5 network connection. It is a separate network connection into iLO's resources.** 25 | 26 | ## Disabling the Virtual NIC 27 | The Virtual NIC may be disabled either though the Web GUI or by a Redfish operation. An iLO reset is required for this change to take effect. 28 | 29 | > PATCH /redfish/v1/Managers/{managerId}/ 30 | 31 | ```json 32 | { 33 | "Oem": { 34 | "Hpe": { 35 | "VirtualNICEnabled": false 36 | } 37 | } 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /source/javascripts/app/_toc.js: -------------------------------------------------------------------------------- 1 | //= require ../lib/_jquery 2 | //= require ../lib/_jquery_ui 3 | //= require ../lib/_jquery.tocify 4 | //= require ../lib/_imagesloaded.min 5 | (function (global) { 6 | 'use strict'; 7 | 8 | var closeToc = function() { 9 | $(".tocify-wrapper").removeClass('open'); 10 | $("#nav-button").removeClass('open'); 11 | }; 12 | 13 | var makeToc = function() { 14 | global.toc = $("#toc").tocify({ 15 | selectors: 'h1, h2, h3', 16 | extendPage: false, 17 | theme: 'none', 18 | smoothScroll: false, 19 | showEffectSpeed: 0, 20 | hideEffectSpeed: 180, 21 | ignoreSelector: '.toc-ignore', 22 | highlightOffset: 60, 23 | scrollTo: -1, 24 | scrollHistory: true, 25 | hashGenerator: function (text, element) { 26 | return element.prop('id'); 27 | } 28 | }).data('toc-tocify'); 29 | 30 | $("#nav-button").click(function() { 31 | $(".tocify-wrapper").toggleClass('open'); 32 | $("#nav-button").toggleClass('open'); 33 | return false; 34 | }); 35 | 36 | $(".page-wrapper").click(closeToc); 37 | $(".tocify-item").click(closeToc); 38 | }; 39 | 40 | // Hack to make already open sections to start opened, 41 | // instead of displaying an ugly animation 42 | function animate() { 43 | setTimeout(function() { 44 | toc.setOption('showEffectSpeed', 180); 45 | }, 50); 46 | } 47 | 48 | $(function() { 49 | makeToc(); 50 | animate(); 51 | setupLanguages($('body').data('languages')); 52 | $('.content').imagesLoaded( function() { 53 | global.toc.calculateHeights(); 54 | }); 55 | }); 56 | })(window); 57 | 58 | -------------------------------------------------------------------------------- /source/javascripts/app/_search.js: -------------------------------------------------------------------------------- 1 | //= require ../lib/_lunr 2 | //= require ../lib/_jquery 3 | //= require ../lib/_jquery.highlight 4 | (function () { 5 | 'use strict'; 6 | 7 | var content, searchResults; 8 | var highlightOpts = { element: 'span', className: 'search-highlight' }; 9 | 10 | var index = new lunr.Index(); 11 | 12 | index.ref('id'); 13 | index.field('title', { boost: 10 }); 14 | index.field('body'); 15 | index.pipeline.add(lunr.trimmer, lunr.stopWordFilter); 16 | 17 | $(populate); 18 | $(bind); 19 | 20 | function populate() { 21 | $('h1, h2').each(function() { 22 | var title = $(this); 23 | var body = title.nextUntil('h1, h2'); 24 | index.add({ 25 | id: title.prop('id'), 26 | title: title.text(), 27 | body: body.text() 28 | }); 29 | }); 30 | } 31 | 32 | function bind() { 33 | content = $('.content'); 34 | searchResults = $('.search-results'); 35 | 36 | $('#input-search').on('keyup', search); 37 | } 38 | 39 | function search(event) { 40 | unhighlight(); 41 | searchResults.addClass('visible'); 42 | 43 | // ESC clears the field 44 | if (event.keyCode === 27) this.value = ''; 45 | 46 | if (this.value) { 47 | var results = index.search(this.value).filter(function(r) { 48 | return r.score > 0.0001; 49 | }); 50 | 51 | if (results.length) { 52 | searchResults.empty(); 53 | $.each(results, function (index, result) { 54 | var elem = document.getElementById(result.ref); 55 | searchResults.append("
  • " + $(elem).text() + "
  • "); 56 | }); 57 | highlight.call(this); 58 | } else { 59 | searchResults.html('
  • '); 60 | $('.search-results li').text('No Results Found for "' + this.value + '"'); 61 | } 62 | } else { 63 | unhighlight(); 64 | searchResults.removeClass('visible'); 65 | } 66 | } 67 | 68 | function highlight() { 69 | if (this.value) content.highlight(this.value, highlightOpts); 70 | } 71 | 72 | function unhighlight() { 73 | content.unhighlight(highlightOpts); 74 | } 75 | })(); 76 | -------------------------------------------------------------------------------- /source/includes/_ilo4_errata.md: -------------------------------------------------------------------------------- 1 | # API Errata 2 | 3 | ## Using PowerShell with the API 4 | ``` 5 | ConvertFrom-Json : Cannot convert the JSON string because a dictionary that was converted from the string contains the duplicated keys 'MACAddress' and 6 | 'MacAddress'. 7 | At line:1 char:6 8 | + $a | ConvertFrom-Json 9 | + ~~~~~~~~~~~~~~~~ 10 | + CategoryInfo : InvalidOperation: (:) [ConvertFrom-Json], InvalidOperationException 11 | + FullyQualifiedErrorId : DuplicateKeysInJsonString,Microsoft.PowerShell.Commands.ConvertFromJsonCommand 12 | ``` 13 | 14 | The HP REST API on iLO 4 2.30 and later contains a JSON-formatted resource that is incompatible with PowerShell’s `ConvertFrom-Json` cmdlet, resulting in an error when a PowerShell script attempts to parse the JSON response string. 15 | 16 | A PowerShell script will emit an error parsing JSON when reading the iLO 4 Ethernet configuration and status resource at `/redfish/v1/managers/{item}/ethernetinterfaces/{item}`: 17 | 18 | The cause of the problem is that iLO 4 presents the MAC Address of the network controller in two separate properties differing only by character case. The existing REST API in iLO 4 2.30 and earlier contains a property called `MacAddress`. Additionally, iLO 4 2.30 adds the Redfish conformant versions of properties, which includes `MACAddress`. This would not be a problem for clients that treat JSON as case sensitive, but PowerShell’s ConvertFrom-Json is not case sensitive and results in an error. 19 | 20 | Three client code fixes are possible: 21 | 22 | 1. The client may pre-process the JSON string to replace one of the colliding substrings before converting it to a hash table with `ConvertFrom-Json`. For instance, one could replace the string `MacAddress` with `MacAddressUnused` or alter `MACAddress` instead. 23 | 2. The client may create or use a different hash table structure in PowerShell that is case sensitive. 24 | 3. The client may include the Redfish mandated HTTP header `"OData-Version”: 4.0`. This header causes iLO 4 to hide non-Redfish conformant properties including the older `MacAddress` property. 25 | 26 | Solution #3 is the most strategically forward-thinking solution if the clients intends to be Redfish conformant. 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /source/includes/_ilo5_introduction.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | The iLO RESTful API for HPE iLO 5 is a programming interface enabling state-of-the-art server management. This document contains helpful information about how to interact with the iLO RESTful API. The iLO RESTful API uses the basic HTTP operations (GET, PUT, POST, DELETE, and PATCH) to submit or return a JSON formatted resource to or from a URI on iLO 5. 4 | 5 | With modern scripting languages, you can easily write simple REST clients for RESTful APIs. Most languages, like Python, can transform JSON into internal-data structures, like dictionaries, allowing for easy access to data. This enables you to write custom code directly to the iLO RESTful API, instead of using intermediate tools such as HPE’s HPQLOCFG or CONREP. 6 | 7 | ## Redfish Conformance 8 | 9 | iLO 5's Redfish conformance details are available in this document in the **[Managing Hewlett Packard Enterprise Servers Using the RESTful API](https://support.hpe.com/hpesc/public/docDisplay?docId=c04423967)**. 10 | 11 | ## Key benefits of the iLO RESTful API 12 | 13 | The iLO RESTful API is becoming the main management interface for Hewlett Packard Enterprise servers with iLO 5. Its feature set will become larger than the existing iLO XML API (RIBCL) and IPMI interfaces. Using the iLO RESTful API, you can take full inventory of the server, control power and reset, configure BIOS and iLO settings, fetch event logs, as well as many other functions. 14 | 15 | The iLO RESTful API follows the trend of the Internet in moving to a common pattern for new software interfaces. Many web services in a variety of industries use REST APIs because they are easy to implement, easy to consume, and offer scalability advantages over previous technologies. 16 | 17 | HPE OneView, OpenStack, and many other server management APIs are now REST APIs. Most Hewlett Packard Enterprise Management software offerings, as well as the entire Software Defined Infrastructure, are built upon REST APIs. 18 | 19 | The iLO RESTful API has the additional advantage of consistency across all present and projected server architectures. The same data model works for traditional rack-mount servers, blades, as well as newer types of systems. This advantage comes because the data model is designed to self-describe the service’s capabilities to the client and has room for flexibility designed in from the start 20 | -------------------------------------------------------------------------------- /source/includes/_ilo5_serialinterface.md: -------------------------------------------------------------------------------- 1 | # Serial interface 2 | 3 | The Redfish serial interface resource lists physical serial interfaces that allow access to iLO. It allows administrators to configure the baud rate and enable or disable serial access to iLO Command line interface using server physical serial port. 4 | 5 | ## Accessing serial interfaces resource through Redfish 6 | 7 | To access the Redfish serial interfaces resource, perform `GET` on `/redfish/v1/Managers/1/SerialInterfaces/`. 8 | This collection resource includes links to the serial interface members `/redfish/v1/Managers/1/SerialInterface/{serialInterfaceId}`. 9 | 10 | ## Viewing serial interface configuration 11 | 12 | To view configuration information on a specific member from the serial interfaces collection, perform `GET` on `/redfish/v1/Managers/1/SerialInterfaces/{serialInterfaceId}`. 13 | This resource provides configurable information on the following: 14 | 15 | | Property | Type | Description | 16 | | --- | --- | --- | 17 | | InterfaceEnabled | Boolean | An indication of whether this interface is enabled | 18 | | BitRate | Enum (`Bitrate`) | The receive and transmit rate of data flow, typically in bits per second (bit/s), over the serial connection | 19 | 20 | The `Bitrate` enum can take the following values - `"9600"`, `"19200"`, `"38400"`, `"57600"`, `"115200"` 21 | 22 | ```shell 23 | > curl https://{iLO}/redfish/v1/Managers/1/SerialInterfaces/{serialInterfaceId} -i --insecure -L 24 | ``` 25 | 26 | ```json 27 | { 28 | "@odata.context": "/redfish/v1/$metadata#SerialInterface.SerialInterface", 29 | "@odata.etag": "W/\"0CFA12DC\"", 30 | "@odata.id": "/redfish/v1/Managers/1/SerialInterfaces/1", 31 | "@odata.type": "#SerialInterface.v1_1_7.SerialInterface", 32 | "Id": "1", 33 | "BitRate": "115200", 34 | "Description" : "Serial Interface", 35 | "InterfaceEnabled" : true, 36 | "Name" : "SerialInterface" 37 | } 38 | ``` 39 | 40 | ## Configuring serial interface through Redfish PATCH 41 | 42 | To modify the serial interface configuration, perform a `PATCH` on `/redfish/v1/Managers/1/SerialInterfaces/{serialInterfaceId}`. 43 | 44 | > PATCH /redfish/v1/Managers/1/SerialInterfaces/{serialInterfaceId} 45 | 46 | ```json 47 | { 48 | "InterfaceEnabled" : true, 49 | "BitRate" : "9600" 50 | } 51 | ``` 52 | -------------------------------------------------------------------------------- /source/includes/_ilo4_errorhandling.md: -------------------------------------------------------------------------------- 1 | # Error messages and registries in the iLO RESTful API 2 | > HTTP response 400 3 | 4 | ```json 5 | { 6 | "error": { 7 | "@Message.ExtendedInfo": [ 8 | { 9 | "MessageId": "iLO.0.9.InvalidLicenseKey" 10 | } 11 | ], 12 | "code": "iLO.0.10.ExtendedInfo", 13 | "message": "See @Message.ExtendedInfo for more information." 14 | } 15 | } 16 | ``` 17 | 18 | ``` 19 | "InvalidLicenseKey": { 20 | "Description": "The license key is not valid.", 21 | "Message": "The license key is not valid.", 22 | "Severity": "Warning", 23 | "NumberOfArgs": 0, 24 | "ParamTypes": [], 25 | "Resolution": "Retry the operation using a valid license key." 26 | } 27 | ``` 28 | 29 | Error messages appear in several places in the iLO RESTful API. 30 | 31 | * An immediate response to an HTTP operation. 32 | * A `SettingsResult` in the data model where other providers, such as BIOS, processed the settings at some point and want to communicate status in the model. 33 | 34 | All error cases use a basic error JSON structure called `ExtendedInfo`. The most important property in `ExtendedInfo` is `MessageId`, a string containing a lookup key into a message registry. 35 | 36 | `MessageId` helps to keep the iLO service small by keeping much of the explanatory text for an error out of the code. Instead, iLO supplies an `ExtendedInfo` response, where the `MessageId` provides enough information so that you can look up more details from another file. 37 | 38 | For example, if you `POST` to the iLO license service to install an iLO license, but you supply an incorrect `LicenceKey` string, iLO responds with an error similar to the following: 39 | 40 | HTTP response 400 is the standard RESTful API response to an error. In the example above, the error is easy to understand, but some errors are not easy to understand. To display a more meaningful error message, parse the string `iLO.0.9.InvalidLicenseKey` into the following 41 | components: 42 | 43 | * `iLO.0.9`—This is the base name of the message registry to consult. Look for a matching registry file. 44 | * `InvalidLicenseKey`—This is the lookup key into the message registry. 45 | 46 | The search returns a result similar to the following: 47 | 48 | Many error messages can also return parameters. These parameters may be plugged into the 49 | strings in the registry to form detailed messages tailored to the instance of the error message. 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /source/includes/_ilo5_errorhandling.md: -------------------------------------------------------------------------------- 1 | # Error messages and registries in the iLO RESTful API 2 | > HTTP response 400 3 | 4 | ```json 5 | { 6 | "error": { 7 | "@Message.ExtendedInfo": [ 8 | { 9 | "MessageId": "iLO.0.9.InvalidLicenseKey" 10 | } 11 | ], 12 | "code": "iLO.0.10.ExtendedInfo", 13 | "message": "See @Message.ExtendedInfo for more information." 14 | } 15 | } 16 | ``` 17 | 18 | ``` 19 | "InvalidLicenseKey": { 20 | "Description": "The license key is not valid.", 21 | "Message": "The license key is not valid.", 22 | "Severity": "Warning", 23 | "NumberOfArgs": 0, 24 | "ParamTypes": [], 25 | "Resolution": "Retry the operation using a valid license key." 26 | } 27 | ``` 28 | 29 | Error messages appear in several places in the iLO RESTful API. 30 | 31 | * An immediate response to an HTTP operation. 32 | * A `SettingsResult` in the data model where other providers, such as BIOS, processed the settings at some point and want to communicate status in the model. 33 | 34 | All error cases use a basic error JSON structure called `ExtendedInfo`. The most important property in `ExtendedInfo` is `MessageId`, a string containing a lookup key into a message registry. 35 | 36 | `MessageId` helps to keep the iLO service small by keeping much of the explanatory text for an error out of the code. Instead, iLO supplies an `ExtendedInfo` response, where the `MessageId` provides enough information so that you can look up more details from another file. 37 | 38 | For example, if you `POST` to the iLO license service to install an iLO license, but you supply an incorrect `LicenseKey` string, iLO responds with an error similar to the following: 39 | 40 | HTTP response 400 is the standard RESTful API response to an error. In the example above, the error is easy to understand, but some errors are not easy to understand. To display a more meaningful error message, parse the string `iLO.0.9.InvalidLicenseKey` into the following 41 | components: 42 | 43 | * `iLO.0.9`—This is the base name of the message registry to consult. Look for a matching registry file. 44 | * `InvalidLicenseKey`—This is the lookup key into the message registry. 45 | 46 | The search returns a result similar to the following: 47 | 48 | Many error messages can also return parameters. These parameters may be plugged into the 49 | strings in the registry to form detailed messages tailored to the instance of the error message. 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /source/includes/_ilo5_bestpractice.md: -------------------------------------------------------------------------------- 1 | # Client Best Practices 2 | 3 | When developing a client for the RESTful API, be sure to not code based upon assumptions that are not guaranteed. The reason avoiding these assumptions is so important is that implementations may vary across systems and firmware versions, and we want your code to work consistently. 4 | 5 | ## API Architecture ## 6 | 7 | The RESTful API is a hypermedia API by design. This is to avoid building in restrictive assumptions to the data model that will make it difficult to adapt to future hardware implementations. A hypermedia API avoids these assumptions by making the data model discoverable via links between resources. 8 | 9 | The client should not interact with a URI as if it will remain static. Only specific top-level URIs (any URI in this sample code) can be assumed as static. 10 | 11 | All URIs, with the exception of known top-level URIs, must be discovered dynamically by following the href links in the data model. Clients should not make assumptions about the URIs for the resource members of a collection. For instance, the URI of a collection member will NOT always be `/redfish/v1/.../collection/1`, or 2. 12 | 13 | ## Traversing the data model 14 | 15 | Although the resources in the data model are linked together, because of cross link references between resources, a client may not assume the resource model is a tree. It is a graph instead, so any crawl of the data model should keep track of visited resources to avoid an infinite traversal loop. 16 | 17 | A reference to another resource is any property called href (@odata.id in Redfish) no matter where it occurs in a resource. 18 | 19 | An external reference to a resource outside the data model is referred to by a property called "extref". Any resource referred to by extref should not be assumed to follow the conventions of the API. 20 | 21 | ## HTTP POST to Create 22 | 23 | When POSTing to create a resource (e.g. create an account or session), a successful response includes a Location HTTP header indicating the resource URI of the newly created resource. The POST may also include a representation of the newly created object in a JSON response body but may not. Do not assume the response body, but test it. It may also be an ExtendedError object. 24 | 25 | ## HTTP Redirect 26 | 27 | All clients must correctly handle HTTP redirect (for example, 308, 301, and so on.) iLO 5 will use redirection as a way to alias portions of the data model and to migrate the data model to the Redfish specified URIs (for example, /redfish/…). 28 | 29 | -------------------------------------------------------------------------------- /source/includes/_ilo4_bestpractice.md: -------------------------------------------------------------------------------- 1 | # Client Best Practices 2 | 3 | When developing a client for the RESTful API, be sure to not code based upon assumptions that are not guaranteed. The reason avoiding these assumptions is so important is that implementations may vary across systems and firmware versions, and we want your code to work consistently. 4 | 5 | ## API Architecture ## 6 | The RESTful API is a hypermedia API by design. This is to avoid building in restrictive assumptions to the data model that will make it difficult to adapt to future hardware implementations. A hypermedia API avoids these assumptions by making the data model discoverable via links between resources. 7 | 8 | The client should not interact with a URI as if it will remain static. Only specific top-level URIs (any URI in this sample code) can be assumed as static. 9 | 10 | All URIs, with the exception of known top-level URIs, must be discovered dynamically by following the href links in the data model. Clients should not make assumptions about the URIs for the resource members of a collection. For instance, the URI of a collection member will NOT always be `/rest/v1/.../collection/1`, or 2. On Moonshot a System collection member might be `/rest/v1/systems/c1n1`. 11 | 12 | ## Traversing the data model 13 | 14 | Although the resources in the data model are linked together, because of cross link references between resources, a client may not assume the resource model is a tree. It is a graph instead, so any crawl of the data model should keep track of visited resources to avoid an infinite traversal loop. 15 | 16 | A reference to another resource is any property called href (@odata.id in Redfish) no matter whereit occurs in a resource. 17 | 18 | An external reference to a resource outside the data model is referred to by a property called "extref". Any resource referred to by extref should not be assumed to follow the conventions of the API. 19 | 20 | ## HTTP POST to Create 21 | 22 | When POSTing to create a resource (e.g. create an account or session), a successful response includes a Location HTTP header indicating the resource URI of the newly created resource. The POST may also include a representation of the newly created object in a JSON response body but may not. Do not assume the response body, but test it. It may also be an ExtendedError object. 23 | 24 | ## HTTP Redirect 25 | 26 | All clients must correctly handle HTTP redirect (e.g. 308, 301, and so on.) iLO 4 will use redirection as a way to alias portions of the data model and to migrate the data model to the Redfish specified URIs (for example, /redfish/…). 27 | 28 | -------------------------------------------------------------------------------- /source/includes/_ilo4_subscribing.md: -------------------------------------------------------------------------------- 1 | # RESTful Events and the Event Service 2 | Starting with iLO 4 2.30, iLO now features a new event subscription service that enables you to 3 | subscribe to receive notifications when the REST data changes or when certain alerts occur. 4 | These notifications are in the form of HTTPS POST operations to a URI of your choice. 5 | 6 | The event service is located in the data model at `/redfish/v1/EventService.` This resource includes 7 | a link to a collection of subscriptions (called `EventSubscriptions` located at 8 | `/redfish/v1/EventService/EventSubscriptions`). 9 | 10 | ## Subscribing for Events examples 11 | > POST /redfish/v1/EventService/EventSubscriptions/ 12 | 13 | ```json 14 | { 15 | "Destination": "https://myeventreciever/eventreceiver", 16 | "EventTypes": [ 17 | "ResourceAdded", 18 | "ResourceRemoved", 19 | "ResourceUpdated", 20 | "StatusChange", 21 | "Alert" 22 | ], 23 | "HttpHeaders": { 24 | "Header": "HeaderValue" 25 | }, 26 | "TTLCount": 1440, 27 | "TTLUnits": "minutes", 28 | "Context": "context string", 29 | "Oem": { 30 | "Hp": { 31 | "DeliveryRetryIntervalInSeconds": 30, 32 | "RequestedMaxEventsToQueue": 20, 33 | "DeliveryRetryAttempts": 5, 34 | "RetireOldEventInMinutes": 10 35 | } 36 | } 37 | } 38 | ``` 39 | 40 | In order to receive events, you must provide an HTTPS server accessible to iLO’s network with 41 | a URI you designate as the target for iLO-initiated HTTPS POST operations. 42 | 43 | Construct a JSON object conforming to the type `ListenerDestination` (see example) and 44 | POST this to the collection indicated by the `EventSubscriptions` link at 45 | `/redfish/v1/EventService/EventSubscriptions.` If you receive an HTTP 201 Created 46 | response, a new subscription has been added. Note that iLO does not test the destination URI 47 | during this phase, so if the indicated URI is not valid, this will not be flagged until events are 48 | emitted and the connection to the destination fails. 49 | 50 | **Example POST payload to create a new subscription** 51 | 52 | Much of the above content depends entirely upon your needs and setup: 53 | 54 | * `Destination` must be an HTTPS URI accessible to iLO’s network. 55 | * `EventTypes` in the example is everything but you could remove types from the array. 56 | * `HttpHeaders` gives you an opportunity to specify any arbitrary HTTP headers you need 57 | for the event POST operation. Note that the subscription is readable via GET to an authorized 58 | iLO user. 59 | * `Context` may be any string. 60 | 61 | Consult the `ListenerDestination` schema for more details on each property. The subscription 62 | will automatically expire after the TTL information specified and must be renewed. 63 | 64 | 65 | -------------------------------------------------------------------------------- /source/includes/_ilo5_subscribing.md: -------------------------------------------------------------------------------- 1 | # RESTful Events and the Event Service 2 | iLO 5 features an event subscription service that enables you to 3 | subscribe to receive notifications when the REST data changes or when certain alerts occur. 4 | These notifications are in the form of HTTPS POST operations to a URI of your choice. 5 | 6 | The event service is located in the data model at `/redfish/v1/EventService.` This resource includes 7 | a link to a collection of subscriptions (called `Subscriptions` located at 8 | `/redfish/v1/EventService/Subscriptions`). 9 | 10 | ## Subscribing for Events examples 11 | > POST /redfish/v1/EventService/Subscriptions/ 12 | 13 | ```json 14 | { 15 | "Destination": "https://myeventreciever/eventreceiver", 16 | "EventTypes": [ 17 | "ResourceAdded", 18 | "ResourceRemoved", 19 | "ResourceUpdated", 20 | "StatusChange", 21 | "Alert" 22 | ], 23 | "HttpHeaders": { 24 | "Header": "HeaderValue" 25 | }, 26 | "TTLCount": 1440, 27 | "TTLUnits": "minutes", 28 | "Context": "context string", 29 | "Oem": { 30 | "Hp": { 31 | "DeliveryRetryIntervalInSeconds": 30, 32 | "RequestedMaxEventsToQueue": 20, 33 | "DeliveryRetryAttempts": 5, 34 | "RetireOldEventInMinutes": 10 35 | } 36 | } 37 | } 38 | ``` 39 | 40 | In order to receive events, you must provide an HTTPS server accessible to iLO’s network with 41 | a URI you designate as the target for iLO-initiated HTTPS POST operations. 42 | 43 | Construct a JSON object conforming to the type `ListenerDestination` (see example) and 44 | POST this to the collection indicated by the `Subscriptions` link at 45 | `/redfish/v1/EventService/Subscriptions.` If you receive an HTTP 201 Created 46 | response, a new subscription has been added. Note that iLO does not test the destination URI 47 | during this phase, so if the indicated URI is not valid, this will not be flagged until events are 48 | emitted and the connection to the destination fails. 49 | 50 | **Example POST payload to create a new subscription** 51 | 52 | Much of the above content depends entirely upon your needs and setup: 53 | 54 | * `Destination` must be an HTTPS URI accessible to iLO’s network. 55 | * `EventTypes` in the example is everything but you could remove types from the array. 56 | * `HttpHeaders` gives you an opportunity to specify any arbitrary HTTP headers you need 57 | for the event POST operation. Note that the subscription is readable via GET to an authorized 58 | iLO user. 59 | * `Context` may be any string. 60 | 61 | Consult the `ListenerDestination` schema for more details on each property. The subscription 62 | will automatically expire after the TTL information specified and must be renewed. 63 | 64 | 65 | -------------------------------------------------------------------------------- /source/includes/_ilo5_performingaction.md: -------------------------------------------------------------------------------- 1 | # Performing Actions 2 | 3 | > Example of a system resource advertising an available action: 4 | 5 | ```json 6 | { 7 | "Actions": { 8 | "#ComputerSystem.Reset": { 9 | "ResetType@Redfish.AllowableValues": [ 10 | "On", 11 | "ForceOff", 12 | "ForceRestart", 13 | "Nmi", 14 | "PushPowerButton" 15 | ], 16 | "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset" 17 | } 18 | } 19 | } 20 | ``` 21 | 22 | > This action may be invoked by performing: 23 | 24 | ```shell 25 | curl --header "Content-Type: application/json" --request POST --data '{"ResetType": "ForceRestart"}' https://{iLO}/redfish/v1/Systems/1/Actions/ComputerSystem.Reset -u username:password --insecure 26 | ``` 27 | 28 | REST resources usually support HTTP GET to read the current state, and some support modification and removal with HTTP POST, PUT, PATCH, or DELETE. 29 | 30 | There are some resources that support other types of operations not easily mapped to HTTP operations. For this reason the Redfish specification defines "Actions". Actions are HTTP POST operations with a specifically formatted JSON request including the operation to perform and any parameters. For instance, it is not enough to simply tell a server to reset, but it is also necessary to specify the type of reset: cold boot, warm boot, PCI reset, etc. Actions are often used when the operation causes iLO 5 not just to update a value, but to change system state. 31 | 32 | In Redfish, the available actions that can be invoked are identified by a "target" property in the resource's "Actions" object definitions. The parameters identify the supported values with the annotation @Redfish.AllowableValues. 33 | 34 | 39 | 40 | ## Actions on HPE-specific Extensions 41 | 42 | Actions on HPE-specific extensions are invoked in the same way. Find the `target` URI for the action and POST a JSON request with parameters. 43 | 44 | ```shell 45 | curl --header "Content-Type: application/json" --request POST --data '{"PushType": "PressAndHold"}' https://{iLO}//redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.PowerButton/ -u username:password --insecure 46 | ``` 47 | 48 | The embedded extensions may also have Actions not specified by the Redfish standard. They are invoked in a similar way. The POST URI may include indicate the HPE specific nature of the action. 49 | 50 | The older pre-Redfish form of the Action invocation requires you to specify `"Target": "/Oem/Hp"` as one of the properties in the body of the request. 51 | 52 | It is recommended that you use the Redfish version of the action invocation. 53 | 54 | -------------------------------------------------------------------------------- /source/fonts/slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Version 1.5.0 4 | 5 | *February 23, 2017* 6 | 7 | - Add [multiple tabs per programming language](https://github.com/lord/slate/wiki/Multiple-language-tabs-per-programming-language) feature 8 | - Upgrade Middleman to add Ruby 1.4.0 compatibility 9 | - Switch default code highlighting color scheme to better highlight JSON 10 | - Various small typo and bug fixes 11 | 12 | ## Version 1.4.0 13 | 14 | *November 24, 2016* 15 | 16 | - Upgrade Middleman and Rouge gems, should hopefully solve a number of bugs 17 | - Update some links in README 18 | - Fix broken Vagrant startup script 19 | - Fix some problems with deploy.sh help message 20 | - Fix bug with language tabs not hiding properly if no error 21 | - Add `!default` to SASS variables 22 | - Fix bug with logo margin 23 | - Bump tested Ruby versions in .travis.yml 24 | 25 | ## Version 1.3.3 26 | 27 | *June 11, 2016* 28 | 29 | Documentation and example changes. 30 | 31 | ## Version 1.3.2 32 | 33 | *February 3, 2016* 34 | 35 | A small bugfix for slightly incorrect background colors on code samples in some cases. 36 | 37 | ## Version 1.3.1 38 | 39 | *January 31, 2016* 40 | 41 | A small bugfix for incorrect whitespace in code blocks. 42 | 43 | ## Version 1.3 44 | 45 | *January 27, 2016* 46 | 47 | We've upgraded Middleman and a number of other dependencies, which should fix quite a few bugs. 48 | 49 | Instead of `rake build` and `rake deploy`, you should now run `bundle exec middleman build --clean` to build your server, and `./deploy.sh` to deploy it to Github Pages. 50 | 51 | ## Version 1.2 52 | 53 | *June 20, 2015* 54 | 55 | **Fixes:** 56 | 57 | - Remove crash on invalid languages 58 | - Update Tocify to scroll to the highlighted header in the Table of Contents 59 | - Fix variable leak and update search algorithms 60 | - Update Python examples to be valid Python 61 | - Update gems 62 | - More misc. bugfixes of Javascript errors 63 | - Add Dockerfile 64 | - Remove unused gems 65 | - Optimize images, fonts, and generated asset files 66 | - Add chinese font support 67 | - Remove RedCarpet header ID patch 68 | - Update language tabs to not disturb existing query strings 69 | 70 | ## Version 1.1 71 | 72 | *July 27, 2014* 73 | 74 | **Fixes:** 75 | 76 | - Finally, a fix for the redcarpet upgrade bug 77 | 78 | ## Version 1.0 79 | 80 | *July 2, 2014* 81 | 82 | [View Issues](https://github.com/tripit/slate/issues?milestone=1&state=closed) 83 | 84 | **Features:** 85 | 86 | - Responsive designs for phones and tablets 87 | - Started tagging versions 88 | 89 | **Fixes:** 90 | 91 | - Fixed 'unrecognized expression' error 92 | - Fixed #undefined hash bug 93 | - Fixed bug where the current language tab would be unselected 94 | - Fixed bug where tocify wouldn't highlight the current section while searching 95 | - Fixed bug where ids of header tags would have special characters that caused problems 96 | - Updated layout so that pages with disabled search wouldn't load search.js 97 | - Cleaned up Javascript 98 | -------------------------------------------------------------------------------- /source/stylesheets/print.css.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | @import 'normalize'; 3 | @import 'variables'; 4 | @import 'icon-font'; 5 | 6 | /* 7 | Copyright 2008-2013 Concur Technologies, Inc. 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); you may 10 | not use this file except in compliance with the License. You may obtain 11 | a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 17 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 18 | License for the specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | $print-color: #999; 23 | $print-color-light: #ccc; 24 | $print-font-size: 12px; 25 | 26 | body { 27 | @extend %default-font; 28 | } 29 | 30 | .tocify, .toc-footer, .lang-selector, .search, #nav-button { 31 | display: none; 32 | } 33 | 34 | .tocify-wrapper>img { 35 | margin: 0 auto; 36 | display: block; 37 | } 38 | 39 | .content { 40 | font-size: 12px; 41 | 42 | pre, code { 43 | @extend %code-font; 44 | @extend %break-words; 45 | border: 1px solid $print-color; 46 | border-radius: 5px; 47 | font-size: 0.8em; 48 | } 49 | 50 | pre { 51 | code { 52 | border: 0; 53 | } 54 | } 55 | 56 | pre { 57 | padding: 1.3em; 58 | } 59 | 60 | code { 61 | padding: 0.2em; 62 | } 63 | 64 | table { 65 | border: 1px solid $print-color; 66 | tr { 67 | border-bottom: 1px solid $print-color; 68 | } 69 | td,th { 70 | padding: 0.7em; 71 | } 72 | } 73 | 74 | p { 75 | line-height: 1.5; 76 | } 77 | 78 | a { 79 | text-decoration: none; 80 | color: #000; 81 | } 82 | 83 | h1 { 84 | @extend %header-font; 85 | font-size: 2.5em; 86 | padding-top: 0.5em; 87 | padding-bottom: 0.5em; 88 | margin-top: 1em; 89 | margin-bottom: $h1-margin-bottom; 90 | border: 2px solid $print-color-light; 91 | border-width: 2px 0; 92 | text-align: center; 93 | } 94 | 95 | h2 { 96 | @extend %header-font; 97 | font-size: 1.8em; 98 | margin-top: 2em; 99 | border-top: 2px solid $print-color-light; 100 | padding-top: 0.8em; 101 | } 102 | 103 | h1+h2, h1+div+h2 { 104 | border-top: none; 105 | padding-top: 0; 106 | margin-top: 0; 107 | } 108 | 109 | h3, h4 { 110 | @extend %header-font; 111 | font-size: 0.8em; 112 | margin-top: 1.5em; 113 | margin-bottom: 0.8em; 114 | text-transform: uppercase; 115 | } 116 | 117 | h5, h6 { 118 | text-transform: uppercase; 119 | } 120 | 121 | aside { 122 | padding: 1em; 123 | border: 1px solid $print-color-light; 124 | border-radius: 5px; 125 | margin-top: 1.5em; 126 | margin-bottom: 1.5em; 127 | line-height: 1.6; 128 | } 129 | 130 | aside:before { 131 | vertical-align: middle; 132 | padding-right: 0.5em; 133 | font-size: 14px; 134 | } 135 | 136 | aside.notice:before { 137 | @extend %icon-info-sign; 138 | } 139 | 140 | aside.warning:before { 141 | @extend %icon-exclamation-sign; 142 | } 143 | 144 | aside.success:before { 145 | @extend %icon-ok-sign; 146 | } 147 | } -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (5.0.1) 5 | concurrent-ruby (~> 1.0, >= 1.0.2) 6 | i18n (~> 0.7) 7 | minitest (~> 5.1) 8 | tzinfo (~> 1.1) 9 | addressable (2.5.0) 10 | public_suffix (~> 2.0, >= 2.0.2) 11 | autoprefixer-rails (6.6.1) 12 | execjs 13 | backports (3.6.8) 14 | coffee-script (2.4.1) 15 | coffee-script-source 16 | execjs 17 | coffee-script-source (1.12.2) 18 | compass-import-once (1.0.5) 19 | sass (>= 3.2, < 3.5) 20 | concurrent-ruby (1.0.4) 21 | contracts (0.13.0) 22 | dotenv (2.2.0) 23 | erubis (2.7.0) 24 | execjs (2.7.0) 25 | fast_blank (1.0.0) 26 | fastimage (2.0.1) 27 | addressable (~> 2) 28 | ffi (1.9.17) 29 | haml (4.0.7) 30 | tilt 31 | hamster (3.0.0) 32 | concurrent-ruby (~> 1.0) 33 | hashie (3.5.1) 34 | i18n (0.7.0) 35 | kramdown (1.13.2) 36 | listen (3.0.8) 37 | rb-fsevent (~> 0.9, >= 0.9.4) 38 | rb-inotify (~> 0.9, >= 0.9.7) 39 | memoist (0.15.0) 40 | middleman (4.2.1) 41 | coffee-script (~> 2.2) 42 | compass-import-once (= 1.0.5) 43 | haml (>= 4.0.5) 44 | kramdown (~> 1.2) 45 | middleman-cli (= 4.2.1) 46 | middleman-core (= 4.2.1) 47 | sass (>= 3.4.0, < 4.0) 48 | middleman-autoprefixer (2.7.1) 49 | autoprefixer-rails (>= 6.5.2, < 7.0.0) 50 | middleman-core (>= 3.3.3) 51 | middleman-cli (4.2.1) 52 | thor (>= 0.17.0, < 2.0) 53 | middleman-core (4.2.1) 54 | activesupport (>= 4.2, < 5.1) 55 | addressable (~> 2.3) 56 | backports (~> 3.6) 57 | bundler (~> 1.1) 58 | contracts (~> 0.13.0) 59 | dotenv 60 | erubis 61 | execjs (~> 2.0) 62 | fast_blank 63 | fastimage (~> 2.0) 64 | hamster (~> 3.0) 65 | hashie (~> 3.4) 66 | i18n (~> 0.7.0) 67 | listen (~> 3.0.0) 68 | memoist (~> 0.14) 69 | padrino-helpers (~> 0.13.0) 70 | parallel 71 | rack (>= 1.4.5, < 3) 72 | sass (>= 3.4) 73 | servolux 74 | tilt (~> 2.0) 75 | uglifier (~> 3.0) 76 | middleman-sprockets (4.1.0) 77 | middleman-core (~> 4.0) 78 | sprockets (>= 3.0) 79 | middleman-syntax (3.0.0) 80 | middleman-core (>= 3.2) 81 | rouge (~> 2.0) 82 | minitest (5.10.1) 83 | padrino-helpers (0.13.3.3) 84 | i18n (~> 0.6, >= 0.6.7) 85 | padrino-support (= 0.13.3.3) 86 | tilt (>= 1.4.1, < 3) 87 | padrino-support (0.13.3.3) 88 | activesupport (>= 3.1) 89 | parallel (1.10.0) 90 | public_suffix (2.0.5) 91 | rack (2.0.1) 92 | rb-fsevent (0.9.8) 93 | rb-inotify (0.9.8) 94 | ffi (>= 0.5.0) 95 | redcarpet (3.4.0) 96 | rouge (2.0.7) 97 | sass (3.4.23) 98 | servolux (0.12.0) 99 | sprockets (3.7.1) 100 | concurrent-ruby (~> 1.0) 101 | rack (> 1, < 3) 102 | thor (0.19.4) 103 | thread_safe (0.3.5) 104 | tilt (2.0.6) 105 | tzinfo (1.2.2) 106 | thread_safe (~> 0.1) 107 | uglifier (3.0.4) 108 | execjs (>= 0.3.0, < 3) 109 | 110 | PLATFORMS 111 | ruby 112 | 113 | DEPENDENCIES 114 | middleman (~> 4.2.1) 115 | middleman-autoprefixer (~> 2.7.0) 116 | middleman-sprockets (~> 4.1.0) 117 | middleman-syntax (~> 3.0.0) 118 | redcarpet (~> 3.4.0) 119 | rouge (~> 2.0.5) 120 | 121 | BUNDLED WITH 122 | 1.14.3 123 | -------------------------------------------------------------------------------- /source/includes/_ilo5_time.md: -------------------------------------------------------------------------------- 1 | # Managing Time in iLO 5 2 | 3 | iLO 5 obtains the date and time from one of several sources and is not manually configurable. 4 | 5 | * Network Time Protocol (NTP) Servers 6 | * System UEFI during Boot 7 | * BladeSystem C-Class Onboard Administrator 8 | 9 | The configurable iLO 5 Time/Date related configuration properties are: 10 | 11 | * Time zone 12 | * Network Time Protocol Server addresses 13 | * Option to synchronize the host to iLO 5's date and time during first boot after AC power is applied (`PropagateTimeToHost` boolean) 14 | 15 | ## iLO 5 Date and Time 16 | 17 | iLO 5 current date and time is available in the main `Manager` resource at `/redfish/v1/Managers/{id}` 18 | 19 | > GET /redfish/v1/Managers/{id} 20 | 21 | ```json 22 | "DateTime": "2019-01-06T17:11:53Z", 23 | "DateTimeLocalOffset": "-06:00", 24 | ``` 25 | 26 | ### Date/Time Service Resource 27 | 28 | A link exists in `/redfish/v1/Managers/{id}` to the iLO 5 Date/Time Service. See `Oem/Hpe/Links/DateTimeService`. This points to a DateTime resource at `/redfish/v1/Managers/{id}/DateTime`. 29 | 30 | ## Time Zone Management 31 | Time Zone configuration is performed with a PATCH to the `DateTime` resource at `/redfish/v1/Managers/{id}/DateTime`. 32 | 33 | The available time zones are available in the `TimeZoneList` property. Take note of the `Index` value of the time zone you wish iLO 5 to be configured with. Then `PATCH` the `TimeZone.Index` property: 34 | 35 | > PATCH /redfish/v1/Managers/{id}/DateTime 36 | 37 | ```json 38 | { 39 | "TimeZone": { 40 | "Index": 4 41 | } 42 | } 43 | ``` 44 | 45 | If the operation is successful, iLO 5 will respond with `HTTP 200 OK` and `ResetRequired`. An iLO 5 reset is required for date and time operations to be applied. After a successful PATCH the `ConfigurationSettings` property will contain `SomePendingReset` indicating that some settings have changed but will not take effect until iLO 5 is reset. 46 | 47 | If the time zone is configured to be managed by DHCP, iLO 5 will respond with `HTTP 400` and `SNTPConfigurationManagedByDHCPAndIsReadOnly` (see Using DHCP Supplied Time Settings). 48 | 49 | ## Configuring Network Time Protocol (NTP) 50 | The currently configured Network Time Protocol (NTP) servers are available in the `DateTime` resource at `/redfish/v1/Managers/{id}/DateTime`. 51 | 52 | > GET /redfish/v1/Managers/{id}/DateTime 53 | 54 | ```json 55 | { 56 | "NTPServers": [ 57 | "", 58 | "" 59 | ] 60 | } 61 | ``` 62 | 63 | If NTP is not being managed by DHCP, you may PATCH server addresses into the `StaticNTPServers` array. 64 | 65 | > PATCH /redfish/v1/Managers/{id}/DateTime 66 | 67 | ```json 68 | { 69 | "StaticNTPServers": [ 70 | "", 71 | "" 72 | ] 73 | } 74 | ``` 75 | 76 | > or to set one address 77 | 78 | ```json 79 | { 80 | "StaticNTPServers": [ 81 | "" 82 | ] 83 | } 84 | ``` 85 | 86 | 87 | If the operation is successful, iLO 5 will respond with `HTTP 200 OK` and `ResetRequired`. An iLO 5 reset is required for date and time operations to be applied. After a successful PATCH the `ConfigurationSettings` property will contain `SomePendingReset` indicating that some settings have changed but will not take effect until iLO 5 is reset. 88 | 89 | If the time zone is configured to be managed by DHCP, iLO 5 will respond with `HTTP 400` and `SNTPConfigurationManagedByDHCPAndIsReadOnly` (see Using DHCP Supplied Time Settings). 90 | -------------------------------------------------------------------------------- /source/includes/_ilo4_hprest.md: -------------------------------------------------------------------------------- 1 | # Using the RESTful Interface Tool 2 | 3 | Although not a requirement, you can use the RESTful Interface Tool with the RESTful API. This 4 | command line tool provides a level of abstraction and convenience above direct access to the 5 | RESTful API. For more information, see: [http://www.hpe.com/info/resttool](http://www.hpe.com/info/resttool). 6 | 7 | #Troubleshooting 8 | 9 | ## Resetting the RESTful API 10 | 11 | **Symptom** 12 | 13 | ProLiant Gen9 servers could possibly experience a RESTful API error during system boot that results in inability to configure the BIOS settings using the RESTful API. In addition, the following persistent error message might display during system boot (POST) and is logged to the Integrated Management Log: 14 | 15 | 335 RESTful API Error- RESTful API PUT request failed (HTTP: Status Code = 404) 16 | 17 | With iLO firmware v2.20 or later, you can reset the REST API. You do this through the RESTful API using any 3rd party REST web client, the **RESTful Interface Tool**, or from the HPE Embedded UEFI shell restclient command. 18 | 19 | ### With a REST client 20 | 21 | 1. Execute a POST operation to the resource at URI `/rest/v1/managers/1` with the following JSON in the request body. 22 | 23 | {"Action":"ClearRestApiState", "Target":"/Oem/Hp"} 24 | 25 | 26 | 2. Restart the server. 27 | 28 | 29 | ### With the RESTful Interface Tool 30 | 31 | 1. Download and install the **RESTful interface Tool**. For more information on using this tool, refer to [http://www.hpe.com/info/resttool](http://www.hpe.com/info/resttool). 32 | 2. Copy and paste the following JSON into a text file and save it as 33 | hprest_tool_clear_api.json. 34 | 35 | { 36 | "path": "/rest/v1/managers/1", 37 | "body": { 38 | "Action": "ClearRestApiState", 39 | "Target": "/Oem/Hp" 40 | } 41 | } 42 | 43 | 3. Start the hprest tool. 44 | 45 | hprest 46 | 47 | 4. Log in to iLO. 48 | 49 | hprest> login 50 | 51 | 5. Run the following command, pointing to the hprest_tool_clear_api.json file. 52 | 53 | hprest> rawpost hprest_tool_clear_api.json 54 | 55 | 6. Restart the server. 56 | 57 | 58 | ### With the UEFI Shell 59 | 60 | 1. Enter the Embedded UEFI Shell. For more information, refer to the UEFI Shell User Guide 61 | at [http://www.hpe.com/servers/proliant/uefi](http://www.hpe.com/servers/proliant/uefi). 62 | 2. Copy and paste the following JSON into an ASCII text file save it as clear_api.json on FAT formatted USB media. 63 | 64 | 65 | { 66 | "Action":"ClearRestApiState", "Target":"/Oem/Hp" 67 | } 68 | 69 | 70 | 3. Attach the USB media to the server. 71 | 4. Turn on the server and boot to the Embedded UEFI Shell. 72 | 5. At the UEFI shell prompt, use the partitions command to find the file system that corresponds to the USB media. For example, FS0, FS1, and so on. 73 | 6. To switch to the file system, type the file system name (for example, shell>FS0: ). 74 | 7. Execute the following command: 75 | 76 | Fs0:> restclient –m POST –uri “/rest/v1/managers/1” –i clear_api.json 77 | 78 | 8. Restart the server. 79 | 80 | 81 | ### With the iLO SSH CLI 82 | 83 | 1. Open an SSH connection with iLO, log in using an account with administrator privileges. For more information, see the HPE iLO 4 Scripting and Command Line Guide at [http:// www.hpe.com/info/iLO](http://www.hpe.com/info/iLO). 84 | 2. At the CLI prompt, execute the command `oemhp_clearRESTAPIstate`. Note that this command might take a few seconds to complete. 85 | 3. Restart the server. 86 | 87 | 88 | -------------------------------------------------------------------------------- /source/includes/_ilo4_performingaction.md: -------------------------------------------------------------------------------- 1 | # Performing Actions 2 | 3 | > Example of a system resource advertising an available action: 4 | 5 | ```json 6 | { 7 | "Actions": { 8 | "#ComputerSystem.Reset": { 9 | "ResetType@Redfish.AllowableValues": [ 10 | "On", 11 | "ForceOff", 12 | "ForceRestart", 13 | "Nmi", 14 | "PushPowerButton" 15 | ], 16 | "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/" 17 | } 18 | } 19 | } 20 | ``` 21 | 22 | > This action may be invoked by performing: 23 | 24 | ```shell 25 | curl -H "Content-Type: application/json" -X POST --data "@data.json" https://{iLO}/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/ -u username:password --insecure 26 | ``` 27 | 28 |
    29 | For a full Redfish example click here: ex04_reset_server.py 30 |
    31 | 32 |
    33 |

    Contents of data.json

    34 |

    {"ResetType": "ForceRestart"}

    35 |
    36 | 37 | > alternative pre-Redfish action invocation: 38 | 39 | ```shell 40 | curl -H "Content-Type: application/json" -X POST --data "@data.json" https://{iLO}/rest/v1/Systems/1 -u username:password --insecure 41 | ``` 42 | 43 |
    44 | For a full Rest example click here: ex04_reset_server.py 45 |
    46 | 47 |
    48 |

    Contents of data.json

    49 |

    {"Action": "Reset", "ResetType": "ForceRestart"}

    50 |
    51 | 52 | REST resources usually support HTTP GET to read the current state, and some support modification and removal with HTTP POST, PUT, PATCH, or DELETE. 53 | 54 | There are some resources that support other types of operations not easily mapped to HTTP operations. For this reason the Redfish specification defines "Actions". Actions are HTTP POST operations with a specifically formatted JSON request including the operation to perform and any parameters. For instance, it is not enough to simply tell a server to reset, but it is also necessary to specify the type of reset: cold boot, warm boot, PCI reset, etc. Actions are often used when the operation causes iLO 4 not just to update a value, but to change system state. 55 | 56 | In Redfish, the available actions that can be invoked are identified by a "target" property in the resource's "Actions" object definitions. The parameters identify the supported values with the annotation @Redfish.AllowableValues. 57 | 58 | 65 | 66 | ## Actions on HPE-specific Extensions 67 | 68 | ```shell 69 | curl -H "Content-Type: application/json" -X POST --data "@data.json" https://{iLO}/redfish/v1/Systems/1/Actions/ComputerSystem.Reset/ -u username:password --insecure 70 | ``` 71 | 72 |
    73 | For a full Redfish example click here: ex04_reset_server.py 74 |
    75 | 76 |
    77 |

    Contents of data.json

    78 |

    {"Action": "PowerButton", "PushType": "PressAndHold", "Target": "/Oem/Hp"}

    79 |
    80 | 81 | The embedded extensions may also have Actions not specified by the Redfish standard. They are invoked in a similar way. The POST URI may include indicate the HPE specific nature of the action. 82 | 83 | The older pre-Redfish form of the Action invokation requires you to specify `"Target": "/Oem/Hp"` as one of the properties in the body of the request. 84 | 85 | It is recommended that you use the Redfish version of the action invocation. 86 | 87 | -------------------------------------------------------------------------------- /source/stylesheets/_variables.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2008-2013 Concur Technologies, Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | not use this file except in compliance with the License. You may obtain 6 | a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | License for the specific language governing permissions and limitations 14 | under the License. 15 | */ 16 | 17 | 18 | //////////////////////////////////////////////////////////////////////////////// 19 | // CUSTOMIZE SLATE 20 | //////////////////////////////////////////////////////////////////////////////// 21 | // Use these settings to help adjust the appearance of Slate 22 | 23 | 24 | // BACKGROUND COLORS 25 | //////////////////// 26 | $nav-bg: #393939 !default; 27 | $examples-bg: #393939 !default; 28 | $code-bg: #292929 !default; 29 | $code-annotation-bg: #1c1c1c !default; 30 | $nav-subitem-bg: #262626 !default; 31 | $nav-active-bg: #2467af !default; 32 | $lang-select-border: #000 !default; 33 | $lang-select-bg: #222 !default; 34 | $lang-select-active-bg: $examples-bg !default; // feel free to change this to blue or something 35 | $lang-select-pressed-bg: #111 !default; // color of language tab bg when mouse is pressed 36 | $main-bg: #eaf2f6 !default; 37 | $aside-notice-bg: #8fbcd4 !default; 38 | $aside-warning-bg: #c97a7e !default; 39 | $aside-success-bg: #6ac174 !default; 40 | $search-notice-bg: #c97a7e !default; 41 | 42 | 43 | // TEXT COLORS 44 | //////////////////// 45 | $main-text: #333 !default; // main content text color 46 | $nav-text: #fff !default; 47 | $nav-active-text: #fff !default; 48 | $lang-select-text: #fff !default; // color of unselected language tab text 49 | $lang-select-active-text: #fff !default; // color of selected language tab text 50 | $lang-select-pressed-text: #fff !default; // color of language tab text when mouse is pressed 51 | 52 | 53 | // SIZES 54 | //////////////////// 55 | $nav-width: 230px !default; // width of the navbar 56 | $examples-width: 50% !default; // portion of the screen taken up by code examples 57 | $logo-margin: 20px !default; // margin between nav items and logo, ignored if search is active 58 | $main-padding: 28px !default; // padding to left and right of content & examples 59 | $nav-padding: 15px !default; // padding to left and right of navbar 60 | $nav-v-padding: 10px !default; // padding used vertically around search boxes and results 61 | $nav-indent: 10px !default; // extra padding for ToC subitems 62 | $code-annotation-padding: 13px !default; // padding inside code annotations 63 | $h1-margin-bottom: 21px !default; // padding under the largest header tags 64 | $tablet-width: 930px !default; // min width before reverting to tablet size 65 | $phone-width: $tablet-width - $nav-width !default; // min width before reverting to mobile size 66 | 67 | 68 | // FONTS 69 | //////////////////// 70 | %default-font { 71 | font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif; 72 | font-size: 13px; 73 | } 74 | 75 | %header-font { 76 | @extend %default-font; 77 | font-weight: bold; 78 | } 79 | 80 | %code-font { 81 | font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif; 82 | font-size: 12px; 83 | line-height: 1.5; 84 | } 85 | 86 | 87 | // OTHER 88 | //////////////////// 89 | $nav-active-shadow: #000 !default; 90 | $nav-footer-border-color: #666 !default; 91 | $nav-embossed-border-top: #000 !default; 92 | $nav-embossed-border-bottom: #939393 !default; 93 | $main-embossed-text-shadow: 0px 1px 0px #fff !default; 94 | $search-box-border-color: #666 !default; 95 | 96 | 97 | //////////////////////////////////////////////////////////////////////////////// 98 | // INTERNAL 99 | //////////////////////////////////////////////////////////////////////////////// 100 | // These settings are probably best left alone. 101 | 102 | %break-words { 103 | word-break: break-all; 104 | hyphens: auto; 105 | } 106 | -------------------------------------------------------------------------------- /source/javascripts/lib/_jquery.highlight.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Highlight plugin 3 | * 4 | * Based on highlight v3 by Johann Burkard 5 | * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html 6 | * 7 | * Code a little bit refactored and cleaned (in my humble opinion). 8 | * Most important changes: 9 | * - has an option to highlight only entire words (wordsOnly - false by default), 10 | * - has an option to be case sensitive (caseSensitive - false by default) 11 | * - highlight element tag and class names can be specified in options 12 | * 13 | * Usage: 14 | * // wrap every occurrance of text 'lorem' in content 15 | * // with (default options) 16 | * $('#content').highlight('lorem'); 17 | * 18 | * // search for and highlight more terms at once 19 | * // so you can save some time on traversing DOM 20 | * $('#content').highlight(['lorem', 'ipsum']); 21 | * $('#content').highlight('lorem ipsum'); 22 | * 23 | * // search only for entire word 'lorem' 24 | * $('#content').highlight('lorem', { wordsOnly: true }); 25 | * 26 | * // don't ignore case during search of term 'lorem' 27 | * $('#content').highlight('lorem', { caseSensitive: true }); 28 | * 29 | * // wrap every occurrance of term 'ipsum' in content 30 | * // with 31 | * $('#content').highlight('ipsum', { element: 'em', className: 'important' }); 32 | * 33 | * // remove default highlight 34 | * $('#content').unhighlight(); 35 | * 36 | * // remove custom highlight 37 | * $('#content').unhighlight({ element: 'em', className: 'important' }); 38 | * 39 | * 40 | * Copyright (c) 2009 Bartek Szopka 41 | * 42 | * Licensed under MIT license. 43 | * 44 | */ 45 | 46 | jQuery.extend({ 47 | highlight: function (node, re, nodeName, className) { 48 | if (node.nodeType === 3) { 49 | var match = node.data.match(re); 50 | if (match) { 51 | var highlight = document.createElement(nodeName || 'span'); 52 | highlight.className = className || 'highlight'; 53 | var wordNode = node.splitText(match.index); 54 | wordNode.splitText(match[0].length); 55 | var wordClone = wordNode.cloneNode(true); 56 | highlight.appendChild(wordClone); 57 | wordNode.parentNode.replaceChild(highlight, wordNode); 58 | return 1; //skip added node in parent 59 | } 60 | } else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children 61 | !/(script|style)/i.test(node.tagName) && // ignore script and style nodes 62 | !(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted 63 | for (var i = 0; i < node.childNodes.length; i++) { 64 | i += jQuery.highlight(node.childNodes[i], re, nodeName, className); 65 | } 66 | } 67 | return 0; 68 | } 69 | }); 70 | 71 | jQuery.fn.unhighlight = function (options) { 72 | var settings = { className: 'highlight', element: 'span' }; 73 | jQuery.extend(settings, options); 74 | 75 | return this.find(settings.element + "." + settings.className).each(function () { 76 | var parent = this.parentNode; 77 | parent.replaceChild(this.firstChild, this); 78 | parent.normalize(); 79 | }).end(); 80 | }; 81 | 82 | jQuery.fn.highlight = function (words, options) { 83 | var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false }; 84 | jQuery.extend(settings, options); 85 | 86 | if (words.constructor === String) { 87 | words = [words]; 88 | } 89 | words = jQuery.grep(words, function(word, i){ 90 | return word != ''; 91 | }); 92 | words = jQuery.map(words, function(word, i) { 93 | return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); 94 | }); 95 | if (words.length == 0) { return this; }; 96 | 97 | var flag = settings.caseSensitive ? "" : "i"; 98 | var pattern = "(" + words.join("|") + ")"; 99 | if (settings.wordsOnly) { 100 | pattern = "\\b" + pattern + "\\b"; 101 | } 102 | var re = new RegExp(pattern, flag); 103 | 104 | return this.each(function () { 105 | jQuery.highlight(this, re, settings.element, settings.className); 106 | }); 107 | }; 108 | 109 | -------------------------------------------------------------------------------- /source/includes/_ilo4_resourcedefnhdr.md: -------------------------------------------------------------------------------- 1 | ## Resource Definitions 2 | 3 | Each resource in the API has a "type" that defines its properties. See the Redfish specification for `@odata.type` for details. 4 | 5 | This section defines the supported types and lists the typical instances of each. Because this API document is applicable to all HPE servers using iLO 4, you may find variations such as: 6 | 7 | * properties implemented on one type of server and not another 8 | * resources that are read only on one type of server and not another 9 | * The number of resources of a particular type (e.g. multiple compute nodes or enclosing chassis) 10 | 11 | ## Collections 12 | 13 | Many resource types in the API are members of "collections." Collections are groups of similar resources and are typically an array of Member links. 14 | 15 | Redfish does not define a generic collection "type" (@odata.type) but all collections are identical in structure. A `ComputerSystemCollection` is identical in structure to a `ChassisCollection` although they have slightly different names. Typically, collection types are suffixed with the word collection and are recognizable by the presense of the `Members` array of links. 16 | 17 | Collections may be GET-only that may not be added to or removed from. Examples of GET-only collections are the Systems collection at `/redfish/v1/systems/`. In a typical systems collection describing physical hardware, it wouldn't make sense to be able to create or remove members using GET or DELETE. 18 | 19 | Other collections may be editable. Examples of these might be the Accounts collection at `/redfish/v1/accountservice/accounts`. The API supports the addition or removal of user accounts. To add a new member to an editable collection, perform an HTTP POST to the collection resource with a body consisting of the required JSON properties needed to create a new member (this does not necessarily require you to POST every property because many may take a unique service-assigned value or take a default value.) 20 | 21 | For more information on collections see the Redfish 1.0 DMTF standard at [http://www.dmtf.org/standards/redfish](http:// www.dmtf.org/standards/redfish) and the example Python code: [https://github.com/HewlettPackard/python-proliant-sdk](https://github.com/HewlettPackard/python-proliant-sdk). 22 | > GET https://{iLO}/redfish/v1/systems/ showing a collection response (JSON) 23 | 24 | ```json 25 | { 26 | "@odata.id": "/redfish/v1/systems/", 27 | "@odata.context": "/redfish/v1/$metadata/", 28 | "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", 29 | "Members@odata.count": 1, 30 | "Members": [ 31 | { 32 | "@odata.id": "/redfish/v1/systems/1/" 33 | } 34 | ] 35 | } 36 | ``` 37 | 38 | **Properties** 39 | 40 | > **Collection Instances**: 41 | 42 | > * `https://{iLO}/redfish/v1/AccountService/Accounts` 43 | 44 | > * `https://{iLO}/redfish/v1/Chassis` 45 | 46 | > * `https://{iLO}/redfish/v1/EventService/EventSubscriptions` 47 | 48 | > * `https://{iLO}/redfish/v1/Managers` 49 | 50 | > * `https://{iLO}/redfish/v1/Managers/{item}/EthernetInterfaces` 51 | 52 | > * `https://{iLO}/redfish/v1/Managers/{item}/FederationGroups` 53 | 54 | > * `https://{iLO}/redfish/v1/Managers/{item}/FederationPeers` 55 | 56 | > * `https://{iLO}/redfish/v1/Managers/{item}/LicenseService` 57 | 58 | > * `https://{iLO}/redfish/v1/Managers/{item}/LogServices` 59 | 60 | > * `https://{iLO}/redfish/v1/Managers/{item}/LogServices/IEL/Entries` 61 | 62 | > * `https://{iLO}/redfish/v1/Managers/{item}/VirtualMedia` 63 | 64 | > * `https://{iLO}/redfish/v1/Registries` 65 | 66 | > * `https://{iLO}/redfish/v1/Schemas` 67 | 68 | > * `https://{iLO}/redfish/v1/SessionService/Sessions` 69 | 70 | > * `https://{iLO}/redfish/v1/Systems` 71 | 72 | > * `https://{iLO}/redfish/v1/Systems/{item}/LogServices` 73 | 74 | > * `https://{iLO}/redfish/v1/Systems/{item}/LogServices/IML/Entries` 75 | 76 | > * `https://{iLO}/redfish/v1/Systems/{item}/Memory` 77 | 78 | > * `https://{iLO}/redfish/v1/Systems/{item}/NetworkAdapters` 79 | 80 | > * `https://{iLO}/redfish/v1/Systems/{item}/PCIDevices` 81 | 82 | > * `https://{iLO}/redfish/v1/Systems/{item}/PCISlots` 83 | 84 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/ArrayControllers` 85 | 86 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/ArrayControllers/{item}/DiskDrives` 87 | 88 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/ArrayControllers/{item}/LogicalDrives` 89 | 90 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/ArrayControllers/{item}/StorageEnclosures` 91 | 92 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/HostBusAdapters` 93 | 94 | ### Members@odata.count 95 | 96 | **JSONPath**: `/Members@odata.count` (read only integer) 97 | 98 | The number of members in the collection. 99 | 100 | ### Members[] 101 | 102 | **JSONPath**: `/Members` (read only array of links) 103 | 104 | The Members array consists of links (`@odata.id`) to the members of the collection. 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /source/includes/_ilo5_resourcedefnhdr.md: -------------------------------------------------------------------------------- 1 | # Resource Definitions 2 | 3 | Each resource in the API has a "type" that defines its properties. See the Redfish specification for `@odata.type` for details. 4 | 5 | This section defines the supported types and lists the typical instances of each. Because this API document is applicable to all HPE servers using iLO 5, you may find variations such as: 6 | 7 | * properties implemented on one type of server and not another 8 | * resources that are read only on one type of server and not another 9 | * The number of resources of a particular type (for example, multiple compute nodes or enclosing chassis) 10 | 11 | ## Collections 12 | 13 | Many resource types in the API are members of "collections." Collections are groups of similar resources and are typically an array of Member links. 14 | 15 | Redfish does not define a generic collection "type" (@odata.type) but all collections are identical in structure. A `ComputerSystemCollection` is identical in structure to a `ChassisCollection` although they have slightly different names. Typically, collection types are suffixed with the word collection and are recognizable by the presence of the `Members` array of links. 16 | 17 | Collections may be GET-only that may not be added to or removed from. Examples of GET-only collections are the Systems collection at `/redfish/v1/systems/`. In a typical systems collection describing physical hardware, it wouldn't make sense to be able to create or remove members using GET or DELETE. 18 | 19 | Other collections may be editable. Examples of these might be the Accounts collection at `/redfish/v1/accountservice/accounts`. The API supports the addition or removal of user accounts. To add a new member to an editable collection, perform an HTTP POST to the collection resource with a body consisting of the required JSON properties needed to create a new member (this does not necessarily require you to POST every property because many may take a unique service-assigned value or take a default value.) 20 | 21 | For more information on collections see the Redfish 1.0 DMTF standard at [https://www.dmtf.org/standards/redfish](https://www.dmtf.org/standards/redfish) and the example Python code: [https://github.com/HewlettPackard/python-ilorest-library](https://github.com/HewlettPackard/python-ilorest-library). 22 | > GET https://{iLO}/redfish/v1/systems/ showing a collection response (JSON) 23 | 24 | ```json 25 | { 26 | "@odata.id": "/redfish/v1/systems/", 27 | "@odata.context": "/redfish/v1/$metadata/", 28 | "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", 29 | "Members@odata.count": 1, 30 | "Members": [ 31 | { 32 | "@odata.id": "/redfish/v1/systems/1/" 33 | } 34 | ] 35 | } 36 | ``` 37 | 38 | **Properties** 39 | 40 | > **Collection Instances**: 41 | 42 | > * `https://{iLO}/redfish/v1/AccountService/Accounts` 43 | 44 | > * `https://{iLO}/redfish/v1/Chassis` 45 | 46 | > * `https://{iLO}/redfish/v1/EventService/EventSubscriptions` 47 | 48 | > * `https://{iLO}/redfish/v1/Managers` 49 | 50 | > * `https://{iLO}/redfish/v1/Managers/{item}/EthernetInterfaces` 51 | 52 | > * `https://{iLO}/redfish/v1/Managers/{item}/FederationGroups` 53 | 54 | > * `https://{iLO}/redfish/v1/Managers/{item}/FederationPeers` 55 | 56 | > * `https://{iLO}/redfish/v1/Managers/{item}/LicenseService` 57 | 58 | > * `https://{iLO}/redfish/v1/Managers/{item}/LogServices` 59 | 60 | > * `https://{iLO}/redfish/v1/Managers/{item}/LogServices/IEL/Entries` 61 | 62 | > * `https://{iLO}/redfish/v1/Managers/{item}/VirtualMedia` 63 | 64 | > * `https://{iLO}/redfish/v1/Registries` 65 | 66 | > * `https://{iLO}/redfish/v1/Schemas` 67 | 68 | > * `https://{iLO}/redfish/v1/SessionService/Sessions` 69 | 70 | > * `https://{iLO}/redfish/v1/Systems` 71 | 72 | > * `https://{iLO}/redfish/v1/Systems/{item}/LogServices` 73 | 74 | > * `https://{iLO}/redfish/v1/Systems/{item}/LogServices/IML/Entries` 75 | 76 | > * `https://{iLO}/redfish/v1/Systems/{item}/Memory` 77 | 78 | > * `https://{iLO}/redfish/v1/Systems/{item}/NetworkAdapters` 79 | 80 | > * `https://{iLO}/redfish/v1/Systems/{item}/PCIDevices` 81 | 82 | > * `https://{iLO}/redfish/v1/Systems/{item}/PCISlots` 83 | 84 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/ArrayControllers` 85 | 86 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/ArrayControllers/{item}/DiskDrives` 87 | 88 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/ArrayControllers/{item}/LogicalDrives` 89 | 90 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/ArrayControllers/{item}/StorageEnclosures` 91 | 92 | > * `https://{iLO}/redfish/v1/Systems/{item}/SmartStorage/HostBusAdapters` 93 | 94 | ### Members@odata.count 95 | 96 | **JSONPath**: `/Members@odata.count` (read only integer) 97 | 98 | The number of members in the collection. 99 | 100 | ### Members[] 101 | 102 | **JSONPath**: `/Members` (read only array of links) 103 | 104 | The Members array consists of links (`@odata.id`) to the members of the collection. 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /source/includes/_ilo5_backupandrestore.md: -------------------------------------------------------------------------------- 1 | # iLO Backup and Restore 2 | 3 | The Backup & Restore feature allows you to restore the iLO configuration on a system with the same 4 | hardware configuration as the system that was backed up. This feature is not meant to duplicate a 5 | configuration and apply it to a different iLO system. 6 | 7 | In general, it is not expected that you will need to perform an iLO restore operation. However, there are 8 | cases in which having a backup of the configuration eases and expedites the return to a normal operating 9 | environment. 10 | 11 | As with any computer system, backing up your data is a recommended practice to minimize the impact 12 | from failures. Hewlett Packard Enterprise recommends performing a backup each time that you update 13 | the iLO firmware. 14 | 15 | You might want to restore the iLO configuration in the following situations: 16 | 17 | ## Battery failure or removal 18 | 19 | Various configuration parameters are stored in the battery-powered SRAM. Although rare, the battery 20 | can fail. In some situations, battery removal and replacement might be required. To avoid the loss of 21 | configuration information, restore the iLO configuration from a backup file after the battery is replaced. 22 | 23 | ## Reset to factory defaults 24 | 25 | In some cases, you might need to reset iLO to the factory default settings to erase settings external to 26 | iLO. Resetting iLO to the factory default settings erases the iLO configuration. To recover the iLO 27 | configuration quickly, restore the configuration from a backup file after the reset to the factory default 28 | settings is complete. 29 | 30 | ## Accidental or incorrect configuration change 31 | 32 | In some cases, the iLO configuration might be changed incorrectly, causing important settings to be 33 | lost. This situation might occur if iLO is set to the factory default settings or user accounts are deleted. 34 | To recover the original configuration, restore the configuration from a backup file. 35 | 36 | ## System board replacement 37 | 38 | If a system board replacement is required to address a hardware issue, you can use this feature to 39 | transfer the iLO configuration from the original system board to the new system board. 40 | 41 | ## Lost license key 42 | 43 | If a license key is accidentally replaced, or you reset iLO to the factory default settings, and you are 44 | not sure which key to install, you can restore the license key and other configuration settings from a 45 | backup file. 46 | 47 | ## What information is restored? 48 | 49 | The iLO configuration includes many categories such as Power, Network, Security, the User Database, 50 | and License Keys. Most configuration information is stored in the battery-powered SRAM memory device, 51 | and it can be backed up and restored. 52 | 53 | ### Information that is not restored 54 | 55 | Some information is not suitable to be restored. The information that cannot be restored is not part of the 56 | iLO configuration, but instead is related to the iLO or server system state. 57 | 58 | The following information is not backed up or restored: 59 | 60 | * Security state—Allowing a restore operation to change the iLO security state would defeat the principles of security 61 | and enforcement of security. 62 | * Integrated Management Log—To preserve information about events that occurred between the backup and the time or event that 63 | required the restore, this information is not restored. 64 | * iLO Event Log—To preserve information about events that occurred between the backup and the time or event that 65 | required the restore, this information is not restored. 66 | * Active Health System data—To preserve the information recorded during the backup and restore process, this information is not 67 | restored. 68 | * Server state information— Server power state (ON/OFF), Server UID LED states, iLO and server clock settings. 69 | 70 | 71 | ## Backing up the iLO 5 configuration 72 | 73 | > Find the information about the BackupRestoreService 74 | 75 | > GET `/redfish/v1/Managers/1/BackupRestoreService` 76 | 77 | ```json 78 | { 79 | "@odata.context": "/redfish/v1/$metadata#HpeiLOBackupRestoreService.HpeiLOBackupRestoreService", 80 | "@odata.etag": "W/\"D863AC37\"", 81 | "@odata.id": "/redfish/v1/Managers/1/BackupRestoreService", 82 | "@odata.type": "#HpeiLOBackupRestoreService.v2_2_0.HpeiLOBackupRestoreService", 83 | "Id": "BackupRestoreService", 84 | "BackupFileLocation": "/bkupdata/HPE_MXQ32200VV_20020928_0712.bak", 85 | "BackupFiles": { 86 | "@odata.id": "/redfish/v1/Managers/1/BackupRestoreService/BackupFiles" 87 | }, 88 | "HttpPushUri": "/cgi-bin/uploadRestoreFile", 89 | "Name": "Backup Restore Service" 90 | } 91 | ``` 92 | 93 | > GET the backup file based upon the `BackupFileLocation` URI 94 | 95 | > GET `/bkupdata/HPE_MXQ32200VV_20020928_0712.bak` 96 | 97 | The GET operation to the BackupFileLocation URI returns HTTP 200 with `Content Type: application/octet-stream`. This is the binary image of the backup file. 98 | 99 | ## Restoring the iLO 5 configuration 100 | 101 | > POST `/cgi-bin/uploadRestoreFile` 102 | 103 | The content type of the POST must be Form Data and include the session key 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /font-selection.json: -------------------------------------------------------------------------------- 1 | { 2 | "IcoMoonType": "selection", 3 | "icons": [ 4 | { 5 | "icon": { 6 | "paths": [ 7 | "M438.857 73.143q119.429 0 220.286 58.857t159.714 159.714 58.857 220.286-58.857 220.286-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857zM512 785.714v-108.571q0-8-5.143-13.429t-12.571-5.429h-109.714q-7.429 0-13.143 5.714t-5.714 13.143v108.571q0 7.429 5.714 13.143t13.143 5.714h109.714q7.429 0 12.571-5.429t5.143-13.429zM510.857 589.143l10.286-354.857q0-6.857-5.714-10.286-5.714-4.571-13.714-4.571h-125.714q-8 0-13.714 4.571-5.714 3.429-5.714 10.286l9.714 354.857q0 5.714 5.714 10t13.714 4.286h105.714q8 0 13.429-4.286t6-10z" 8 | ], 9 | "attrs": [], 10 | "isMulticolor": false, 11 | "tags": [ 12 | "exclamation-circle" 13 | ], 14 | "defaultCode": 61546, 15 | "grid": 14 16 | }, 17 | "attrs": [], 18 | "properties": { 19 | "id": 100, 20 | "order": 4, 21 | "prevSize": 28, 22 | "code": 58880, 23 | "name": "exclamation-sign", 24 | "ligatures": "" 25 | }, 26 | "setIdx": 0, 27 | "iconIdx": 0 28 | }, 29 | { 30 | "icon": { 31 | "paths": [ 32 | "M585.143 786.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-54.857v-292.571q0-8-5.143-13.143t-13.143-5.143h-182.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h54.857v182.857h-54.857q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h256q8 0 13.143-5.143t5.143-13.143zM512 274.286v-91.429q0-8-5.143-13.143t-13.143-5.143h-109.714q-8 0-13.143 5.143t-5.143 13.143v91.429q0 8 5.143 13.143t13.143 5.143h109.714q8 0 13.143-5.143t5.143-13.143zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z" 33 | ], 34 | "attrs": [], 35 | "isMulticolor": false, 36 | "tags": [ 37 | "info-circle" 38 | ], 39 | "defaultCode": 61530, 40 | "grid": 14 41 | }, 42 | "attrs": [], 43 | "properties": { 44 | "id": 85, 45 | "order": 3, 46 | "name": "info-sign", 47 | "prevSize": 28, 48 | "code": 58882 49 | }, 50 | "setIdx": 0, 51 | "iconIdx": 2 52 | }, 53 | { 54 | "icon": { 55 | "paths": [ 56 | "M733.714 419.429q0-16-10.286-26.286l-52-51.429q-10.857-10.857-25.714-10.857t-25.714 10.857l-233.143 232.571-129.143-129.143q-10.857-10.857-25.714-10.857t-25.714 10.857l-52 51.429q-10.286 10.286-10.286 26.286 0 15.429 10.286 25.714l206.857 206.857q10.857 10.857 25.714 10.857 15.429 0 26.286-10.857l310.286-310.286q10.286-10.286 10.286-25.714zM877.714 512q0 119.429-58.857 220.286t-159.714 159.714-220.286 58.857-220.286-58.857-159.714-159.714-58.857-220.286 58.857-220.286 159.714-159.714 220.286-58.857 220.286 58.857 159.714 159.714 58.857 220.286z" 57 | ], 58 | "attrs": [], 59 | "isMulticolor": false, 60 | "tags": [ 61 | "check-circle" 62 | ], 63 | "defaultCode": 61528, 64 | "grid": 14 65 | }, 66 | "attrs": [], 67 | "properties": { 68 | "id": 83, 69 | "order": 9, 70 | "prevSize": 28, 71 | "code": 58886, 72 | "name": "ok-sign" 73 | }, 74 | "setIdx": 0, 75 | "iconIdx": 6 76 | }, 77 | { 78 | "icon": { 79 | "paths": [ 80 | "M658.286 475.429q0-105.714-75.143-180.857t-180.857-75.143-180.857 75.143-75.143 180.857 75.143 180.857 180.857 75.143 180.857-75.143 75.143-180.857zM950.857 950.857q0 29.714-21.714 51.429t-51.429 21.714q-30.857 0-51.429-21.714l-196-195.429q-102.286 70.857-228 70.857-81.714 0-156.286-31.714t-128.571-85.714-85.714-128.571-31.714-156.286 31.714-156.286 85.714-128.571 128.571-85.714 156.286-31.714 156.286 31.714 128.571 85.714 85.714 128.571 31.714 156.286q0 125.714-70.857 228l196 196q21.143 21.143 21.143 51.429z" 81 | ], 82 | "width": 951, 83 | "attrs": [], 84 | "isMulticolor": false, 85 | "tags": [ 86 | "search" 87 | ], 88 | "defaultCode": 61442, 89 | "grid": 14 90 | }, 91 | "attrs": [], 92 | "properties": { 93 | "id": 2, 94 | "order": 1, 95 | "prevSize": 28, 96 | "code": 58887, 97 | "name": "icon-search" 98 | }, 99 | "setIdx": 0, 100 | "iconIdx": 7 101 | } 102 | ], 103 | "height": 1024, 104 | "metadata": { 105 | "name": "slate", 106 | "license": "SIL OFL 1.1" 107 | }, 108 | "preferences": { 109 | "showGlyphs": true, 110 | "showQuickUse": true, 111 | "showQuickUse2": true, 112 | "showSVGs": true, 113 | "fontPref": { 114 | "prefix": "icon-", 115 | "metadata": { 116 | "fontFamily": "slate", 117 | "majorVersion": 1, 118 | "minorVersion": 0, 119 | "description": "Based on FontAwesome", 120 | "license": "SIL OFL 1.1" 121 | }, 122 | "metrics": { 123 | "emSize": 1024, 124 | "baseline": 6.25, 125 | "whitespace": 50 126 | }, 127 | "resetPoint": 58880, 128 | "showSelector": false, 129 | "selector": "class", 130 | "classSelector": ".icon", 131 | "showMetrics": false, 132 | "showMetadata": true, 133 | "showVersion": true, 134 | "ie7": false 135 | }, 136 | "imagePref": { 137 | "prefix": "icon-", 138 | "png": true, 139 | "useClassSelector": true, 140 | "color": 4473924, 141 | "bgColor": 16777215 142 | }, 143 | "historySize": 100, 144 | "showCodes": true, 145 | "gridSize": 16, 146 | "showLiga": false 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /source/includes/_ilo4_introduction.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | The iLO RESTful API for HPE iLO 4 is a programming interface enabling state-of-the-art server management. This document contains helpful information about how to interact with the iLO RESTful API. The iLO RESTful API uses the basic HTTP operations (GET, PUT, POST, DELETE, and PATCH) to submit or return a JSON formatted resource to or from a URI on iLO 4. 4 | 5 | With modern scripting languages, you can easily write simple REST clients for RESTful APIs. Most languages, like Python, can transform JSON into internal-data structures, like dictionaries, allowing for easy access to data. This enables you to write custom code directly to the iLO RESTful API, instead of using intermediate tools such as HPE’s HPQLOCFG or CONREP. 6 | 7 | This document has been updated with examples from iLO 4 version 2.30 firmware. 8 | 9 | ## Redfish 1.0 Conformance 10 | 11 | The iLO RESTful API was first released with iLO 4 2.00 on HPE Gen9 servers. The iLO RESTful API also functioned as the starting point for the new Redfish 1.0 DMTF standard at [http:// www.dmtf.org/standards/redfish](http://www.dmtf.org/standards/redfish) 12 | 13 | Since the introduction of the iLO RESTful API, a number of changes were introduced into the Redfish standard by the DMTF SPMF members. At a high level, the changes include: 14 | 15 | * Use of OData annotations throughout the data to communicate meta-data 16 | * Revision of Error structures 17 | * Removal or Rename of certain JSON properties 18 | * Use of different collection schema 19 | * Use of a different set of entry-point URIs (/redfish/v1/ vs. /rest/v1) 20 | 21 | iLO 4 2.30 is Redfish 1.0 conformant while remaining backward compatible with the existing iLO RESTful API. Moving forward, the iLO RESTful API will become the iLO 4 enhanced implementation of Redfish. While conforming to the Redfish 1.0 standard, the iLO RESTful API is extended with Hewlett Packard Enterprise-specific features such as BIOS configuration. You should plan to update your client code to confirm to the Redfish standard. iLO will eventually remove any properties that do not match the Redfish schema definitions (while preserving the OEM extensions.) 22 | 23 | iLO 4 2.30 achieves Redfish 1.0 conformance and backward compatibility by: 24 | 25 | 1. Mirroring the resource model at both /redfish/v1/ and /rest/v1. 26 | 1. Returning both compatibility and Redfish properties by default. 27 | 1. Returning only Redfish conformant properties (with Hewlett Packard Enterprise extensions) if the Redfish-required OData header is included in the request (`OData-Version: 4.0`). 28 | 29 | Full details on how Redfish 1.0 was implemented in iLO 4 2.30 and how it impacts clients written for previous versions is found here: [http://www.hpe.com/h20195/V2/GetDocument.aspx?docname=4AA6-1727ENW&cc=us&lc=en](http://www.hpe.com/h20195/V2/GetDocument.aspx?docname=4AA6-1727ENW&cc=us&lc=en "Redfish Implementation on HP RESTful API for HPE iLO 4 - Technical White Paper") 30 | 31 | ## REST APIs Architected using HATEOS 32 | 33 | Representational State Transfer (REST) is a web service that uses basic CRUD (Create, Read, Update, Delete, and Patch) operations performed on resources using HTTP commands such as POST, GET, PUT, PATCH, and DELETE. The iLO RESTful API is designed using a REST architecture called HATEOS (Hypermedia as the Engine of Application State). This architecture allows the client to interact with iLO through a simple fixed URL (rest/v1) and several other top-level URIs documented in the iLO Data Model. The rest of the data model is discoverable by following clearly identified “links” in the data. This has the advantage that the client does not need to know a set of fixed URLs. When you create a script to automate tasks using the iLO RESTful API, you only need to hardcode this simple URL and design the script to discover the REST API URLs that are needed to complete a task. To learn more about REST and HATEOAS concepts, see: 34 | 35 | * [http://en.wikipedia.org/wiki/Representational_state_transfer](http://en.wikipedia.org/wiki/Representational_state_transfer) 36 | * [http://en.wikipedia.org/wiki/HATEOAS](http://en.wikipedia.org/wiki/HATEOAS) 37 | 38 | ## Key benefits of the iLO RESTful API 39 | 40 | The iLO RESTful API is becoming the main management interface for iLO 4 Hewlett Packard Enterprise servers. Its feature set will become larger than the existing iLO XML API (RIBCL) and IPMI interfaces. Using the iLO RESTful API, you can take full inventory of the server, control power and reset, configure BIOS and iLO settings, fetch event logs, as well as many other functions. 41 | 42 | The iLO RESTful API follows the trend of the Internet in moving to a common pattern for new software interfaces. Many web services in a variety of industries use REST APIs because they are easy to implement, easy to consume, and offer scalability advantages over previous technologies. 43 | 44 | HPE OneView, OpenStack, and many other server management APIs are now REST APIs. Most Hewlett Packard Enterprise Management software offerings, as well as the entire Software Defined Infrastructure, are built upon REST APIs. 45 | 46 | The iLO RESTful API has the additional advantage of consistency across all present and projected server architectures. The same data model works for traditional rack-mount servers, blades, as well as newer types of systems like Moonshot. This advantage comes because the data model is designed to self-describe the service’s capabilities to the client and has room for flexibility designed in from the start 47 | 48 | -------------------------------------------------------------------------------- /source/layouts/layout.erb: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2008-2013 Concur Technologies, Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | not use this file except in compliance with the License. You may obtain 6 | a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | License for the specific language governing permissions and limitations 14 | under the License. 15 | %> 16 | <% language_tabs = current_page.data.language_tabs || [] %> 17 | 18 | 19 | 20 | 21 | 22 | 23 | <%= current_page.data.title || "API Documentation" %> 24 | 25 | 53 | <%= stylesheet_link_tag :screen, media: :screen %> 54 | <%= stylesheet_link_tag :print, media: :print %> 55 | <% if current_page.data.search %> 56 | <%= javascript_include_tag "all" %> 57 | <% else %> 58 | <%= javascript_include_tag "all_nosearch" %> 59 | <% end %> 60 | 61 | 62 | 63 | 64 | 65 | NAV 66 | <%= image_tag('navbar.png') %> 67 | 68 | 69 |
    70 | <%= image_tag "logo.png" %> 71 |
    72 | 73 | 74 |
    75 | <% if language_tabs.any? %> 76 |
    77 | <% language_tabs.each do |lang| %> 78 | <% if lang.is_a? Hash %> 79 | <%= lang.values.first %> 80 | <% else %> 81 | <%= lang %> 82 | <% end %> 83 | <% end %> 84 |
    85 | <% end %> 86 | <% if current_page.data.search %> 87 | 90 |
      91 | <% end %> 92 |
      93 |
      94 | <% if current_page.data.toc_footers %> 95 | 100 | <% end %> 101 |
      102 |
      103 |
      104 |
      105 | <%= yield %> 106 | <% current_page.data.includes && current_page.data.includes.each do |include| %> 107 | <%= partial "includes/#{include}" %> 108 | <% end %> 109 |
      110 |
      111 | <% if language_tabs.any? %> 112 |
      113 | <% language_tabs.each do |lang| %> 114 | <% if lang.is_a? Hash %> 115 | <%= lang.values.first %> 116 | <% else %> 117 | <%= lang %> 118 | <% end %> 119 | <% end %> 120 |
      121 | <% end %> 122 |
      123 |
      124 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /source/javascripts/app/_lang.js: -------------------------------------------------------------------------------- 1 | //= require ../lib/_jquery 2 | 3 | /* 4 | Copyright 2008-2013 Concur Technologies, Inc. 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | not use this file except in compliance with the License. You may obtain 8 | a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | License for the specific language governing permissions and limitations 16 | under the License. 17 | */ 18 | (function (global) { 19 | 'use strict'; 20 | 21 | var languages = []; 22 | 23 | global.setupLanguages = setupLanguages; 24 | global.activateLanguage = activateLanguage; 25 | 26 | function activateLanguage(language) { 27 | if (!language) return; 28 | if (language === "") return; 29 | 30 | $(".lang-selector a").removeClass('active'); 31 | $(".lang-selector a[data-language-name='" + language + "']").addClass('active'); 32 | for (var i=0; i < languages.length; i++) { 33 | $(".highlight.tab-" + languages[i]).hide(); 34 | $(".lang-specific." + languages[i]).hide(); 35 | } 36 | $(".highlight.tab-" + language).show(); 37 | $(".lang-specific." + language).show(); 38 | 39 | global.toc.calculateHeights(); 40 | 41 | // scroll to the new location of the position 42 | if ($(window.location.hash).get(0)) { 43 | $(window.location.hash).get(0).scrollIntoView(true); 44 | } 45 | } 46 | 47 | // parseURL and stringifyURL are from https://github.com/sindresorhus/query-string 48 | // MIT licensed 49 | // https://github.com/sindresorhus/query-string/blob/7bee64c16f2da1a326579e96977b9227bf6da9e6/license 50 | function parseURL(str) { 51 | if (typeof str !== 'string') { 52 | return {}; 53 | } 54 | 55 | str = str.trim().replace(/^(\?|#|&)/, ''); 56 | 57 | if (!str) { 58 | return {}; 59 | } 60 | 61 | return str.split('&').reduce(function (ret, param) { 62 | var parts = param.replace(/\+/g, ' ').split('='); 63 | var key = parts[0]; 64 | var val = parts[1]; 65 | 66 | key = decodeURIComponent(key); 67 | // missing `=` should be `null`: 68 | // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters 69 | val = val === undefined ? null : decodeURIComponent(val); 70 | 71 | if (!ret.hasOwnProperty(key)) { 72 | ret[key] = val; 73 | } else if (Array.isArray(ret[key])) { 74 | ret[key].push(val); 75 | } else { 76 | ret[key] = [ret[key], val]; 77 | } 78 | 79 | return ret; 80 | }, {}); 81 | }; 82 | 83 | function stringifyURL(obj) { 84 | return obj ? Object.keys(obj).sort().map(function (key) { 85 | var val = obj[key]; 86 | 87 | if (Array.isArray(val)) { 88 | return val.sort().map(function (val2) { 89 | return encodeURIComponent(key) + '=' + encodeURIComponent(val2); 90 | }).join('&'); 91 | } 92 | 93 | return encodeURIComponent(key) + '=' + encodeURIComponent(val); 94 | }).join('&') : ''; 95 | }; 96 | 97 | // gets the language set in the query string 98 | function getLanguageFromQueryString() { 99 | if (location.search.length >= 1) { 100 | var language = parseURL(location.search).language 101 | if (language) { 102 | return language; 103 | } else if (jQuery.inArray(location.search.substr(1), languages) != -1) { 104 | return location.search.substr(1); 105 | } 106 | } 107 | 108 | return false; 109 | } 110 | 111 | // returns a new query string with the new language in it 112 | function generateNewQueryString(language) { 113 | var url = parseURL(location.search); 114 | if (url.language) { 115 | url.language = language; 116 | return stringifyURL(url); 117 | } 118 | return language; 119 | } 120 | 121 | // if a button is clicked, add the state to the history 122 | function pushURL(language) { 123 | if (!history) { return; } 124 | var hash = window.location.hash; 125 | if (hash) { 126 | hash = hash.replace(/^#+/, ''); 127 | } 128 | history.pushState({}, '', '?' + generateNewQueryString(language) + '#' + hash); 129 | 130 | // save language as next default 131 | localStorage.setItem("language", language); 132 | } 133 | 134 | function setupLanguages(l) { 135 | var defaultLanguage = localStorage.getItem("language"); 136 | 137 | languages = l; 138 | 139 | var presetLanguage = getLanguageFromQueryString(); 140 | if (presetLanguage) { 141 | // the language is in the URL, so use that language! 142 | activateLanguage(presetLanguage); 143 | 144 | localStorage.setItem("language", presetLanguage); 145 | } else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) { 146 | // the language was the last selected one saved in localstorage, so use that language! 147 | activateLanguage(defaultLanguage); 148 | } else { 149 | // no language selected, so use the default 150 | activateLanguage(languages[0]); 151 | } 152 | } 153 | 154 | // if we click on a language tab, activate that language 155 | $(function() { 156 | $(".lang-selector a").on("click", function() { 157 | var language = $(this).data("language-name"); 158 | pushURL(language); 159 | activateLanguage(language); 160 | return false; 161 | }); 162 | window.onpopstate = function() { 163 | activateLanguage(getLanguageFromQueryString()); 164 | }; 165 | }); 166 | })(window); 167 | -------------------------------------------------------------------------------- /source/javascripts/lib/_energize.js: -------------------------------------------------------------------------------- 1 | /** 2 | * energize.js v0.1.0 3 | * 4 | * Speeds up click events on mobile devices. 5 | * https://github.com/davidcalhoun/energize.js 6 | */ 7 | 8 | (function() { // Sandbox 9 | /** 10 | * Don't add to non-touch devices, which don't need to be sped up 11 | */ 12 | if(!('ontouchstart' in window)) return; 13 | 14 | var lastClick = {}, 15 | isThresholdReached, touchstart, touchmove, touchend, 16 | click, closest; 17 | 18 | /** 19 | * isThresholdReached 20 | * 21 | * Compare touchstart with touchend xy coordinates, 22 | * and only fire simulated click event if the coordinates 23 | * are nearby. (don't want clicking to be confused with a swipe) 24 | */ 25 | isThresholdReached = function(startXY, xy) { 26 | return Math.abs(startXY[0] - xy[0]) > 5 || Math.abs(startXY[1] - xy[1]) > 5; 27 | }; 28 | 29 | /** 30 | * touchstart 31 | * 32 | * Save xy coordinates when the user starts touching the screen 33 | */ 34 | touchstart = function(e) { 35 | this.startXY = [e.touches[0].clientX, e.touches[0].clientY]; 36 | this.threshold = false; 37 | }; 38 | 39 | /** 40 | * touchmove 41 | * 42 | * Check if the user is scrolling past the threshold. 43 | * Have to check here because touchend will not always fire 44 | * on some tested devices (Kindle Fire?) 45 | */ 46 | touchmove = function(e) { 47 | // NOOP if the threshold has already been reached 48 | if(this.threshold) return false; 49 | 50 | this.threshold = isThresholdReached(this.startXY, [e.touches[0].clientX, e.touches[0].clientY]); 51 | }; 52 | 53 | /** 54 | * touchend 55 | * 56 | * If the user didn't scroll past the threshold between 57 | * touchstart and touchend, fire a simulated click. 58 | * 59 | * (This will fire before a native click) 60 | */ 61 | touchend = function(e) { 62 | // Don't fire a click if the user scrolled past the threshold 63 | if(this.threshold || isThresholdReached(this.startXY, [e.changedTouches[0].clientX, e.changedTouches[0].clientY])) { 64 | return; 65 | } 66 | 67 | /** 68 | * Create and fire a click event on the target element 69 | * https://developer.mozilla.org/en/DOM/event.initMouseEvent 70 | */ 71 | var touch = e.changedTouches[0], 72 | evt = document.createEvent('MouseEvents'); 73 | evt.initMouseEvent('click', true, true, window, 0, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); 74 | evt.simulated = true; // distinguish from a normal (nonsimulated) click 75 | e.target.dispatchEvent(evt); 76 | }; 77 | 78 | /** 79 | * click 80 | * 81 | * Because we've already fired a click event in touchend, 82 | * we need to listed for all native click events here 83 | * and suppress them as necessary. 84 | */ 85 | click = function(e) { 86 | /** 87 | * Prevent ghost clicks by only allowing clicks we created 88 | * in the click event we fired (look for e.simulated) 89 | */ 90 | var time = Date.now(), 91 | timeDiff = time - lastClick.time, 92 | x = e.clientX, 93 | y = e.clientY, 94 | xyDiff = [Math.abs(lastClick.x - x), Math.abs(lastClick.y - y)], 95 | target = closest(e.target, 'A') || e.target, // needed for standalone apps 96 | nodeName = target.nodeName, 97 | isLink = nodeName === 'A', 98 | standAlone = window.navigator.standalone && isLink && e.target.getAttribute("href"); 99 | 100 | lastClick.time = time; 101 | lastClick.x = x; 102 | lastClick.y = y; 103 | 104 | /** 105 | * Unfortunately Android sometimes fires click events without touch events (seen on Kindle Fire), 106 | * so we have to add more logic to determine the time of the last click. Not perfect... 107 | * 108 | * Older, simpler check: if((!e.simulated) || standAlone) 109 | */ 110 | if((!e.simulated && (timeDiff < 500 || (timeDiff < 1500 && xyDiff[0] < 50 && xyDiff[1] < 50))) || standAlone) { 111 | e.preventDefault(); 112 | e.stopPropagation(); 113 | if(!standAlone) return false; 114 | } 115 | 116 | /** 117 | * Special logic for standalone web apps 118 | * See http://stackoverflow.com/questions/2898740/iphone-safari-web-app-opens-links-in-new-window 119 | */ 120 | if(standAlone) { 121 | window.location = target.getAttribute("href"); 122 | } 123 | 124 | /** 125 | * Add an energize-focus class to the targeted link (mimics :focus behavior) 126 | * TODO: test and/or remove? Does this work? 127 | */ 128 | if(!target || !target.classList) return; 129 | target.classList.add("energize-focus"); 130 | window.setTimeout(function(){ 131 | target.classList.remove("energize-focus"); 132 | }, 150); 133 | }; 134 | 135 | /** 136 | * closest 137 | * @param {HTMLElement} node current node to start searching from. 138 | * @param {string} tagName the (uppercase) name of the tag you're looking for. 139 | * 140 | * Find the closest ancestor tag of a given node. 141 | * 142 | * Starts at node and goes up the DOM tree looking for a 143 | * matching nodeName, continuing until hitting document.body 144 | */ 145 | closest = function(node, tagName){ 146 | var curNode = node; 147 | 148 | while(curNode !== document.body) { // go up the dom until we find the tag we're after 149 | if(!curNode || curNode.nodeName === tagName) { return curNode; } // found 150 | curNode = curNode.parentNode; // not found, so keep going up 151 | } 152 | 153 | return null; // not found 154 | }; 155 | 156 | /** 157 | * Add all delegated event listeners 158 | * 159 | * All the events we care about bubble up to document, 160 | * so we can take advantage of event delegation. 161 | * 162 | * Note: no need to wait for DOMContentLoaded here 163 | */ 164 | document.addEventListener('touchstart', touchstart, false); 165 | document.addEventListener('touchmove', touchmove, false); 166 | document.addEventListener('touchend', touchend, false); 167 | document.addEventListener('click', click, true); // TODO: why does this use capture? 168 | 169 | })(); -------------------------------------------------------------------------------- /source/includes/_ilo5_securityservice.md: -------------------------------------------------------------------------------- 1 | # Security Service 2 | 3 | Server Identity (DevID) is a standard (based on IEEE 802.1AR) way to uniquely identify a server across networks. DevID is uniquely bound to a server that enables a server to prove its identity in various industry standards and protocols that authenticate, provision, and authorize communicating devices. 4 | iLO supports factory provisioned server identity (iLO IDevID) and user defined server identity (iLO LDevID). iLO also stores the system certificates (System IDevID and System IAK). 5 | 6 | Following are the different server management identities: 7 | 8 | - [iLO IDevID](#ilo-idevid) 9 | - [iLO LDevID](#ilo-ldevid) 10 | - [System IDevID certificate](#system-idevid-certificate) 11 | - [System IAK certificate](#system-iak-certificate) 12 | - [Platform certificate](#platform-certificate) 13 | 14 | ## iLO IDevID 15 | 16 | iLO can be provisioned with server identity in the factory. This factory provisioned server identity is called iLO IDevID. HPE servers can be securely on boarded into a customer network using the IDevID for 802.1X authentication. iLO IDevID has life time validity and is immutable. 17 | To instruct the HPE factory to provision a server with an IDevID, include either SKU P41905-B21 (if you do not have a TPM2.0 module) or P42104-B21 (if you have a TPM2.0 module) in your order. 18 | 19 | ### iLO IDevID features 20 | 21 | iLO does not allow you to update or delete IDevID since it is immutable. 22 | You can view the iLO IDevID certificate using the RESTful API GET command: 23 | `/redfish/v1/Managers/{@managerId}/SecurityService/iLOIDevID/Certificates/{@certId}` 24 | 25 | ## iLO LDevID 26 | 27 | IDevID can be supplemented by a user defined server identity, called iLO LDevID. iLO LDevID is unique in the administrative domain, in which the server is used. HPE servers can be securely on boarded into a customer network using the LDevID for 802.1X authentication. iLO LDevID can be used on servers that do not have iLO IDevID. LDevID helps in facilitating the enrollment (authentication and authorization of credentials) by local network administrators. iLO allows to import, view, and delete LDevID outside the factory. 28 | 29 | ## Importing LDevID certificate 30 | 31 | 1. Generate a Certificate Signing Request (CSR) for LDevID. iLO allows creation of a CSR in PEM format for LDevID using the RESTful API POST command: 32 | `/redfish/v1/CertificateService/Actions/CertificateService.GenerateCSR` 33 | 34 | ```json 35 | { 36 | "Action": "CertificateService.GenerateCSR", 37 | "CertificateCollection": { 38 | "@odata.id": "/redfish/v1/Managers/1/SecurityService/iLOLDevID/Certificates/" 39 | } 40 | } 41 | ``` 42 | 43 | 2. Send this CSR to Certificate Authority to obtain a trusted certificate. 44 | 3. Import the trusted LDevID certificate into iLO. iLO allows import of LDevID certificate in PEM format using the RESTful API POST command: 45 | `/redfish/v1/Managers/{@managerId}/SecurityService/iLOLDevID/Certificates/` 46 | 47 | ```json 48 | 49 | { 50 | "CertificateType": "PEM", 51 | "CertificateString": "" 52 | } 53 | ``` 54 | 55 | Before importing, iLO validates the input certificate with the following parameters: 56 | 57 | - The public key in the certificate matches the one generated with its corresponding CSR. 58 | - The signing and hashing algorithms used in the certificate are FIPS compliant. 59 | 60 | **NOTE:** iLO supports import of LDevID certificates up to 16 KB size. 61 | 62 | ## Viewing the imported LDevID certificate 63 | 64 | To view the imported LDevID certificate, use the following RESTful API GET command: 65 | `/redfish/v1/Managers/{@managerId}/SecurityService/iLOLDevID/Certificates/{@certId}` 66 | 67 | ## Deleting the imported LDevID certificate 68 | 69 | To delete the imported LDevID certificate, use the following RESTful API DELETE command: 70 | `/redfish/v1/Managers/{@managerId}/SecurityService/iLOLDevID/Certificates/{@certId}` 71 | 72 | ## Replacing LDevID certificate 73 | 74 | You cannot update a LDevID certificate. To replace a certificate, you must delete the existing LDevID certificate and 75 | generate a new certificate. See [Importing LDevID certificate](#importing-ldevid-certificate). 76 | 77 | **NOTE:** In case LDevID certificate is lost due to secure erase, you can restore it using the Backup and Restore feature or replace it. 78 | 79 | ## System IDevID certificate 80 | 81 | iLO can be provisioned with the server host identity, available for use by the operating system. This factory provisioned system identity is called System IDevID, whose corresponding private key is stored in TPM. System IDevID follows the TCG proposal for TPM2.0 implementation of an IDevID. You have to order a specific server SKU (P42104-B21) for obtaining System IDevID. 82 | iLO does not allow you to update or delete the certificate. 83 | You can only view the certificate using the RESTful API GET command: 84 | `/redfish/v1/Managers/{@managerId}/SecurityService/SystemIDevID/Certificates/{@certId}` 85 | 86 | ## System IAK certificate 87 | 88 | iLO can be provisioned with the System Initial Attestation Key (IAK) certificate in the factory. This is similar to System IDevID but used for TPM-based attestation. The corresponding private key is stored in TPM. System IAK follows the TCG proposal for TPM2.0 implementation of an IDevID. You have to order a specific server SKU (P42104-B21) for obtaining System IAK certificate. 89 | iLO does not allow you to update or delete the certificate. 90 | You can only view the certificate using the RESTful API GET command: 91 | `/redfish/v1/Managers/{@managerId}/SecurityService/SystemIAK/Certificates/{@certId}` 92 | 93 | **NOTE:** iLO IDevID, iLO LDevID, System IDevID, and System IAK are preserved across iLO security state transitions, reset to factory defaults. 94 | 95 | ## Platform certificate 96 | 97 | iLO can be provisioned with the platform certificate which is an attribute certificate that functions as a signed manifest for the hardware chassis or configuration used to detect supply chain tampering. This certificate is TCG compliant. You have to order a specific server SKU (P42104-B21) for obtaining Platform certificate. 98 | iLO does not allow you to update or delete the certificate. 99 | You can only view the certificate using the RESTful API GET command: 100 | `/redfish/v1/Managers/{@managerId}/SecurityService/PlatformCert/Certificates/{@certId}` 101 | -------------------------------------------------------------------------------- /source/includes/_ilo5_authentication.md: -------------------------------------------------------------------------------- 1 | # Authentication and Sessions 2 | 3 | > The following shows the error displayed on `GET /redfish/v1/systems/` when no authentication is attempted: 4 | 5 | ``` 6 | 401 Forbidden 7 | ``` 8 | 9 | ```json 10 | { 11 | "error": { 12 | "@Message.ExtendedInfo": [ 13 | { 14 | "MessageId": "Base.1.0.NoValidSession" 15 | } 16 | ], 17 | "code": "iLO.0.10.ExtendedInfo", 18 | "message": "See @Message.ExtendedInfo for more information." 19 | } 20 | } 21 | ``` 22 | 23 | If you perform an HTTP operation on any other resource other than the root `/redfish/v1/` resource, you will receive an `HTTP 401 (Forbidden)` error indicating that you don’t have the authentication needed to access the resource. 24 | 25 | ## Basic Authentication 26 | 27 | ```shell 28 | curl https://{iLO}/redfish/v1/systems/ -i --insecure -u username:password -L 29 | ``` 30 | 31 | ```python 32 | import sys 33 | import redfish 34 | 35 | # When running remotely connect using the iLO address, iLO account name, 36 | # and password to send https requests 37 | iLO_host = "https://{iLO}" 38 | login_account = "admin" 39 | login_password = "password" 40 | 41 | ## Create a REDFISH object 42 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 43 | password=login_password, default_prefix='/redfish/v1') 44 | 45 | # Login into the server and create a session 46 | REDFISH_OBJ.login(auth="basic") 47 | 48 | # Logout of the current session 49 | REDFISH_OBJ.logout() 50 | ``` 51 | 52 | The RESTful API allows you to use HTTP Basic Authentication using a valid iLO user name and password. 53 | 54 | ## Creating and Using Sessions 55 | 56 | ```shell 57 | curl -H "Content-Type: application/json" -H "OData-Version: 4.0" -X POST --data "@data.json" https://{iLO}/redfish/v1/SessionService/Sessions/ --insecure 58 | ``` 59 | 60 | ```python 61 | import redfish 62 | 63 | # When running remotely connect using the iLO address, iLO account name, 64 | # and password to send https requests 65 | iLO_host = "https://{iLO}" 66 | login_account = "admin" 67 | login_password = "password" 68 | 69 | ## Create a REDFISH object 70 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 71 | password=login_password, default_prefix='/redfish/v1') 72 | 73 | # Login into the server and create a session 74 | REDFISH_OBJ.login(auth="session") 75 | ``` 76 | 77 | > Contents of data.json 78 | 79 | ```json 80 | { 81 | "UserName": "", 82 | "Password": "" 83 | } 84 | ``` 85 | 86 | > Successful headers from iLO: 87 | 88 | ``` 89 | Cache-Control: no-cache 90 | Connection: keep-alive 91 | Content-length: 163 92 | Content-type: application/json; charset=utf-8 93 | Date: Tue, 14 Jun 2016 22:23:39 GMT 94 | ETag: W/"C84E3EA9" 95 | Link: ; rel=self 96 | Location: https://{iLO}/redfish/v1/SessionService/Sessions/{item}/ 97 | OData-Version: 4.0 98 | Server: HPE-iLO-Server/1.30 99 | X-Auth-Token: c3c5f437f94bc24428fe930bbf50904f 100 | X-Frame-Options: sameorigin 101 | X_HP-CHRP-Service-Version: 1.0.3 102 | ``` 103 | 104 | > Successful response from iLO: 105 | 106 | ```json 107 | { 108 | "error": { 109 | "@Message.ExtendedInfo": [ 110 | { 111 | "MessageID": "Base.0.10.Created" 112 | } 113 | ], 114 | "code": "iLO.0.10.ExtendedInfo", 115 | "message": "See @Message.ExtendedInfo for more information." 116 | } 117 | } 118 | ``` 119 | 120 | For more complex multi-resource operations, you should log in and establish a session. To log in, iLO has a session manager object at the documented URI `/redfish/v1/sessions/`. To create a session POST a JSON object to the Session manager: 121 | 122 | 126 | 127 | If the session is created successfully, you receive an HTTP 201 (Created) response from iLO. There will also be two important HTTP response headers. 128 | 129 | * **X-Auth-Token** Your session token (string). This is a unique string for your login session. It must be included as a header in all subsequent HTTP operations in the session. 130 | 131 | * **Location** The URI of the newly created session resource. iLO allocates a new session resource describing your session. This is the URI that you must DELETE against in order to log out. If you lose this location URI, you can find it by crawling the HREF links in the Sessions collection. Store this URI to facilitate logging out. 132 | 133 | 136 | 137 | ## Using a Session 138 | 139 | To use a session, simply include the `X-Auth-Token` header supplied by the login response in all REST requests. 140 | 141 | ## Log Out of a Session 142 | 143 | ```shell 144 | curl -X "DELETE" https://{iLO}/redfish/v1/SessionService/Sessions/{item}/ -u admin:password --insecure 145 | ``` 146 | 147 | ```python 148 | import redfish 149 | 150 | # When running remotely connect using the iLO address, iLO account name, 151 | # and password to send https requests 152 | iLO_host = "https://{iLO}" 153 | login_account = "admin" 154 | login_password = "password" 155 | 156 | ## Create a REDFISH object 157 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 158 | password=login_password, default_prefix='/redfish/v1') 159 | 160 | # Login into the server and create a session 161 | REDFISH_OBJ.login(auth="session") 162 | 163 | # Logout of the current session 164 | REDFISH_OBJ.logout() 165 | ``` 166 | 167 | iLO supports a limited number of simultaneous sessions. If you do not log out of a session it will expire automatically after a time of inactivity. However, it is good practice to log out when finished with a session. 168 | 169 | To log out perform an `HTTP DELETE` to the URI that was returned in the "Location" header when you created the session. 170 | 171 | 174 | 175 | -------------------------------------------------------------------------------- /source/javascripts/lib/_imagesloaded.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * imagesLoaded PACKAGED v3.1.8 3 | * JavaScript is all like "You images are done yet or what?" 4 | * MIT License 5 | */ 6 | 7 | (function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s}); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

      2 | Slate: API Documentation Generator 3 |
      4 | Build Status 5 |

      6 | 7 |

      Slate helps you create beautiful, intelligent, responsive API documentation.

      8 | 9 |

      Screenshot of Example Documentation created with Slate

      10 | 11 |

      The example above was created with Slate. Check it out at lord.github.io/slate.

      12 | 13 | Features 14 | ------------ 15 | 16 | * **Clean, intuitive design** — With Slate, the description of your API is on the left side of your documentation, and all the code examples are on the right side. Inspired by [Stripe's](https://stripe.com/docs/api) and [Paypal's](https://developer.paypal.com/webapps/developer/docs/api/) API docs. Slate is responsive, so it looks great on tablets, phones, and even in print. 17 | 18 | * **Everything on a single page** — Gone are the days when your users had to search through a million pages to find what they wanted. Slate puts the entire documentation on a single page. We haven't sacrificed linkability, though. As you scroll, your browser's hash will update to the nearest header, so linking to a particular point in the documentation is still natural and easy. 19 | 20 | * **Slate is just Markdown** — When you write docs with Slate, you're just writing Markdown, which makes it simple to edit and understand. Everything is written in Markdown — even the code samples are just Markdown code blocks. 21 | 22 | * **Write code samples in multiple languages** — If your API has bindings in multiple programming languages, you can easily put in tabs to switch between them. In your document, you'll distinguish different languages by specifying the language name at the top of each code block, just like with Github Flavored Markdown. 23 | 24 | * **Out-of-the-box syntax highlighting** for [over 100 languages](https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexers), no configuration required. 25 | 26 | * **Automatic, smoothly scrolling table of contents** on the far left of the page. As you scroll, it displays your current position in the document. It's fast, too. We're using Slate at TripIt to build documentation for our new API, where our table of contents has over 180 entries. We've made sure that the performance remains excellent, even for larger documents. 27 | 28 | * **Let your users update your documentation for you** — By default, your Slate-generated documentation is hosted in a public Github repository. Not only does this mean you get free hosting for your docs with Github Pages, but it also makes it simple for other developers to make pull requests to your docs if they find typos or other problems. Of course, if you don't want to use GitHub, you're also welcome to host your docs elsewhere. 29 | 30 | Getting started with Slate is super easy! Simply fork this repository and follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the [sample docs](http://lord.github.io/slate). 31 | 32 | Getting Started with Slate 33 | ------------------------------ 34 | 35 | ### Prerequisites 36 | 37 | You're going to need: 38 | 39 | - **Linux or OS X** — Windows may work, but is unsupported. 40 | - **Ruby, version 2.2.5 or newer** 41 | - **Bundler** — If Ruby is already installed, but the `bundle` command doesn't work, just run `gem install bundler` in a terminal. 42 | 43 | ### Getting Set Up 44 | 45 | 1. Fork this repository on Github. 46 | 2. Clone *your forked repository* (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git` 47 | 3. `cd slate` 48 | 4. Initialize and start Slate. You can either do this locally, or with Vagrant: 49 | 50 | ```shell 51 | # either run this to run locally 52 | bundle install 53 | bundle exec middleman server 54 | 55 | # OR run this to run with vagrant 56 | vagrant up 57 | ``` 58 | 59 | You can now see the docs at http://localhost:4567. Whoa! That was fast! 60 | 61 | Now that Slate is all set up on your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/lord/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/lord/slate/wiki/Deploying-Slate). 62 | 63 | If you'd prefer to use Docker, instructions are available [in the wiki](https://github.com/lord/slate/wiki/Docker). 64 | 65 | Companies Using Slate 66 | --------------------------------- 67 | 68 | * [NASA](https://api.nasa.gov) 69 | * [IBM](https://docs.cloudant.com/api.html) 70 | * [Sony](http://developers.cimediacloud.com) 71 | * [Mozilla](http://localforage.github.io/localForage/) 72 | * [Best Buy](https://bestbuyapis.github.io/api-documentation/) 73 | * [Travis-CI](https://docs.travis-ci.com/api/) 74 | * [Greenhouse](https://developers.greenhouse.io/harvest.html) 75 | * [Woocommerce](http://woocommerce.github.io/woocommerce-rest-api-docs/) 76 | * [Appium](http://appium.io/slate/en/master) 77 | * [Dwolla](https://docs.dwolla.com/) 78 | * [Clearbit](https://clearbit.com/docs) 79 | * [Coinbase](https://developers.coinbase.com/api) 80 | * [Parrot Drones](http://developer.parrot.com/docs/bebop/) 81 | * [Fidor Bank](http://docs.fidor.de/) 82 | * [Scale](https://docs.scaleapi.com/) 83 | 84 | You can view more in [the list on the wiki](https://github.com/lord/slate/wiki/Slate-in-the-Wild). 85 | 86 | Need Help? Found a bug? 87 | -------------------- 88 | 89 | [Submit an issue](https://github.com/lord/slate/issues) to the Slate Github if you need any help. And, of course, feel free to submit pull requests with bug fixes or changes. 90 | 91 | Contributors 92 | -------------------- 93 | 94 | Slate was built by [Robert Lord](https://lord.io) while interning at [TripIt](https://www.tripit.com/). 95 | 96 | Thanks to the following people who have submitted major pull requests: 97 | 98 | - [@chrissrogers](https://github.com/chrissrogers) 99 | - [@bootstraponline](https://github.com/bootstraponline) 100 | - [@realityking](https://github.com/realityking) 101 | - [@cvkef](https://github.com/cvkef) 102 | 103 | Also, thanks to [Sauce Labs](http://saucelabs.com) for helping sponsor the project. 104 | 105 | Special Thanks 106 | -------------------- 107 | - [Middleman](https://github.com/middleman/middleman) 108 | - [jquery.tocify.js](https://github.com/gfranko/jquery.tocify.js) 109 | - [middleman-syntax](https://github.com/middleman/middleman-syntax) 110 | - [middleman-gh-pages](https://github.com/edgecase/middleman-gh-pages) 111 | - [Font Awesome](http://fortawesome.github.io/Font-Awesome/) 112 | -------------------------------------------------------------------------------- /source/includes/_ilo4_authentication.md: -------------------------------------------------------------------------------- 1 | # Authentication and Sessions 2 | 3 | > The following shows the error displayed on `GET /redfish/v1/systems/` when no authentication is attempted: 4 | 5 | ``` 6 | 401 Forbidden 7 | ``` 8 | 9 | ```json 10 | { 11 | "@odata.type": "#ExtendedInfo.ExtendedInfo", 12 | "Messages": [ 13 | { 14 | "MessageID": "Base.0.10.NoValidSession" 15 | } 16 | ], 17 | "Type": "ExtendedError.1.0.0", 18 | "error": { 19 | "@Message.ExtendedInfo": [ 20 | { 21 | "MessageId": "Base.0.10.NoValidSession" 22 | } 23 | ], 24 | "code": "iLO.0.10.GeneralError", 25 | "message": "A general error has occurred. See ExtendedInfo for more information." 26 | } 27 | } 28 | ``` 29 | 30 | If you perform an HTTP operation on any other resource other than the root `/redfish/v1/` resource, you will receive an `HTTP 401 (Forbidden)` error indicating that you don’t have the authentication needed to access the resource. 31 | 32 | ## Basic Authentication 33 | 34 | ```shell 35 | curl https://{iLO}/redfish/v1/systems/ -i --insecure -u username:password -L 36 | ``` 37 | 38 | ```python 39 | import sys 40 | import redfish 41 | 42 | # When running remotely connect using the iLO address, iLO account name, 43 | # and password to send https requests 44 | iLO_host = "https://{iLO}" 45 | login_account = "admin" 46 | login_password = "password" 47 | 48 | ## Create a REDFISH object 49 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 50 | password=login_password, default_prefix='/redfish/v1') 51 | 52 | # Login into the server and create a session 53 | REDFISH_OBJ.login(auth="basic") 54 | 55 | # Logout of the current session 56 | REDFISH_OBJ.logout() 57 | ``` 58 | 59 | The RESTful API allows you to use HTTP Basic Authentication using a valid iLO user name and password. 60 | 61 | ## Creating and Using Sessions 62 | 63 | ```shell 64 | curl -H "Content-Type: application/json" -H "OData-Version: 4.0" -X POST --data "@data.json" https://{iLO}/redfish/v1/SessionService/Sessions/ --insecure 65 | ``` 66 | 67 | ```python 68 | import redfish 69 | 70 | # When running remotely connect using the iLO address, iLO account name, 71 | # and password to send https requests 72 | iLO_host = "https://{iLO}" 73 | login_account = "admin" 74 | login_password = "password" 75 | 76 | ## Create a REDFISH object 77 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 78 | password=login_password, default_prefix='/redfish/v1') 79 | 80 | # Login into the server and create a session 81 | REDFISH_OBJ.login(auth="session") 82 | ``` 83 | 84 | > Contents of data.json 85 | 86 | ```json 87 | { 88 | "UserName": "", 89 | "Password": "" 90 | } 91 | ``` 92 | 93 | > Successful headers from iLO: 94 | 95 | ``` 96 | Cache-Control: no-cache 97 | Connection: keep-alive 98 | Content-length: 163 99 | Content-type: application/json; charset=utf-8 100 | Date: Tue, 14 Jun 2016 22:23:39 GMT 101 | ETag: W/"C84E3EA9" 102 | Link: ; rel=self 103 | Location: https://{iLO}/redfish/v1/SessionService/Sessions/{item}/ 104 | OData-Version: 4.0 105 | Server: HPE-iLO-Server/1.30 106 | X-Auth-Token: c3c5f437f94bc24428fe930bbf50904f 107 | X-Frame-Options: sameorigin 108 | X_HP-CHRP-Service-Version: 1.0.3 109 | ``` 110 | 111 | > Successful response from iLO: 112 | 113 | ```json 114 | { 115 | "Messages": [ 116 | { 117 | "MessageID": "Base.0.10.Created" 118 | } 119 | ], 120 | "Type": "ExtendedError.1.0.0", 121 | "error": { 122 | "@Message.ExtendedInfo": [ 123 | { 124 | "MessageID": "Base.0.10.Created" 125 | } 126 | ], 127 | "code": "iLO.0.10.ExtendedInfo", 128 | "message": "See @Message.ExtendedInfo for more information." 129 | } 130 | } 131 | ``` 132 | 133 | For more complex multi-resource operations, you should log in and establish a session. To log in, iLO has a session manager object at the documented URI `/redfish/v1/sessions/`. To create a session POST a JSON object to the Session manager: 134 | 135 | 139 | 140 | If the session is created successfully, you receive an HTTP 201 (Created) response from iLO. There will also be two important HTTP response headers. 141 | 142 | * **X-Auth-Token** Your session token (string). This is a unique string for your login session. It must be included as a header in all subsequent HTTP operations in the session. 143 | 144 | * **Location** The URI of the newly created session resource. iLO allocates a new session resource describing your session. This is the URI that you must DELETE against in order to log out. If you lose this location URI, you can find it by crawling the HREF links in the Sessions collection. Store this URI to facilitate logging out. 145 | 146 | 149 | 150 | ## Using a Session 151 | 152 | To use a session, simply include the `X-Auth-Token` header supplied by the login response in all REST requests. 153 | 154 | ## Log Out of a Session 155 | 156 | ```shell 157 | curl -X "DELETE" https://{iLO}/redfish/v1/SessionService/Sessions/{item}/ -u admin:password --insecure 158 | ``` 159 | 160 | ```python 161 | import redfish 162 | 163 | # When running remotely connect using the iLO address, iLO account name, 164 | # and password to send https requests 165 | iLO_host = "https://{iLO}" 166 | login_account = "admin" 167 | login_password = "password" 168 | 169 | ## Create a REDFISH object 170 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 171 | password=login_password, default_prefix='/redfish/v1') 172 | 173 | # Login into the server and create a session 174 | REDFISH_OBJ.login(auth="session") 175 | 176 | # Logout of the current session 177 | REDFISH_OBJ.logout() 178 | ``` 179 | 180 | iLO supports a limited number of simultaneous sessions. If you do not log out of a session it will expire automatically after a time of inactivity. However, it is good practice to log out when finished with a session. 181 | 182 | To log out perform an `HTTP DELETE` to the URI that was returned in the "Location" header when you created the session. 183 | 184 | 187 | 188 | -------------------------------------------------------------------------------- /source/includes/_ilo5_drivebaymapping.md: -------------------------------------------------------------------------------- 1 | # Managing Apollo Drive Bay Mapping 2 | The HPE Apollo 2000 System with the HPE Apollo r2800 Chassis (including the Storage Expander Backplane) supports 24 SFF HPE SmartDrives. The SFF drive bays can be assigned to specific server nodes. 3 | 4 | **CAUTION:** Changing the drive bay mapping configuration might cause data loss or data corruption. For example, consider a configuration with drive bays two through seven assigned to node 1, with the drives configured as a RAID0 volume. Data corruption might occur if you change the drive bay mapping so that the configured drives are no longer available. 5 | 6 | ## Prerequisites 7 | * HPE iLO 5 firmware 1.20 or later 8 | * Storage enclosure processor firmware 1.00 or later 9 | * Chassis firmware 1.2.10 or later 10 | 11 | ## Getting host port topology details 12 | The HostPortsInfo JSON object displays the node number and SAS controller associated with each server host port. Before you change the drive bay mapping, HPE recommends using the following REST API to view and understand the PortNumber mapping: 13 | > GET /redfish/v1/Chassis/1/AccHddService 14 | 15 | >This action returns the HostPortsInfo JSON object. 16 | 17 | ```json 18 | { 19 | "HostPortsInfo": [ 20 | { 21 | "NodeNumber": 1, 22 | "PortNumber": 1, 23 | "SlotNumber": 1 24 | }, 25 | { 26 | "NodeNumber": 2, 27 | "PortNumber": 2, 28 | "SlotNumber": 1 29 | }, 30 | { 31 | "NodeNumber": 3, 32 | "PortNumber": 3, 33 | "SlotNumber": 1 34 | }, 35 | { 36 | "NodeNumber": 4, 37 | "PortNumber": 4, 38 | "SlotNumber": 1 39 | } 40 | ] 41 | } 42 | ``` 43 | 44 | ## Getting current and pending drive bay mapping 45 | 46 | > GET /redfish/v1/Chassis/1/AccHddService/zone 47 | 48 | This action returns the CurrentZoneConfiguration and PendingZoneConfiguration JSON objects. 49 | 50 | > The CurrentZoneConfiguration JSON object displays the current drive bay mapping in the chassis. 51 | 52 | ```json 53 | { 54 | "CurrentZoneConfiguration": { 55 | "HostPort": [ 56 | { 57 | "BayNumber": [ 1, 2, 3, 4, 5, 6 ], 58 | "PortNumber": 1 59 | }, 60 | { 61 | "BayNumber": [ 7, 8, 9, 10, 11, 12 ], 62 | "PortNumber": 2 63 | }, 64 | { 65 | "BayNumber": [ 13, 14, 15, 16, 17, 18 ], 66 | "PortNumber": 3 67 | }, 68 | { 69 | "BayNumber": [ 19, 20, 21, 22, 23, 24 ], 70 | "PortNumber": 4 71 | }, 72 | { 73 | "PortNumber": null 74 | } 75 | ] 76 | } 77 | } 78 | ``` 79 | 80 | **Note:** The value PortNumber null indicates that a drive bay is not assigned. 81 | 82 | > The PendingZoneConfiguration JSON object displays the pending drive bay mapping configuration. This configuration will not be applied until all nodes remain powered off for at least 5 seconds. 83 | 84 | ```json 85 | { 86 | "PendingZoneConfiguration": { 87 | "HostPort": [ 88 | { 89 | "BayNumber": [ 1, 2, 3, 4 ], 90 | "PortNumber": 1 91 | }, 92 | { 93 | "BayNumber": [ 7, 8, 9, 10 ], 94 | "PortNumber": 2 95 | }, 96 | { 97 | "BayNumber": [ 13, 14, 15, 16 ], 98 | "PortNumber": 3 99 | }, 100 | { 101 | "BayNumber": [ 19, 20, 21, 22 ], 102 | "PortNumber": 4 103 | }, 104 | { 105 | "BayNumber": [ 5, 6, 11, 12, 17, 18, 23, 24 ], 106 | "PortNumber": null 107 | } 108 | ] 109 | } 110 | } 111 | ``` 112 | **Note:** The value PortNumber null indicates that a drive bay is not assigned. 113 | 114 | ## Configuring drive bay mapping 115 | You can make drive bay mapping configuration changes from any server node. The changes take effect when all server nodes in the Apollo 2000 system chassis are powered off and the Chassis firmware is able to reset the Storage Expander backplane. All nodes must remain powered off for at least 5 seconds after you initiate the configuration change. 116 | 117 | The following example shows three drive bays assigned to each node. 118 | 119 | > POST /redfish/v1/Chassis/1/AccHddService/Zone/Actions/HpeServerAccHddZone.ConfigureZone 120 | 121 | ```json 122 | { 123 | "HostPort": [ 124 | { 125 | "BayNumber": [ 126 | 1, 127 | 2, 128 | 3 129 | ], 130 | "PortNumber": 1 131 | }, 132 | { 133 | "BayNumber": [ 134 | 7, 135 | 8, 136 | 9 137 | ], 138 | "PortNumber": 2 139 | }, 140 | { 141 | "BayNumber": [ 142 | 13, 143 | 14, 144 | 15 145 | ], 146 | "PortNumber": 3 147 | }, 148 | { 149 | "BayNumber": [ 150 | 19, 151 | 20, 152 | 21 153 | ], 154 | "PortNumber": 4 155 | } 156 | ] 157 | } 158 | ``` 159 | 160 | This action returns a response indicating that all server nodes in the chassis must remain powered off for at least 5 seconds for the changes to take effect. 161 | 162 | ```json 163 | { 164 | "error": { 165 | "code": "iLO.0.10.ExtendedInfo", 166 | "message": "See @Message.ExtendedInfo for more information.", 167 | "@Message.ExtendedInfo": [ 168 | { 169 | "MessageId": "iLO.2.9.ChassisResetRequired" 170 | } 171 | ] 172 | } 173 | } 174 | ``` 175 | 176 | ## Setting drive bay mapping to the default configuration 177 | 178 | The default configuration divides the 24 SFF drive bays by the number of server host ports in the Apollo 2000 Chassis. In a configuration with four 1U servers, the default drive bay configuration is six drive bays allocated to each of the four server slots. In a configuration with two 2U servers, the default drive bay configuration is 12 drive bays allocated to each of the two server slots. 179 | 180 | POST an empty JSON object to URI to set drive bay mapping to the default configuration. 181 | 182 | > POST /redfish/v1/Chassis/1/AccHddService/Zone/Actions/HpeServerAccHddZone.LoadDefault 183 | 184 | ```json 185 | {} 186 | ``` 187 | 188 | This action returns a response indicating that all server nodes in the chassis must remain powered off for at least 5 seconds for the changes to take effect. 189 | 190 | ```json 191 | { 192 | "error": { 193 | "code": "iLO.0.10.ExtendedInfo", 194 | "message": "See @Message.ExtendedInfo for more information.", 195 | "@Message.ExtendedInfo": [ 196 | { 197 | "MessageId": "iLO.2.9.ChassisResetRequired" 198 | } 199 | ] 200 | } 201 | } 202 | ``` 203 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit #abort if any command fails 3 | me=$(basename "$0") 4 | 5 | help_message="\ 6 | Usage: $me [-c FILE] [] 7 | Deploy generated files to a git branch. 8 | 9 | Options: 10 | 11 | -h, --help Show this help information. 12 | -v, --verbose Increase verbosity. Useful for debugging. 13 | -e, --allow-empty Allow deployment of an empty directory. 14 | -m, --message MESSAGE Specify the message used when committing on the 15 | deploy branch. 16 | -n, --no-hash Don't append the source commit's hash to the deploy 17 | commit's message. 18 | --source-only Only build but not push 19 | --push-only Only push but not build 20 | " 21 | 22 | 23 | run_build() { 24 | bundle exec middleman build --clean 25 | } 26 | 27 | parse_args() { 28 | # Set args from a local environment file. 29 | if [ -e ".env" ]; then 30 | source .env 31 | fi 32 | 33 | # Parse arg flags 34 | # If something is exposed as an environment variable, set/overwrite it 35 | # here. Otherwise, set/overwrite the internal variable instead. 36 | while : ; do 37 | if [[ $1 = "-h" || $1 = "--help" ]]; then 38 | echo "$help_message" 39 | exit 0 40 | elif [[ $1 = "-v" || $1 = "--verbose" ]]; then 41 | verbose=true 42 | shift 43 | elif [[ $1 = "-e" || $1 = "--allow-empty" ]]; then 44 | allow_empty=true 45 | shift 46 | elif [[ ( $1 = "-m" || $1 = "--message" ) && -n $2 ]]; then 47 | commit_message=$2 48 | shift 2 49 | elif [[ $1 = "-n" || $1 = "--no-hash" ]]; then 50 | GIT_DEPLOY_APPEND_HASH=false 51 | shift 52 | elif [[ $1 = "--source-only" ]]; then 53 | source_only=true 54 | shift 55 | elif [[ $1 = "--push-only" ]]; then 56 | push_only=true 57 | shift 58 | else 59 | break 60 | fi 61 | done 62 | 63 | if [ ${source_only} ] && [ ${push_only} ]; then 64 | >&2 echo "You can only specify one of --source-only or --push-only" 65 | exit 1 66 | fi 67 | 68 | # Set internal option vars from the environment and arg flags. All internal 69 | # vars should be declared here, with sane defaults if applicable. 70 | 71 | # Source directory & target branch. 72 | deploy_directory=build 73 | deploy_branch=gh-pages 74 | 75 | #if no user identity is already set in the current git environment, use this: 76 | default_username=${GIT_DEPLOY_USERNAME:-deploy.sh} 77 | default_email=${GIT_DEPLOY_EMAIL:-} 78 | 79 | #repository to deploy to. must be readable and writable. 80 | repo=origin 81 | 82 | #append commit hash to the end of message by default 83 | append_hash=${GIT_DEPLOY_APPEND_HASH:-true} 84 | } 85 | 86 | main() { 87 | enable_expanded_output 88 | 89 | if ! git diff --exit-code --quiet --cached; then 90 | echo Aborting due to uncommitted changes in the index >&2 91 | return 1 92 | fi 93 | 94 | commit_title=`git log -n 1 --format="%s" HEAD` 95 | commit_hash=` git log -n 1 --format="%H" HEAD` 96 | 97 | #default commit message uses last title if a custom one is not supplied 98 | if [[ -z $commit_message ]]; then 99 | commit_message="publish: $commit_title" 100 | fi 101 | 102 | #append hash to commit message unless no hash flag was found 103 | if [ $append_hash = true ]; then 104 | commit_message="$commit_message"$'\n\n'"generated from commit $commit_hash" 105 | fi 106 | 107 | previous_branch=`git rev-parse --abbrev-ref HEAD` 108 | 109 | if [ ! -d "$deploy_directory" ]; then 110 | echo "Deploy directory '$deploy_directory' does not exist. Aborting." >&2 111 | return 1 112 | fi 113 | 114 | # must use short form of flag in ls for compatibility with macOS and BSD 115 | if [[ -z `ls -A "$deploy_directory" 2> /dev/null` && -z $allow_empty ]]; then 116 | echo "Deploy directory '$deploy_directory' is empty. Aborting. If you're sure you want to deploy an empty tree, use the --allow-empty / -e flag." >&2 117 | return 1 118 | fi 119 | 120 | if git ls-remote --exit-code $repo "refs/heads/$deploy_branch" ; then 121 | # deploy_branch exists in $repo; make sure we have the latest version 122 | 123 | disable_expanded_output 124 | git fetch --force $repo $deploy_branch:$deploy_branch 125 | enable_expanded_output 126 | fi 127 | 128 | # check if deploy_branch exists locally 129 | if git show-ref --verify --quiet "refs/heads/$deploy_branch" 130 | then incremental_deploy 131 | else initial_deploy 132 | fi 133 | 134 | restore_head 135 | } 136 | 137 | initial_deploy() { 138 | git --work-tree "$deploy_directory" checkout --orphan $deploy_branch 139 | git --work-tree "$deploy_directory" add --all 140 | commit+push 141 | } 142 | 143 | incremental_deploy() { 144 | #make deploy_branch the current branch 145 | git symbolic-ref HEAD refs/heads/$deploy_branch 146 | #put the previously committed contents of deploy_branch into the index 147 | git --work-tree "$deploy_directory" reset --mixed --quiet 148 | git --work-tree "$deploy_directory" add --all 149 | 150 | set +o errexit 151 | diff=$(git --work-tree "$deploy_directory" diff --exit-code --quiet HEAD --)$? 152 | set -o errexit 153 | case $diff in 154 | 0) echo No changes to files in $deploy_directory. Skipping commit.;; 155 | 1) commit+push;; 156 | *) 157 | echo git diff exited with code $diff. Aborting. Staying on branch $deploy_branch so you can debug. To switch back to master, use: git symbolic-ref HEAD refs/heads/master && git reset --mixed >&2 158 | return $diff 159 | ;; 160 | esac 161 | } 162 | 163 | commit+push() { 164 | set_user_id 165 | git --work-tree "$deploy_directory" commit -m "$commit_message" 166 | 167 | disable_expanded_output 168 | #--quiet is important here to avoid outputting the repo URL, which may contain a secret token 169 | git push --quiet $repo $deploy_branch 170 | enable_expanded_output 171 | } 172 | 173 | #echo expanded commands as they are executed (for debugging) 174 | enable_expanded_output() { 175 | if [ $verbose ]; then 176 | set -o xtrace 177 | set +o verbose 178 | fi 179 | } 180 | 181 | #this is used to avoid outputting the repo URL, which may contain a secret token 182 | disable_expanded_output() { 183 | if [ $verbose ]; then 184 | set +o xtrace 185 | set -o verbose 186 | fi 187 | } 188 | 189 | set_user_id() { 190 | if [[ -z `git config user.name` ]]; then 191 | git config user.name "$default_username" 192 | fi 193 | if [[ -z `git config user.email` ]]; then 194 | git config user.email "$default_email" 195 | fi 196 | } 197 | 198 | restore_head() { 199 | if [[ $previous_branch = "HEAD" ]]; then 200 | #we weren't on any branch before, so just set HEAD back to the commit it was on 201 | git update-ref --no-deref HEAD $commit_hash $deploy_branch 202 | else 203 | git symbolic-ref HEAD refs/heads/$previous_branch 204 | fi 205 | 206 | git reset --mixed 207 | } 208 | 209 | filter() { 210 | sed -e "s|$repo|\$repo|g" 211 | } 212 | 213 | sanitize() { 214 | "$@" 2> >(filter 1>&2) | filter 215 | } 216 | 217 | parse_args "$@" 218 | 219 | if [[ ${source_only} ]]; then 220 | run_build 221 | elif [[ ${push_only} ]]; then 222 | main "$@" 223 | else 224 | run_build 225 | main "$@" 226 | fi 227 | -------------------------------------------------------------------------------- /source/includes/_ilo4_gettingstarted.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ## Tips for Using the RESTful API 4 | 5 | The RESTful API for HPE iLO is available on ProLiant Gen9 servers running iLO 4 2.00 or later with the iLO Standard license, although some features in the data might not be available without an Advanced license.. 6 | 7 | To access the RESTful API, you need an HTTPS-capable client, such as a web browser with the Postman REST Client plugin extension or cURL (a popular command line HTTP utility). 8 | 9 | ## RESTful Interface Tool and Python Examples 10 | 11 | Although not a requirement, you can use the **RESTful Interface Tool** with the RESTful API. This command line tool provides a level of abstraction and convenience above direct access to the RESTful API. For details see: [http://www.hpe.com/info/restfulapi](http://www.hpe.com/info/restfulapi). 12 | 13 | > ***Python**: See ex1_functionname() in the Python example code. This means look for the specified function name in the python example code.* 14 | 15 | Also, Hewlett Packard Enterprise published example Python code that implements a number of common operations in a RESTful API client. This code can be downloaded at [https://github.com/HewlettPackard/python-ilorest-library](https://github.com/HewlettPackard/python-ilorest-library). In some cases the examples in this document may refer to examples in the Python code with this notation: 16 | 17 | If you prefer not to implement a client in Python, this serves as a good pseudocode implementing the logic required to perform an operation. 18 | 19 | ## Example REST API operation with cURL 20 | 21 | ```shell 22 | > curl https://{iLO}/redfish/v1/ -i --insecure -L 23 | ``` 24 | 25 |
      26 |
        27 |
      • -i returns HTTP response headers
      • 28 |
      • --insecure bypasses TLS/SSL certification verification
      • 29 |
      • -L follows HTTP redirect
      • 30 |
      31 |

      The above command returns JSON like this:

      32 |
      33 | 34 | ```shell 35 | { 36 | "@odata.type": "#ServiceRoot.v1_0_0.ServiceRoot", 37 | "Name": "Service Root", 38 | "RedfishVersion": "0.96.0", 39 | "@odata.id": "/redfish/v1/", 40 | "@odata.context": "/redfish/v1/$metadata#ServiceRoot", 41 | "Time": "2014-09-03T11:00:00+00:00", 42 | "UUID": "92384634-2938-2342-8820-489239905423", 43 | "Oem": { 44 | "Hp": { 45 | "@odata.type": "#HpiLOServiceExt.1.0.0.HpiLOServiceExt", 46 | "Manager": [{ 47 | "ManagerFirmwareVersion": "2.50", 48 | "HostName": "ILOHD53NP0108", 49 | "ManagerType": "iLO 4", 50 | "IPManager": { 51 | "ManagerUrl": { 52 | "xref": "https://16.85.178.23" 53 | }, 54 | "Name": "Management Console Information", 55 | "ManagerType": "OneView", 56 | "OvManagesiLOIP": false, 57 | "ManagerProductName": "HP OneView", 58 | "FirmwareManaged": false, 59 | "SppVersion": null, 60 | "StorageManaged": false, 61 | "iLOManaged": true, 62 | "Type": "HPQ_iLOManagerDescriptor/1.1.0", 63 | "BiosManaged": false 64 | }, 65 | "Blade": { 66 | "BayNumber": "Bay 3" 67 | }, 68 | "FQDN": "ILOHD53NP0108.americas.hpqcorp.net", 69 | "DefaultLanguage": "en", 70 | "Languages": [{ 71 | "Version": "2.50.15", 72 | "Language": "en", 73 | "TranslationName": "English" 74 | }], 75 | "ManagerFirmwareVersionPass": "15" 76 | }], 77 | "Sessions": { 78 | "LocalLoginEnabled": true, 79 | "LoginFailureDelay": 0, 80 | "LDAPAuthLicenced": true, 81 | "KerberosEnabled": false, 82 | "ServerName": "WIN-MKNP1GNHVSN", 83 | "SecurityOverride": true, 84 | "CertCommonName": "ILOHD53NP0108.americas.hpqcorp.net", 85 | "LoginHint": { 86 | "HintPOSTData": { 87 | "UserName": "username", 88 | "Password": "password" 89 | }, 90 | "Hint": "POST to /Sessions to login using the following JSON object:" 91 | }, 92 | "LDAPEnabled": false 93 | } 94 | } 95 | }, 96 | "Id": "v1", 97 | "Chassis": { 98 | "@odata.id": "/redfish/v1/chassis/" 99 | }, 100 | "Managers": { 101 | "@odata.id": "/redfish/v1/managers/" 102 | }, 103 | "Systems": { 104 | "@odata.id": "/redfish/v1/systems/" 105 | }, 106 | "Providers": { 107 | "@odata.id": "/redfish/v1/providers/" 108 | }, 109 | "Sessions": { 110 | "@odata.id": "/redfish/v1/sessions/" 111 | } 112 | } 113 | ``` 114 | 115 | Let’s perform our first GET operation using the RESTful API. We will do an HTTP GET on the iLO HTTPS port, typically port 443 (although it could be different if you have previously configured iLO to use another port). Your client should be prepared to handle the HTTPS certificate challenge. The interface is not available over open HTTP (port 80), so you must use HTTPS. 116 | 117 | Our GET operation will be against a resource at `/redfish/v1/` (with a trailing slash): 118 | 119 | It is best to perform this initial GET with a tool like the CURL or the Postman REST Client mentioned above. Later you will want to do this with your own scripting code, but for now it’s useful to see the HTTP header information exchanged using a browser. 120 | 121 | CURL is a command line utility available for many Operating Systems that enables easy access to the RESTful API. CURL is available at [http://curl.haxx.se/](http://curl.haxx.se/). Note that all the CURL examples will use a flag –insecure. This causes CURL to bypass validation of the HTTPS certificate. In real use iLO should be configured to use a user-supplied certificate and this option is not necessary. Notice also that we use the –L option to force CURL to follow HTTP redirect responses. If iLO changes URI locations for various items, it can indicate to the client where the new location is and automatically follow the new link. 122 | 123 | In JSON, there is no strong ordering of property names, so iLO may return JSON properties in any order. Likewise, iLO cannot assume the order of properties in any submitted JSON. This is why the best scripting data structure for a RESTful client is a dictionary: a simple set of unordered key/value pairs. This lack of ordering is also the reason you see embedded structure within objects (objects within objects). This allows us to keep related data together that is more logically organized, aesthetically pleasing to view, and helps avoid property name conflicts or ridiculously long property names. It also allows us to use identical blocks of JSON in many places in the data model, like status. 124 | 125 | 126 | ## HTTP Resource Operations 127 | 128 | Operation | HTTP Command | Description 129 | -------------- | -------------- | -------------- 130 | Create | POST resource URI (payload = resource data) | Creates a new resource or invokes a custom action. A synchronous POST returns the newly created resource. 131 | Read | GET resource URI | Returns the requested resource representation. 132 | Update | PATCH or PUT resource URI (payload = update data) | Updates an existing resource. You can only PATCH properties that are marked readonly = false in the schema. 133 | Delete | DELETE resource URI | Deletes the specified resource. 134 | 135 | ## HTTP Status Return Codes 136 | 137 | Return Status | Description 138 | -------------- | -------------- | -------------- 139 | 2xx | Successful operation. 140 | 308 | The resource has moved 141 | 4xx | Client-side error with message returned 142 | 5xx | iLO error with error message returned 143 | 144 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /source/includes/_ilo4_navigating.md: -------------------------------------------------------------------------------- 1 | # Navigating the Data Model 2 | 3 | Unlike some simple REST service, this API is designed to be implemented on many different models of servers and other IT infrastructure devices for years to come. These devices may be quite different from one another. For this reason, the API does not specify the URIs to various resources. Do not assume the BIOS version information is always at a particular URI. 4 | 5 | This is more complex for the client, but is necessary to make sure the data model can change to accommodate various future server architectures without requiring specification changes. As an example, if the BIOS version is at `/redfish/v1/systems/1/`, and a client assumed it is always there, the client would then break when the interface is implemented on a different type of architecture with many compute nodes, each with its own BIOS version. 6 | 7 | 10 | 11 | The supported stable URIs are those referenced directly in this API reference and include: 12 | 13 | * /redfish/v1/ 14 | * /redfish/v1/systems/ 15 | * /redfish/v1/chassis/ 16 | * /redfish/v1/managers/ 17 | * /redfish/v1/sessions/ 18 | 19 | 20 | ## Iterating Collections 21 | 22 | ```shell 23 | curl https://{iLO}/redfish/v1/systems/ -i --insecure -u username:password -L 24 | ``` 25 | 26 | ```python 27 | import sys 28 | import redfish 29 | 30 | # When running remotely connect using the iLO address, iLO account name, 31 | # and password to send https requests 32 | iLO_host = "https://{iLO}" 33 | login_account = "admin" 34 | login_password = "password" 35 | 36 | ## Create a REDFISH object 37 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 38 | password=login_password, default_prefix='/redfish/v1') 39 | 40 | # Login into the server and create a session 41 | REDFISH_OBJ.login(auth="session") 42 | 43 | # Do a GET on a given path 44 | response = REDFISH_OBJ.get("/redfish/v1/systems/", None) 45 | 46 | # Print out the response 47 | sys.stdout.write("%s\n" % response) 48 | 49 | # Logout of the current session 50 | REDFISH_OBJ.logout() 51 | ``` 52 | 53 | > JSON response example: 54 | 55 | ```json 56 | { 57 | "@odata.id": "/redfish/v1/systems/", 58 | "@odata.context": "/redfish/v1/$metadata/", 59 | "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", 60 | "Members@odata.count": 1, 61 | "Members": [ 62 | { 63 | "@odata.id": "/redfish/v1/systems/1/" 64 | } 65 | ] 66 | } 67 | ``` 68 | 69 | Many operations will require you to locate the resource you wish to use. Most of these resources are members of "collections" (arrays of similar items). The method to find collections members is consistent for compute nodes, chassis, management processors, and many other resources in the data model. 70 | 71 | ## Find a Compute Node 72 | 73 | ```shell 74 | curl https://{host}/redfish/v1/systems/{item}/ -i --insecure -u username:password -L 75 | ``` 76 | 77 | ```python 78 | import sys 79 | import redfish 80 | 81 | # When running remotely connect using the iLO address, iLO account name, 82 | # and password to send https requests 83 | iLO_host = "https://{iLO}" 84 | login_account = "admin" 85 | login_password = "password" 86 | 87 | ## Create a REDFISH object 88 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 89 | password=login_password, default_prefix='/redfish/v1') 90 | 91 | # Login into the server and create a session 92 | REDFISH_OBJ.login(auth="session") 93 | 94 | # Do a GET on a given path 95 | response = REDFISH_OBJ.get("/redfish/v1/systems/{item}/", None) 96 | 97 | # Print out the response 98 | sys.stdout.write("%s\n" % response) 99 | 100 | # Logout of the current session 101 | REDFISH_OBJ.logout() 102 | ``` 103 | 104 | > JSON response example: 105 | 106 | ```json 107 | { 108 | "@odata.context": "/redfish/v1/$metadata#Systems/Members/$entity", 109 | "@odata.id": "/redfish/v1/Systems/1/", 110 | "@odata.type": "#ComputerSystem.1.0.1.ComputerSystem", 111 | ... 112 | 113 | ... 114 | "SerialNumber": "Kappa", 115 | "Status": { 116 | "Health": "Warning", 117 | "State": "Enabled" 118 | }, 119 | "SystemType": "Physical", 120 | "UUID": "00000000-0000-614B-7070-610000000000" 121 | } 122 | ``` 123 | 124 | A Compute node represents a logical computer system with attributes such as processors, memory, BIOS, power state, firmware version, etc. To find a compute node `GET /redfish/v1/systems` and iterate the "Members" array in the returned JSON. Each member has a link to a compute node. 125 | 126 | Find a compute node by iterating the systems collection at `/redfish/v1/systems/`. 127 | 128 | You can then GET the compute node, PATCH values, or perform Actions. 129 | 130 | ## Find a Chassis 131 | 132 | ```shell 133 | curl https://{host}/redfish/v1/chassis/{item}/ -i --insecure -u username:password -L 134 | ``` 135 | 136 | ```python 137 | import sys 138 | import redfish 139 | 140 | # When running remotely connect using the iLO address, iLO account name, 141 | # and password to send https requests 142 | iLO_host = "https://{iLO}" 143 | login_account = "admin" 144 | login_password = "password" 145 | 146 | ## Create a REDFISH object 147 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 148 | password=login_password, default_prefix='/redfish/v1') 149 | 150 | # Login into the server and create a session 151 | REDFISH_OBJ.login(auth="session") 152 | 153 | # Do a GET on a given path 154 | response = REDFISH_OBJ.get("/redfish/v1/chassis/{item}/", None) 155 | 156 | # Print out the response 157 | sys.stdout.write("%s\n" % response) 158 | 159 | # Logout of the current session 160 | REDFISH_OBJ.logout() 161 | ``` 162 | 163 | > JSON response example: 164 | 165 | ```json 166 | { 167 | "@odata.context": "/redfish/v1/$metadata#Chassis/Members/$entity", 168 | "@odata.id": "/redfish/v1/Chassis/1/", 169 | "@odata.type": "#Chassis.1.0.0.Chassis", 170 | "ChassisType": "RackMount", 171 | ... 172 | 173 | ... 174 | "Status": { 175 | "Health": "Warning", 176 | "State": "Enabled" 177 | }, 178 | "Thermal": { 179 | "@odata.id": "/redfish/v1/Chassis/1/Thermal/" 180 | } 181 | } 182 | ``` 183 | 184 | A Chassis represents a physical or virtual container of compute resources with attrbutes such as FRU information, power supplies, temperature, etc. To find a chassis `GET /redfish/v1/chassis` and iterate the "Members" array in the returned JSON. Each member has a link to a chassis. 185 | 186 | Find a chassis by iterating the chassis collection at `/redfish/v1/chassis/`. 187 | 188 | You can then GET the chassis, PATCH values, or perform Actions. 189 | 190 | ## Find the iLO 4 Management Processor 191 | 192 | ```shell 193 | curl https://{host}/redfish/v1/managers/{item}/ -i --insecure -u username:password -L 194 | ``` 195 | 196 | ```python 197 | import sys 198 | import redfish 199 | 200 | # When running remotely connect using the iLO address, iLO account name, 201 | # and password to send https requests 202 | iLO_host = "https://{iLO}" 203 | login_account = "admin" 204 | login_password = "password" 205 | 206 | ## Create a REDFISH object 207 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 208 | password=login_password, default_prefix='/redfish/v1') 209 | 210 | # Login into the server and create a session 211 | REDFISH_OBJ.login(auth="session") 212 | 213 | # Do a GET on a given path 214 | response = REDFISH_OBJ.get("/redfish/v1/managers/{item}/", None) 215 | 216 | # Print out the response 217 | sys.stdout.write("%s\n" % response) 218 | 219 | # Logout of the current session 220 | REDFISH_OBJ.logout() 221 | ``` 222 | 223 | > JSON response example: 224 | 225 | ```json 226 | { 227 | "@odata.context": "/redfish/v1/$metadata#Managers/Members/$entity", 228 | "@odata.id": "/redfish/v1/Managers/1/", 229 | "@odata.type": "#Manager.1.0.0.Manager", 230 | ... 231 | 232 | ... 233 | "Status": { 234 | "State": "Enabled" 235 | }, 236 | "UUID": null, 237 | "VirtualMedia": { 238 | "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/" 239 | } 240 | } 241 | ``` 242 | 243 | A Manager represents a management processor (or "BMC") that manages chassis and compute resources. For HPE Servers, the manager is iLO 4. Managers contain attributes such as networking state and configuration, management services, security configuration, etc. To find a manager `GET /redfish/v1/managers` and iterate the "Members" array in the returned JSON. Each member has a link to a chassis. 244 | 245 | Find a manager by iterating the manager collection at `/redfish/v1/managers/`. 246 | 247 | You can then GET the manager, PATCH values, or perform Actions. 248 | 249 | -------------------------------------------------------------------------------- /source/includes/_ilo5_navigating.md: -------------------------------------------------------------------------------- 1 | # Navigating the Data Model 2 | 3 | The Redfish API is designed to be implemented on many different models of servers and other IT infrastructure devices for years to come. These devices may be quite different from one another. For this reason, the Redfish API does not specify the URIs to various resources. For example, a client cannot assume the BIOS version information is always at a particular URI. 4 | 5 | This is more complex for the client, but is necessary to make sure the data model can change to accommodate various future server architectures without requiring specification changes. As an example, if the BIOS version is at `/redfish/v1/Systems/1`, and a client assumed it is always there, the client would then break when the interface is implemented on a different type of architecture with many compute nodes, each with its own BIOS version, or on other vendor implementations. 6 | 7 | ## Redfish 1.6 (iLO 5 1.40 or later) URI Templates 8 | As of Redfish 1.6, a number of resource types have URI template specifications to be compatible with OpenAPI 3.0. Please see the Redfish 1.6 CSDL schema for details on URI templates for specific types. 9 | 10 | A client must still perform GET operations on a Redfish API service in order to discover what resources are available. For instance, just because a Chassis has a template of `/redfish/v1/Chassis/{ChassisId}` means that a client must still GET `/redfish/v1/Chassis` in order to find the valid values of `{ChassisId}`. 11 | 12 | ## Iterating Collections 13 | 14 | ```shell 15 | curl https://{iLO}/redfish/v1/systems/ -i --insecure -u username:password -L 16 | ``` 17 | 18 | ```python 19 | import sys 20 | import redfish 21 | 22 | # When running remotely connect using the iLO address, iLO account name, 23 | # and password to send https requests 24 | iLO_host = "https://{iLO}" 25 | login_account = "admin" 26 | login_password = "password" 27 | 28 | ## Create a REDFISH object 29 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 30 | password=login_password, default_prefix='/redfish/v1') 31 | 32 | # Login into the server and create a session 33 | REDFISH_OBJ.login(auth="session") 34 | 35 | # Do a GET on a given path 36 | response = REDFISH_OBJ.get("/redfish/v1/systems/", None) 37 | 38 | # Print out the response 39 | sys.stdout.write("%s\n" % response) 40 | 41 | # Logout of the current session 42 | REDFISH_OBJ.logout() 43 | ``` 44 | 45 | > JSON response example: 46 | 47 | ```json 48 | { 49 | "@odata.id": "/redfish/v1/systems/", 50 | "@odata.context": "/redfish/v1/$metadata/", 51 | "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", 52 | "Members@odata.count": 1, 53 | "Members": [ 54 | { 55 | "@odata.id": "/redfish/v1/systems/1/" 56 | } 57 | ] 58 | } 59 | ``` 60 | 61 | Many operations will require you to locate the resource you wish to use. Most of these resources are members of "collections" (arrays of similar items). The method to find collections members is consistent for compute nodes, chassis, management processors, and many other resources in the data model. 62 | 63 | ## Find a Compute Node 64 | 65 | ```shell 66 | curl https://{host}/redfish/v1/systems/{item}/ -i --insecure -u username:password -L 67 | ``` 68 | 69 | ```python 70 | import sys 71 | import redfish 72 | 73 | # When running remotely connect using the iLO address, iLO account name, 74 | # and password to send https requests 75 | iLO_host = "https://{iLO}" 76 | login_account = "admin" 77 | login_password = "password" 78 | 79 | ## Create a REDFISH object 80 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 81 | password=login_password, default_prefix='/redfish/v1') 82 | 83 | # Login into the server and create a session 84 | REDFISH_OBJ.login(auth="session") 85 | 86 | # Do a GET on a given path 87 | response = REDFISH_OBJ.get("/redfish/v1/systems/{item}/", None) 88 | 89 | # Print out the response 90 | sys.stdout.write("%s\n" % response) 91 | 92 | # Logout of the current session 93 | REDFISH_OBJ.logout() 94 | ``` 95 | 96 | > JSON response example: 97 | 98 | ```json 99 | { 100 | "@odata.context": "/redfish/v1/$metadata#Systems/Members/$entity", 101 | "@odata.id": "/redfish/v1/Systems/1/", 102 | "@odata.type": "#ComputerSystem.1.0.1.ComputerSystem", 103 | ... 104 | 105 | ... 106 | "SerialNumber": "Kappa", 107 | "Status": { 108 | "Health": "Warning", 109 | "State": "Enabled" 110 | }, 111 | "SystemType": "Physical", 112 | "UUID": "00000000-0000-614B-7070-610000000000" 113 | } 114 | ``` 115 | 116 | A Compute node represents a logical computer system with attributes such as processors, memory, BIOS, power state, firmware version, etc. To find a compute node `GET /redfish/v1/systems` and iterate the "Members" array in the returned JSON. Each member has a link to a compute node. 117 | 118 | Find a compute node by iterating the systems collection at `/redfish/v1/systems/`. 119 | 120 | You can then GET the compute node, PATCH values, or perform Actions. 121 | 122 | ## Find a Chassis 123 | 124 | ```shell 125 | curl https://{host}/redfish/v1/chassis/{item}/ -i --insecure -u username:password -L 126 | ``` 127 | 128 | ```python 129 | import sys 130 | import redfish 131 | 132 | # When running remotely connect using the iLO address, iLO account name, 133 | # and password to send https requests 134 | iLO_host = "https://{iLO}" 135 | login_account = "admin" 136 | login_password = "password" 137 | 138 | ## Create a REDFISH object 139 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 140 | password=login_password, default_prefix='/redfish/v1') 141 | 142 | # Login into the server and create a session 143 | REDFISH_OBJ.login(auth="session") 144 | 145 | # Do a GET on a given path 146 | response = REDFISH_OBJ.get("/redfish/v1/chassis/{item}/", None) 147 | 148 | # Print out the response 149 | sys.stdout.write("%s\n" % response) 150 | 151 | # Logout of the current session 152 | REDFISH_OBJ.logout() 153 | ``` 154 | 155 | > JSON response example: 156 | 157 | ```json 158 | { 159 | "@odata.context": "/redfish/v1/$metadata#Chassis/Members/$entity", 160 | "@odata.id": "/redfish/v1/Chassis/1/", 161 | "@odata.type": "#Chassis.1.0.0.Chassis", 162 | "ChassisType": "RackMount", 163 | ... 164 | 165 | ... 166 | "Status": { 167 | "Health": "Warning", 168 | "State": "Enabled" 169 | }, 170 | "Thermal": { 171 | "@odata.id": "/redfish/v1/Chassis/1/Thermal/" 172 | } 173 | } 174 | ``` 175 | 176 | A Chassis represents a physical or virtual container of compute resources with attributes such as FRU information, power supplies, temperature, etc. To find a chassis `GET /redfish/v1/chassis` and iterate the "Members" array in the returned JSON. Each member has a link to a chassis. 177 | 178 | Find a chassis by iterating the chassis collection at `/redfish/v1/chassis/`. 179 | 180 | You can then GET the chassis, PATCH values, or perform Actions. 181 | 182 | ## Find the iLO 5 Management Processor 183 | 184 | ```shell 185 | curl https://{host}/redfish/v1/managers/{item}/ -i --insecure -u username:password -L 186 | ``` 187 | 188 | ```python 189 | import sys 190 | import redfish 191 | 192 | # When running remotely connect using the iLO address, iLO account name, 193 | # and password to send https requests 194 | iLO_host = "https://{iLO}" 195 | login_account = "admin" 196 | login_password = "password" 197 | 198 | ## Create a REDFISH object 199 | REDFISH_OBJ = redfish.RedfishClient(base_url=iLO_host,username=login_account, \ 200 | password=login_password, default_prefix='/redfish/v1') 201 | 202 | # Login into the server and create a session 203 | REDFISH_OBJ.login(auth="session") 204 | 205 | # Do a GET on a given path 206 | response = REDFISH_OBJ.get("/redfish/v1/managers/{item}/", None) 207 | 208 | # Print out the response 209 | sys.stdout.write("%s\n" % response) 210 | 211 | # Logout of the current session 212 | REDFISH_OBJ.logout() 213 | ``` 214 | 215 | > JSON response example: 216 | 217 | ```json 218 | { 219 | "@odata.context": "/redfish/v1/$metadata#Managers/Members/$entity", 220 | "@odata.id": "/redfish/v1/Managers/1/", 221 | "@odata.type": "#Manager.1.0.0.Manager", 222 | ... 223 | 224 | ... 225 | "Status": { 226 | "State": "Enabled" 227 | }, 228 | "UUID": null, 229 | "VirtualMedia": { 230 | "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/" 231 | } 232 | } 233 | ``` 234 | 235 | A Manager represents a management processor (or "BMC") that manages chassis and compute resources. For HPE Gen10 Servers, the manager is iLO 5. Managers contain attributes such as networking state and configuration, management services, security configuration, etc. To find a manager `GET /redfish/v1/managers` and iterate the "Members" array in the returned JSON. Each member has a link to a chassis. 236 | 237 | Find a manager by iterating the manager collection at `/redfish/v1/managers/`. 238 | 239 | You can then GET the manager, PATCH values, or perform Actions. 240 | 241 | -------------------------------------------------------------------------------- /source/includes/_ilo5_logging.md: -------------------------------------------------------------------------------- 1 | # Logging 2 | 3 | iLO 5 features a logging service that enables you to view logs of different categories. These logs are of three types - Security Logs (SL), Integrated Management Logs (IML) and iLO Event Logs (IEL). All of these logs can be accessed through Redfish. 4 | 5 | ## Security Logs 6 | 7 | The Security Logs provide a record of the security events recorded by the iLO firmware. 8 | Examples of the logged events include changes to the security configuration and security compliance issues. Other logged events include hardware intrusion, maintenance, and denial of service. 9 | The security logs provide a focused view of all recorded security events. 10 | When the security log is full, the new events overwrite the previous event in the log. 11 | 12 | ### Accessing SLs through Redfish 13 | 14 | To access the Redfish SL resource, perform `GET` on `/redfish/v1/Systems/1/LogServices/SL/`. This resource includes a link to the collection of entries `/redfish/v1/Systems/1/LogServices/SL/Entries/` and an action `/redfish/v1/Systems/1/LogServices/SL/Actions/LogService.ClearLog` to clear the SLs. Individual SLs can be accessed by performing `GET` on `/redfish/v1/Systems/1/LogServices/SL/Entries/{@SlId}`. 15 | 16 | ```shell 17 | > curl https://{iLO}/redfish/v1/systems/1/logservices/sl/entries/{SlId} -i --insecure -L 18 | ``` 19 | 20 | ```json 21 | { 22 | "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", 23 | "@odata.etag": "W/\"89680635\"", 24 | "@odata.id": "/redfish/v1/Systems/1/LogServices/SL/Entries/3", 25 | "@odata.type": "#LogEntry.v1_1_0.LogEntry", 26 | "Id": "3", 27 | "Created": "2020-01-08T11:15:41Z", 28 | "EntryType": "Oem", 29 | "Message": "iLO detected 3 unauthorized login attempts.", 30 | "Name": "Security Log", 31 | "Oem": { 32 | "Hpe": { 33 | "@odata.context": "/redfish/v1/$metadata#HpeLogEntry.HpeLogEntry", 34 | "@odata.type": "#HpeLogEntry.v2_3_0.HpeLogEntry", 35 | "Categories": [ 36 | "Security", 37 | "Administration" 38 | ], 39 | "Class": 56, 40 | "ClassDescription": "Denial of Service", 41 | "Code": 2, 42 | "Count": 1, 43 | "EventNumber": 3, 44 | "Severity": "Informational", 45 | "Updated": "2020-01-08T11:15:41Z", 46 | "UserAction": "Not Applicable" 47 | } 48 | }, 49 | "OemRecordFormat": "Hpe-SL", 50 | "Severity": "OK" 51 | } 52 | ``` 53 | 54 | ### Clearing SLs through Redfish Action 55 | 56 | To completely clear all SLs, perform `POST` on `https://{iLOIP}/redfish/v1/systems/1/logservices/sl/Actions/LogService.ClearLog`. 57 | 58 | **NOTE : Cleared SLs will be available in the server AHS logs.** 59 | 60 | ## Integrated Management Log 61 | 62 | The IML provides a record of historical events that have occurred on the server. Events are generated by the system ROM and by services such as the iLO drivers. Logged events include server-specific information such as health and status information, firmware updates, operating system information, and ROM-based POST codes. 63 | Entries in the IML can help you diagnose issues or identify potential issues. Preventative action might help to avoid disruption of service. 64 | When the IML is full, new events overwrite the previous event in the log. 65 | 66 | ### Examples of IML event types 67 | 68 | - Fan actions and status 69 | - Power supply actions and status 70 | - Temperature status and automatic shutdown actions 71 | - Drive failure 72 | - Firmware flash actions 73 | - Smart Storage Energy Pack status 74 | - Network actions and status 75 | 76 | ### Accessing IMLs through Redfish 77 | 78 | To access the Redfish IML resource, perform `GET` on `/redfish/v1/Systems/1/LogServices/IML/`. This resource includes a link to the collection of entries `/redfish/v1/Systems/1/LogServices/IML/Entries/` and an action `LogService.ClearLog` to clear the IMLs. Individual IMLs can be accessed by performing `GET` on `/redfish/v1/Systems/1/LogServices/IML/Entries/{@ImlId}`. 79 | 80 | ```shell 81 | > curl https://{iLO}/redfish/v1/systems/1/logservices/iml/entries/{ImlId} -i --insecure -L 82 | ``` 83 | 84 | ```json 85 | { 86 | "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", 87 | "@odata.etag": "W/\"C18B58CC\"", 88 | "@odata.id": "/redfish/v1/Systems/1/LogServices/IML/Entries/1", 89 | "@odata.type": "#LogEntry.v1_1_0.LogEntry", 90 | "Id": "1", 91 | "Created": "0000-00-00T00:00:00Z", 92 | "EntryType": "Oem", 93 | "Message": "IML Cleared (iLO user: admin)", 94 | "Name": "Integrated Management Log", 95 | "Oem": { 96 | "Hpe": { 97 | "@odata.context": "/redfish/v1/$metadata#HpeLogEntry.HpeLogEntry", 98 | "@odata.type": "#HpeLogEntry.v2_3_0.HpeLogEntry", 99 | "Categories": [ 100 | "Maintenance", 101 | "Administration" 102 | ], 103 | "Class": 33, 104 | "ClassDescription": "Maintenance", 105 | "Code": 1, 106 | "Count": 1, 107 | "EventNumber": 51, 108 | "Severity": "Informational", 109 | "Updated": "0000-00-00T00:00:00Z" 110 | } 111 | }, 112 | "OemRecordFormat": "Hpe-IML", 113 | "Severity": "OK" 114 | } 115 | ``` 116 | 117 | ### Repairing IMLs through Redfish PATCH 118 | 119 | To manually mark an IML event as repaired, perform a `PATCH` on `https://{iLOIP}/redfish/v1/systems/1/logservices/iml/entries/{ImlId}`. This is only supported on events that are of severity `Caution` or `Critical`. 120 | 121 | **NOTE : When events are manually marked as repaired, SNMP or REST alerts are not notified.** 122 | > PATCH /redfish/v1/systems/1/logservices/iml/entries/{ImlId} 123 | 124 | ```json 125 | { 126 | "Oem" : { 127 | "Hpe" : { 128 | "Repaired" : true 129 | } 130 | } 131 | } 132 | ``` 133 | 134 | ### Clearing IMLs through Redfish Action 135 | 136 | To completely clear all IMLs, perform `POST` on `https://{iLOIP}/redfish/v1/systems/1/logservices/iml/Actions/LogService.ClearLog`. 137 | 138 | **NOTE : Cleared IMLs are available in the server AHS logs.** 139 | 140 | ## iLO Event Log 141 | 142 | The iLO Event Log provides a record of significant events recorded by the iLO firmware. 143 | Examples of the logged events include server events such as a server power outage or a server reset. Other logged events include logins, virtual power events, clearing the log, and some configuration changes. 144 | iLO provides secure password encryption, tracking all login attempts and maintaining a record of all login failures. The **Authentication Failure Logging** setting allows you to configure logging criteria for failed authentications. The event log captures the client name for each logged entry to improve auditing capabilities in DHCP environments, and records the account name, computer name, and IP address. 145 | When the event log is full, each new event overwrites the oldest event in the log. 146 | For a list of the errors that might appear in the event log, see the error messages guide for your server. 147 | 148 | ### Accessing IELs through Redfish 149 | 150 | To access the Redfish IEL resource, perform `GET` on `/redfish/v1/Managers/1/LogServices/IEL/`. This resource includes a link to the collection of entries `/redfish/v1/Managers/1/LogServices/IEL/Entries/` and an action `/redfish/v1/Managers/1/LogServices/IEL/Actions/LogService.ClearLog` to clear the IELs. Individual IELs can be accessed by performing `GET` on `/redfish/v1/Managers/1/LogServices/IEL/Entries/{@IelId}`. 151 | 152 | ```shell 153 | > curl https://{iLO}/redfish/v1/managers/1/logservices/iel/entries/{IelId} -i --insecure -L 154 | ``` 155 | 156 | ```json 157 | { 158 | "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", 159 | "@odata.etag": "W/\"C1EEC71D\"", 160 | "@odata.id": "/redfish/v1/Managers/1/LogServices/IEL/Entries/1", 161 | "@odata.type": "#LogEntry.v1_1_0.LogEntry", 162 | "Id": "1", 163 | "Created": "2022-02-25T05:13:01Z", 164 | "EntryType": "Oem", 165 | "Message": "Host REST login: System Administrator", 166 | "Name": "iLO Event Log", 167 | "Oem": { 168 | "Hpe": { 169 | "@odata.context": "/redfish/v1/$metadata#HpeLogEntry.HpeLogEntry", 170 | "@odata.type": "#HpeLogEntry.v2_3_0.HpeLogEntry", 171 | "Categories": [ 172 | "Security", 173 | "Administration" 174 | ], 175 | "Class": 35, 176 | "ClassDescription": "iLO 5", 177 | "Code": 1131, 178 | "Count": 11, 179 | "EventNumber": 256407, 180 | "Severity": "Informational", 181 | "Updated": "2022-02-25T05:13:11Z" 182 | } 183 | }, 184 | "OemRecordFormat": "Hpe-iLOEventLog", 185 | "Severity": "OK" 186 | } 187 | ``` 188 | 189 | ### Clearing IELs through Redfish Action 190 | 191 | To completely clear all IELs, perform `POST` on `https://{iLOIP}/redfish/v1/managers/1/logservices/iel/Actions/LogService.ClearLog`. 192 | 193 | **NOTE : Cleared IELs will still be present in the server AHS logs.** -------------------------------------------------------------------------------- /source/includes/_ilo5_securesystemerase.md: -------------------------------------------------------------------------------- 1 | # Secure Erase 2 | 3 | 6 | 7 | The secure erase process resets iLO and deletes all licenses stored there, resets BIOS settings, and deletes all AHS and warranty data stored on the system. The secure erase process also erases supported non-volatile storage data and deletes any deployment settings profiles. iLO reboots multiple times after the process is initiated. 8 | 9 | 12 | 13 | **NOTE:** Securely erasing the server can take up to a day to complete. 14 | 15 | Secure erase erases supported non-volatile storage data and returns the server to the manufacturing default state. The feature complies with specification NIST SP 800-88 Revision 1, *Guidelines for Media Sanitization*. 16 | For more information about NIST SP 800-88, see https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-88r1.pdf. 17 | Section 2.5 of the specification describes the level of sanitization. The appendix recommends minimum sanitization levels for media. 18 | Secure erase implements the NIST SP 800-88 Revision 1 Sanitization Recommendations for Purging user data and returns the server and supported components to the default state. This feature automates many of the tasks you follow in the *Statement of Volatility* document for a server. 19 | To view what was erased successfully, see [View secure erase report](#view-secure-erase-report). The process can take up to a day to fully erase and reset all user data. When you activate secure erase, iLO 5 does not allow firmware update or reset operations. **DO NOT perform any iLO 5 configuration changes until this process is completed.** 20 | 21 | ## Secure erase access methods 22 | 23 | You can initiate the secure erase process from the following products: 24 | 25 | * iLO 5 2.30 or later 26 | * Intelligent Provisioning 3.30 or later 27 | * The iLO RESTful API 28 | 29 | ## Prerequisites 30 | 31 | * User account must have all iLO 5 permissions, including `SystemRecoveryConfigPriv`. 32 | * iLO Advanced license. 33 | * Set the iLO security setting on the system maintenance switch to the OFF position. 34 | * Disconnect any FCoE, iSCSI, external SAS, and Fibre Channel storage before using secure erase. 35 | * Disable **Server Configuration Lock**. For instructions, see the *UEFI System Utilities User Guide for HPE ProLiant Gen10 Servers and HPE Synergy*. 36 | * Disable **Smart Storage Encryption**. For instructions, see the "Clearing the encryption configuration" section in the *HPE Smart Array SR Secure Encryption Installation and User Guide*. 37 | * For c-Class and Synergy users: Remove HPE OneView or Virtual Connect profiles assigned to the system. 38 | 39 | ## Process flow 40 | 41 | 1. User initiates secure erase. 42 | 2. Upon reboot, BIOS erases configuration, system time, TPM configuration and user data (drives and persistent memory). The system powers off after completion. 43 | 3. iLO 5 then erases key NVRAM and NAND data, and then automatically resets. 44 | 45 | ### Initiating secure erase through Redfish 46 | 47 | To initiate secure erase, perform a `POST` on `/redfish/v1/Systems//Actions/Oem/Hpe/HpeComputerSystemExt.SecureSystemErase/`. 48 | 49 | The payload for this POST includes two properties: 50 | 51 | | Property | Type | Description | 52 | | --- | --- | --- | 53 | | SystemRomAndiLOErase | Boolean | Reset the system BIOS settings and iLO to manufacturing defaults. It also erases the Active Health System (AHS) user data in the NAND. | 54 | | UserDataErase | Boolean | Erase all the user data on the system including TPMs, persistent memory devices, storage controller configurations, RAID settings, and data from the hard drives attached to the system. USB and other removable media will be excluded. | 55 | 56 | **NOTE : Once you initiate this process, it cannot be undone.** 57 | 58 | > POST /redfish/v1/Systems/1/Actions/Oem/Hpe/HpeComputerSystemExt.SecureSystemErase/ 59 | 60 | ```json 61 | { 62 | "SystemROMAndiLOErase" : true , 63 | "UserDataErase": true 64 | } 65 | ``` 66 | 67 | This returns a response indicating that a server system reset is required. 68 | 69 | > returns 70 | 71 | ```json 72 | { 73 | "error": { 74 | "code": "iLO.0.10.ExtendedInfo", 75 | "message": "See @Message.ExtendedInfo for more information.", 76 | "@Message.ExtendedInfo": [ 77 | { 78 | "MessageId": "iLO.2.7.SystemResetRequired" 79 | } 80 | ], 81 | } 82 | } 83 | ``` 84 | 85 | The client must then initiate a server reset using the Reset action in the ComputerSystem resource. 86 | 87 | > POST `/redfish/v1/Systems/{id}/Actions/ComputerSystem.Reset` 88 | 89 | ```json 90 | { 91 | "ResetType": "ForceRestart" 92 | } 93 | ``` 94 | 95 | At this point the UEFI BIOS will begin erasing configuration information. 96 | 97 | ### Monitor status of secure erase 98 | 99 | Once the secure erase is initiated, perform `GET` on `/redfish/v1/Systems/1/`. This resource includes an object `Oem.Hpe` which contains the status value properties for the secure erase previously initiated. This includes the following properties: 100 | 101 | | Property | Type | Description | 102 | | --- | --- | --- | 103 | UserDataEraseStatus | `Status` (Enum) | Reports the overall user data erase status 104 | UserDataEraseComponentStatus.{ComponentName} | `Status` (Enum) | Indicates the erase status of the individual components 105 | ElapsedEraseTimeInMinutes | Integer | Reports the time elapsed since the erase started 106 | EstimatedEraseTimeInMinutes | Integer | Reports the approximate time (in minutes) for the overall erase process 107 | The `Status` enum takes the following values - `Idle`, `Initiated`, `InProgress`, `CompletedWithSuccess`, `CompletedWithErrors`, `Failed`. 108 | 109 | ### View secure erase report 110 | 111 | The client must then initiate a server reset using the Reset action in the ComputerSystem resource. 112 | 113 | To view the secure erase report for each of the individual drives or disks installed, perform `GET` on `/redfish/v1/sytems/1/Oem/Hpe/EraseReport/{reportId}`. 114 | 115 | ```shell 116 | > curl https://{iLO}/redfish/v1/sytems/1/Oem/Hpe/EraseReport/2 -i --insecure -L 117 | ``` 118 | 119 | ```json 120 | { 121 | "ResetType" : "ForceRestart", 122 | "DeviceType" : "NVMeDrive", 123 | "DeviceIdentifier" : "NVMe M.2 Drive Slot 1 Bay 1", 124 | "SerialNumber" : "", 125 | "EraseStatus" : "CompletedWithSuccess", 126 | "EraseType" : "PURGE", 127 | "StartTime" : "2019-05-30T08:40:13Z", 128 | "EndTime" : "2019-05-30T08:40:13Z" 129 | } 130 | ``` 131 | 132 | ## Impacts to the server after secure erase completes 133 | 134 | The server will need to be re-provisioned to be used after this operation. 135 | 136 | * All data on impacted storage drives and persistent memory will be erased and is not recoverable. 137 | * All RAID settings, disk partitions and OS installations will be lost. 138 | 139 | * BIOS and iLO 5 settings will be reset to defaults 140 | * iLO 5 network and other settings will need to be reconfigured. 141 | * iLO 5 Language Pack will be removed and iLO 5 will respond in English only. 142 | * iLO 5 license reverts to "Standard". 143 | * The System Recovery Set will need to be recreated. 144 | * iLO 5 user accounts will be removed and will revert to the default factory Administrator account and password. 145 | * Active Health System, Integrated Management Log, and iLO 5 Event Logs will be cleared. 146 | * BIOS and SmartStorage Redfish API data will be removed and recreated on the next boot. 147 | * Secure Boot will be disabled and any enrolled certificates will be removed (other than the factory installed certificates). 148 | * Boot options and BIOS User Defined Defaults are removed. 149 | * Passwords, pass-phrases and/or encryption keys stored in the TPM or BIOS will be removed. 150 | * Date, time, DST, and time zone will be reset. 151 | * System will boot the most recent BIOS revision flashed. 152 | * Intelligent Provisioning will not boot and will need to be reinstalled. 153 | 154 | ## Troubleshooting 155 | 156 | In some situations the secure erase function may return an HTTP 500 Internal Server Error. 157 | 158 | > HTTP 500 Internal Server Error 159 | 160 | ```json 161 | { 162 | "error": { 163 | "code": "iLO.0.10.ExtendedInfo", 164 | "message": "See @Message.ExtendedInfo for more information.", 165 | "@Message.ExtendedInfo": [ 166 | { 167 | "MessageId": "Base.1.0.InternalError" 168 | } 169 | ], 170 | } 171 | } 172 | 173 | ``` 174 | 175 | In the event of this error: 176 | 177 | 1. Check if the installed BIOS firmware supports secure erase. Note: This feature is supported only on Gen10 servers and above that have been updated with SPP version 2019.03.0 or later. 178 | 2. If the system is already updated with the correct BIOS firmware version, then reboot the server. Once the system booted, execute the secure erase again using POST action URI. 179 | 180 | For more troubleshooting tips and secure erase FAQ, please refer *"Intelligent Provisioning User Guide for HPE ProLiant Gen10 Servers and HPE Synergy"* 181 | https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=sd00001085en_us 182 | -------------------------------------------------------------------------------- /source/includes/_ilo5_gettingstarted.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ## Tips for Using the RESTful API 4 | 5 | The RESTful API for HPE iLO is available on ProLiant Gen10 servers running iLO 5 1.10 or later with the iLO Standard license, although some features in the data might not be available without an Advanced license. 6 | 7 | To access the RESTful API, you need an HTTPS-capable client, such as a web browser with the Postman REST Client plugin extension or cURL (a popular command line HTTP utility). 8 | 9 | ## RESTful Interface Tool and Python Examples 10 | 11 | Although not a requirement, you can use the **RESTful Interface Tool** with the RESTful API. This command line tool provides a level of abstraction and convenience above direct access to the RESTful API. For details see: [http://www.hpe.com/info/restfulapi](http://www.hpe.com/info/restfulapi). 12 | 13 | > ***Python**: See ex1_functionname() in the Python example code. This means look for the specified function name in the python example code.* 14 | 15 | Also, Hewlett Packard Enterprise published example Python code that implements a number of common operations in a RESTful API client. This code can be downloaded at [https://github.com/HewlettPackard/python-ilorest-library](https://github.com/HewlettPackard/python-ilorest-library). In some cases the examples in this document may refer to examples in the Python code with this notation: 16 | 17 | If you prefer not to implement a client in Python, this serves as a good pseudocode implementing the logic required to perform an operation. 18 | 19 | ## Example REST API operation with cURL 20 | 21 | ```shell 22 | > curl https://{iLO}/redfish/v1/ -i --insecure -L 23 | ``` 24 | 25 |
      26 |
        27 |
      • -i returns HTTP response headers
      • 28 |
      • --insecure bypasses TLS/SSL certification verification
      • 29 |
      • -L follows HTTP redirect
      • 30 |
      31 |

      The above command returns JSON like this:

      32 |
      33 | 34 | ```shell 35 | 36 | { 37 | "@odata.context": "/redfish/v1/$metadata#ServiceRoot", 38 | "@odata.etag": "W/\"B869D8CC\"", 39 | "@odata.id": "/redfish/v1/", 40 | "@odata.type": "#ServiceRoot.v1_1_0.ServiceRoot", 41 | "AccountService": { 42 | "@odata.id": "/redfish/v1/AccountService/" 43 | }, 44 | "Chassis": { 45 | "@odata.id": "/redfish/v1/Chassis/" 46 | }, 47 | "EventService": { 48 | "@odata.id": "/redfish/v1/EventService/" 49 | }, 50 | "Id": "v1", 51 | "JsonSchemas": { 52 | "@odata.id": "/redfish/v1/Schemas/" 53 | }, 54 | "Links": { 55 | "Sessions": { 56 | "@odata.id": "/redfish/v1/SessionService/Sessions/" 57 | } 58 | }, 59 | "Managers": { 60 | "@odata.id": "/redfish/v1/Managers/" 61 | }, 62 | "Name": "HPE RESTful Root Service", 63 | "Oem": { 64 | "Hpe": { 65 | "@odata.type": "#HpeiLOServiceExt.v2_0_0.HpeiLOServiceExt", 66 | "Links": { 67 | "ResourceDirectory": { 68 | "@odata.id": "/redfish/v1/ResourceDirectory/" 69 | } 70 | }, 71 | "Manager": [ 72 | { 73 | "DefaultLanguage": "en", 74 | "FQDN": "edited", 75 | "HostName": "ILO", 76 | "Languages": [ 77 | { 78 | "Language": "en", 79 | "TranslationName": "English", 80 | "Version": "1.10" 81 | } 82 | ], 83 | "ManagerFirmwareVersion": "1.10", 84 | "ManagerType": "iLO 5" 85 | } 86 | ], 87 | "Moniker": { 88 | "ADVLIC": "iLO Advanced", 89 | "BMC": "iLO", 90 | "BSYS": "BladeSystem", 91 | "CLASS": "Baseboard Management Controller", 92 | "IPROV": "Intelligent Provisioning", 93 | "PRODABR": "iLO", 94 | "PRODFAM": "Integrated Lights-Out", 95 | "PRODGEN": "iLO 5", 96 | "PRODNAM": "Integrated Lights-Out 5", 97 | "PRODTAG": "HPE iLO 5", 98 | "STDLIC": "iLO Standard", 99 | "SUMGR": "Smart Update Manager", 100 | "SYSFAM": "ProLiant", 101 | "VENDABR": "HPE", 102 | "VENDNAM": "Hewlett Packard Enterprise", 103 | "WWW": "www.hpe.com", 104 | "WWWAHSV": "www.hpe.com/servers/ahsv", 105 | "WWWBMC": "www.hpe.com/info/ilo", 106 | "WWWDOC": "www.hpe.com/support/ilo-docs", 107 | "WWWERS": "www.hpe.com/services/getconnected", 108 | "WWWGLIS": "reserved for liconf URI", 109 | "WWWIOL": "www.hpe.com/info/insightonline", 110 | "WWWLIC": "www.hpe.com/info/ilo/licensing", 111 | "WWWPASS": "www.hpe.com/support/hpesc", 112 | "WWWPRV": "www.hpe.com/info/privacy", 113 | "WWWSUP": "www.hpe.com/support/ilo5", 114 | "WWWSWLIC": "www.hpe.com/software/SWLicensing" 115 | }, 116 | "Sessions": { 117 | "CertCommonName": "edited", 118 | "CertificateLoginEnabled": false, 119 | "KerberosEnabled": false, 120 | "LDAPAuthLicenced": true, 121 | "LDAPEnabled": false, 122 | "LocalLoginEnabled": true, 123 | "LoginFailureDelay": 0, 124 | "LoginHint": { 125 | "Hint": "POST to /Sessions to login using the following JSON object:", 126 | "HintPOSTData": { 127 | "Password": "password", 128 | "UserName": "username" 129 | } 130 | }, 131 | "SecurityOverride": false, 132 | "ServerName": "edited" 133 | }, 134 | "Time": "2017-04-03T05:05:01Z" 135 | } 136 | }, 137 | "RedfishVersion": "1.0.0", 138 | "Registries": { 139 | "@odata.id": "/redfish/v1/Registries/" 140 | }, 141 | "SessionService": { 142 | "@odata.id": "/redfish/v1/SessionService/" 143 | }, 144 | "Systems": { 145 | "@odata.id": "/redfish/v1/Systems/" 146 | }, 147 | "UUID": "edited", 148 | "UpdateService": { 149 | "@odata.id": "/redfish/v1/UpdateService/" 150 | } 151 | } 152 | ``` 153 | 154 | Let’s perform our first GET operation using the RESTful API. We will do an HTTP GET on the iLO HTTPS port, typically port 443 (although it could be different if you have previously configured iLO to use another port). Your client should be prepared to handle the HTTPS certificate challenge. The interface is not available over open HTTP (port 80), so you must use HTTPS. 155 | 156 | Our GET operation will be against a resource at `/redfish/v1/` (with a trailing slash): 157 | 158 | It is best to perform this initial GET with a tool like the CURL or the Postman REST Client mentioned above. Later you will want to do this with your own scripting code, but for now it’s useful to see the HTTP header information exchanged using a browser. 159 | 160 | CURL is a command line utility available for many Operating Systems that enables easy access to the RESTful API. CURL is available at [https://curl.se](https://curl.se). Note that all the CURL examples will use a flag –insecure. This causes CURL to bypass validation of the HTTPS certificate. In real use iLO should be configured to use a user-supplied certificate and this option is not necessary. Notice also that we use the –L option to force CURL to follow HTTP redirect responses. If iLO changes URI locations for various items, it can indicate to the client where the new location is and automatically follow the new link. 161 | 162 | In JSON, there is no strong ordering of property names, so iLO may return JSON properties in any order. Likewise, iLO cannot assume the order of properties in any submitted JSON. This is why the best scripting data structure for a RESTful client is a dictionary: a simple set of unordered key/value pairs. This lack of ordering is also the reason you see embedded structure within objects (objects within objects). This allows us to keep related data together that is more logically organized, aesthetically pleasing to view, and helps avoid property name conflicts or ridiculously long property names. It also allows us to use identical blocks of JSON in many places in the data model, like status. 163 | 164 | 165 | ## HTTP Resource Operations 166 | 167 | Operation | HTTP Command | Description 168 | -------------- | -------------- | -------------- 169 | Create | POST resource URI (payload = resource data) | Creates a new resource or invokes a custom action. A synchronous POST returns the newly created resource. 170 | Read | GET resource URI | Returns the requested resource representation. 171 | Update | PATCH or PUT resource URI (payload = update data) | Updates an existing resource. You can only PATCH properties that are marked readonly = false in the schema. 172 | Delete | DELETE resource URI | Deletes the specified resource. 173 | 174 | ## HTTP Status Return Codes 175 | 176 | Return Status | Description 177 | -------------- | -------------- | -------------- 178 | 2xx | Successful operation. 179 | 308 | The resource has moved 180 | 4xx | Client-side error with message returned 181 | 5xx | iLO error with error message returned 182 | 183 | 186 | 187 | 188 | --------------------------------------------------------------------------------