From ff89ec512d19e540a3136d7bf2cb4f16ae17d1fe Mon Sep 17 00:00:00 2001 From: Tomasz Mieszkowski Date: Tue, 6 Sep 2016 16:00:41 +0200 Subject: [PATCH] Add support for iLO4. --- CHANGELOG.md | 6 ++++ bindata.go | 6 ++-- bundled_scripts/ilo.py | 80 +++++++++++++++++++++++++----------------- 3 files changed, 56 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7682d7..68b5d0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 0.3.0 + +Released on (TBA) + +* Add support for iLO4. + ## 0.2.0 Released on July 28, 2016. diff --git a/bindata.go b/bindata.go index c1a57bb..ca67f0a 100644 --- a/bindata.go +++ b/bindata.go @@ -86,7 +86,7 @@ func idracPy() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "idrac.py", size: 13980, mode: os.FileMode(420), modTime: time.Unix(1469457747, 0)} + info := bindataFileInfo{name: "idrac.py", size: 13980, mode: os.FileMode(420), modTime: time.Unix(1469690552, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -111,7 +111,7 @@ func idracToml() (*asset, error) { return a, nil } -var _iloPy = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xcc\x19\xfb\x6f\x9b\x48\xfa\x77\xfe\x8a\x59\xaa\x13\xa0\x4b\x5d\xc7\x49\x7b\x6d\x4e\x39\xc9\xeb\x90\x5b\xeb\x62\x27\x8a\xbd\xf7\x90\x65\x21\x0c\xe3\x98\x2d\x0c\x1c\x03\x49\xbd\xa7\xfc\xef\xf7\x7d\x33\x3c\x06\x03\x89\xb3\xba\x6a\x8f\xaa\x2d\xcc\x7c\xef\xf7\x8c\xdf\xfd\xf0\x21\xe7\xe9\x87\x4d\xc0\x3e\x50\xf6\x48\x92\x7d\xb6\x8b\x99\xa6\x05\x51\x12\xa7\x19\xf9\x85\xc3\x47\xf1\x1e\xf3\xf2\x8d\xef\xb9\xb6\x4d\xe3\x88\x78\x71\xb2\x27\xc5\xa2\x4f\x69\x82\xdf\x15\xee\x2e\x09\xc2\x58\xd3\xb4\xd9\x78\xe2\xdc\xdd\xdb\xd7\xd3\x7f\x3a\x3f\xde\x8c\x27\x7f\xbb\x99\x2e\x96\xe4\x92\xac\x34\x02\x8f\xf1\x71\x08\x7f\xce\x8d\x13\x62\x9c\x9d\x7d\x1c\x7e\xba\xc6\xb7\xe1\xf0\xcb\xe7\x3f\x7d\x92\x6f\xf8\x54\x6f\x13\x7c\x1b\x0d\xcf\x4f\x3f\x9e\xe1\xdb\xe9\xf9\x97\xd3\x11\xec\x4a\x4a\xc3\xd1\xb0\xa0\x74\x6d\x5f\xc3\x23\x20\xc6\xd7\x5f\x46\x12\x7f\x34\xfc\x2c\xdf\xae\xec\xf1\xd5\x68\x22\xe1\xc6\x57\xe7\x57\x80\xbf\xd6\xb4\x2b\xfb\xef\xd3\x89\xed\x4c\xe7\xd7\xb7\xce\xd2\x9e\xdd\xdd\x8c\x97\x36\x48\xf9\x1f\x41\xfb\x1d\xd9\x06\x9b\x94\x3a\xde\xce\x65\x8c\x86\x8e\xe7\xa6\x3e\x3f\x21\x7e\xc0\xbf\xc2\x7f\xdb\x20\x8d\x9e\x5c\xd8\x7e\xa4\x29\x0f\x62\x46\x5c\xe6\x93\x4d\x10\xf3\x7a\x21\xa5\x24\x67\x39\xa7\x7e\x41\xce\x14\xc6\x21\x7e\x4c\x39\x33\x32\x92\xa4\xf1\x63\xe0\x53\xc2\x73\x6f\x47\x02\xb6\x8d\x2d\x01\xa7\x47\xb1\x0f\xdc\x98\x1b\x51\xfd\x82\xe8\xba\x54\x54\xa7\xd9\x8e\xa6\x8c\x66\x1c\x16\x57\xeb\x62\x31\xa2\x51\x9c\xee\xd5\x95\x0e\x91\xd5\x6d\xe0\xe9\x51\xce\xe3\xb4\xb1\x2a\x54\x52\x17\x38\x4d\x03\x17\x64\xc8\xa3\x0d\x4d\x55\x29\x0e\xb5\x56\xf7\x54\xe5\x8b\xf5\x67\xcd\x5e\xfe\x64\xdf\xcf\xed\x65\x97\x79\x6b\x45\x4f\x08\x4f\x28\xf5\x85\x0d\x4b\x16\x8a\xfd\x5e\xb2\x5c\x41\x4b\xb5\x9f\xeb\xa9\x62\x75\x9b\x53\xf0\xc3\x85\x9c\x7d\x65\xf1\x13\x93\x02\xbc\xa2\xe6\xb3\x76\x77\x7f\x3b\xb1\x17\x8b\xdb\xfb\xb6\x3e\x2d\x46\x28\xd6\xeb\xf2\xab\x92\x97\x42\xcd\x63\x46\x0b\x49\xbc\x38\xa5\xbc\x5a\x7a\xd6\x66\xf6\xec\xf6\xfe\x5f\xdf\x87\x7b\xf0\x2b\x6d\x32\x6f\xca\xf3\xac\x69\x5e\xe8\x72\x4e\xa6\x61\x6c\xa7\x69\x9c\x9a\xf6\x37\x8f\x26\x19\xd8\xc7\xba\x10\x08\x09\xec\x42\xee\xfb\x74\x4b\x58\x9c\x46\x6e\x08\x14\x1d\x70\x87\x09\x7f\x0b\x10\x78\x03\x99\xe1\xdf\x41\x9e\x24\x34\x35\xad\x41\x4a\x93\xd0\xf5\xa8\x69\xbc\xc7\xec\xbc\x30\xa4\x34\x29\xcd\xf2\x94\x21\x60\x41\xf0\x81\x66\x0e\x68\xe1\x04\x8c\x67\x2e\x03\xf8\x5d\xcc\xb3\x13\x02\x0a\xa6\x27\x82\xf1\x53\x9c\xfa\x05\x13\xd4\xf6\x52\x96\xa2\x01\x08\x2b\x40\xd1\x32\x97\x12\x27\x8c\x1f\x02\x76\xd9\xc4\xbc\xac\x48\xa8\xec\x65\x2d\x43\xf6\x0e\xf2\xaf\x72\xd0\x4c\xdd\x27\x54\x0c\xea\x00\xca\x54\x44\x49\xc1\xfd\x1d\x59\xee\x28\xf1\xdd\xcc\x25\x3c\x4b\x73\x0f\x28\x51\xb2\x8d\x53\x02\x35\x91\xb8\xbe\x0f\x0e\xe5\x94\x17\x2c\xc0\x3d\xa2\xa8\x4a\x17\x05\x1c\xbc\x43\xb3\x6c\x4f\x98\xcb\xb3\xfd\x49\x41\x8f\x82\x23\x3c\x48\xc8\x70\x2f\xe8\x04\x37\xb7\x67\xc4\x64\x31\xf1\x42\xea\xa6\x58\x90\xb2\x80\x79\xe8\x07\xb2\xa1\xd9\x13\xa5\x8c\x50\x48\x5c\xdf\x07\xe2\xf3\xe9\x84\x63\x5a\x95\x69\xb2\x98\x2c\xa6\x04\x2b\x35\xb7\x06\xd2\x56\x5b\x55\x05\x72\x79\x49\xce\xa4\x1a\xf8\x80\xa9\x53\x30\xbb\xff\x0d\xcc\x39\x14\xab\x34\xe4\xb4\x7b\xff\x54\xee\x97\x26\xc2\x62\xbf\x16\x4b\x28\x72\x04\x81\x46\x4a\xa3\xd5\xf8\xdb\x80\x86\x3e\x82\x46\x03\xb0\xaf\x69\xc8\x6f\x88\x83\xd5\xda\xaa\x81\x50\x65\x89\xcf\x1e\xa8\x59\xf1\x04\x47\x52\x66\x4a\x14\xeb\x84\x8c\xac\x9a\x6e\xa1\x98\xd9\x58\xa8\x19\xae\x82\xf5\xca\xc0\x80\x30\xd6\xa8\xb0\x71\x07\xf6\x30\x2a\x2b\xf5\xc0\x3f\xba\x61\x8e\x08\x3f\x00\x02\x78\xc0\x40\x73\x6e\x68\x18\xb3\x07\x4e\xb2\x98\x44\x0f\x51\x56\x7a\xb7\x41\xe6\x40\xac\x3a\x09\x9a\x29\x52\x72\x22\x7f\x24\xa7\x35\x37\xab\x85\x0b\x6a\x01\xf8\xea\xe2\xd3\x1a\x08\x64\x68\x96\xae\x56\xdb\xe6\x59\x38\x07\xf8\x96\x3d\xdb\x6c\xd5\xe6\x36\xb7\x02\x6b\x25\x8a\xea\x5a\x66\x6e\x1f\x90\xf4\xfb\xc0\x85\xbc\x66\xbe\x09\x0b\x8d\x54\xaa\x00\xd4\x84\x12\x05\xc6\xe4\x55\xe2\x70\x37\x4a\x42\x5a\xa2\x08\x1b\x28\xe9\x01\x75\x6d\xf4\xf1\xec\x8c\xcc\x7e\xfa\x55\x2f\x63\x97\x63\xce\xa0\x21\xb0\x46\x29\x81\x09\xa2\x06\x2c\x33\xf9\x80\x27\x61\x90\x99\x3a\xd1\xad\xd5\x70\xdd\x90\xa8\x21\x49\xdd\x18\x45\x6e\xe3\x27\x8a\x25\xe0\xcb\xf2\x23\x6a\xb1\xe9\x29\x0e\x3d\x42\xe2\x73\x12\x6f\xc9\x39\x11\xb8\x7f\x26\x9f\x49\xb6\x4b\xa9\x0b\x4d\x59\x53\x1c\xea\x75\x2b\x81\x8f\x57\x28\xe2\x55\x8a\x00\x39\x45\x17\x45\x1f\x4f\x4a\x5b\x6b\xd2\x4c\xc1\xa4\x4c\x41\xa1\x5b\xcd\x05\x3f\xd5\xa8\x68\xb7\x38\xab\x01\xbb\x32\x84\xd7\x30\x75\x54\x27\x26\x32\x83\x17\x62\xcf\x3a\x44\x11\xea\x0b\x94\xda\x90\x05\x86\xfd\x8d\x7a\xb9\x28\x5e\x4b\xea\xed\x58\x0c\xd5\x79\x7f\x48\x40\xea\x53\x86\x16\xae\x34\x3c\x59\x83\xa8\x2e\x95\xc3\x91\x2c\xd5\xe2\xf5\xd0\x9f\xd8\xf0\xaa\xe0\x3b\xd6\x9d\xc3\x2f\x9f\xc8\xec\xc7\x86\xfb\x7a\x62\xf0\xd5\x38\x6c\xc6\x22\x7e\x49\x39\xfb\x4a\xa7\xd8\xac\xe9\xc3\xb7\xea\xb7\x83\xc9\xc0\x52\xe1\xc0\x67\xa0\x6b\x65\x7f\xa1\x78\x51\x72\x17\xb8\x61\x1d\x42\x77\x79\x38\xea\xf1\xb0\x94\xab\x74\x0e\x7c\x35\x3b\xb8\xd8\x05\xbf\x74\xb6\xc5\x66\x13\x94\xe7\x90\xf7\x55\x2f\xfc\x77\x1e\x64\x14\xd4\xf7\x62\xf6\x48\x59\x40\x59\x26\x2c\x12\xe7\x29\x50\x83\xfe\xfd\xde\x73\x39\xcc\x8e\x58\x59\x28\x6c\x50\xf2\x44\x09\xc3\x39\x12\xea\x31\x44\xd8\xce\x4d\x00\x1b\xaa\x32\x01\xd3\x67\xe0\xd6\x4d\x90\x0d\x64\x7c\x40\x97\x4d\x70\xbe\xc3\x81\xc0\x41\x99\x44\x98\x54\x5f\x5d\x6d\xbd\xda\xac\x66\x2e\x7c\x74\x38\x16\x39\x38\x44\x29\xe3\xb3\x58\xef\x9c\xb4\xc5\x4e\x6b\x68\x97\xab\xae\xe7\x54\xc3\x81\xb2\xf9\xdc\xd3\xa5\x47\x17\x8d\x06\x09\xda\x64\x65\xa0\x54\x92\xb6\x1a\x22\x42\x15\x5e\xcc\x37\xbf\x50\x2f\x33\x2c\xd1\x00\x17\x7b\x9e\x41\x34\x4d\x41\x0f\xe8\x49\x98\x8c\x46\xbb\x83\x54\x64\x21\x3e\x0a\xa5\x8d\x75\x95\x93\x40\xb9\xdd\x3e\xc0\x71\x30\x9a\xe4\xf4\x58\x39\xee\x4a\xa3\x1d\x2f\x4a\x6d\xe7\xdf\x2a\x4c\x7b\x4a\xc0\xa7\x4f\xc4\x99\x4c\xd1\x2b\xfa\x18\x78\xb4\x7b\x68\x38\x40\x17\x09\x26\xc6\x06\xd9\xb0\x61\x80\x09\x43\x48\xa1\xd7\xa6\x04\x45\x49\x19\x32\xff\x4b\x6b\x43\x76\x61\xb5\x12\x27\xae\x7a\xbf\x98\xbf\xac\xfe\x82\x86\x4f\x35\xb5\xb5\x11\xdb\xb0\xe0\x4b\xb1\x89\xc1\x29\xa1\xba\x67\x93\x5e\x47\x54\x00\xbc\x1a\xfd\x05\x1d\x3c\x89\x7b\x99\xd5\xeb\x81\x86\xb4\xf5\xf8\x86\x3e\xb4\x95\xe9\x58\x4c\xe5\x63\xce\x83\x07\x16\x41\x81\x31\x3a\x69\x75\x78\xa7\x7c\x54\x2f\xa9\x29\xfc\x9a\xb3\xca\x07\x8e\xeb\xee\xd7\x97\x5d\x49\xc3\x17\x87\xf4\xdf\x92\xfe\x90\x68\x3e\x94\x60\x32\xc7\x21\xf8\x15\x77\x7f\x97\xbc\xef\xee\xfa\x47\x0b\xf2\x3d\xb2\xbe\x16\xee\xc6\x85\xc1\xbe\x29\x4d\x67\x98\xb5\x92\xfc\x0d\x08\xb2\x8b\xaa\x18\xbf\x43\x3d\x38\x32\xdf\xd5\x1c\x6e\x23\x77\xe7\x86\x6c\xf7\x20\x82\x1f\x08\x37\x63\x8f\x2e\xd9\x40\x1c\xef\xa1\x41\x87\x81\xbb\x09\xa1\x7f\x6f\xf2\x0c\x7a\xb8\x9b\x19\x1c\x5b\x79\x0f\xb5\x98\xc1\xe9\xf7\xc9\xdd\x63\x6f\x97\x27\xde\x87\x3c\xe0\xbb\xea\xc4\x5b\x8a\x03\xbd\x9e\x67\x42\x75\x37\x60\x00\xd4\x43\xae\x79\x40\x7e\xe4\x03\x79\x34\xe6\xf2\x6c\x3c\xf8\x5d\x4a\xd4\x51\x27\xd2\x0e\x3c\xb5\xb4\xe1\xc9\xf4\xff\xb2\x84\xa9\xd7\x06\xa9\x1b\x70\x5a\x5f\x23\xe9\x3f\x17\x77\x70\x65\x7d\x83\x23\x0e\xe8\x71\x41\xfe\xe0\xeb\x03\x39\x06\x98\xea\x3c\x66\x95\x23\x11\x9e\xff\x3b\xab\x93\x45\xfe\x42\x4e\x7b\xf9\x35\x44\xd5\x97\x22\x32\xf9\x2e\xce\x21\xc0\x37\x54\x06\x1a\x26\x70\xd7\x54\x24\x1c\x4a\xf4\x26\x05\xc8\x8a\xac\x1c\x6d\xab\x81\x76\xb3\x6f\x8c\xb3\x83\x1a\xa7\x31\x1e\x57\xe2\x1f\x5c\x73\x15\xba\x0a\xbd\x23\x97\xb9\x0f\x34\x2d\x3c\xb8\x7d\xaa\xfb\x00\x51\xb6\x31\x29\x9d\x7a\xd3\xac\xac\x54\xaf\xc9\xbc\x95\xf0\xd8\xec\xea\x53\xaf\x1c\x6e\x74\xbc\x59\xd2\x6b\xbb\x35\x7a\x0e\x39\xab\x9b\xd1\xdb\x48\x8e\x7a\x49\x8e\x3a\x82\xa3\x09\x51\x15\xc6\xfa\x46\xae\xdc\x2d\x2c\x86\x2b\xbe\x98\xc6\x84\xf3\x55\x8b\x75\x8d\xf1\x8d\x0e\xd9\x61\xc1\xfa\x44\x60\xb5\xc6\xfe\xb7\x1d\x1b\x8a\xb3\x66\x25\x19\x10\xe8\xfa\xbd\xe1\x10\xac\xd9\xdc\xca\x23\x98\x72\x3f\xd1\xd3\x06\x5b\xfc\x56\x46\x75\xe7\x22\xe8\xd4\x71\x7f\x70\x99\xd9\x9f\xff\x1d\x0a\x75\xb0\x69\xfc\x5a\x70\xc0\xaa\x33\x3d\xe1\x04\x5c\x74\x41\x81\x49\xe6\x12\xf3\x84\xe8\xba\x35\x80\xc3\x61\x90\x98\xbd\xcc\xea\x7b\xee\x37\x71\x6a\x0c\x3c\x82\x51\x2f\x83\xa2\xb7\x96\x96\x2f\xae\x11\x3a\xba\x6f\x23\x91\x15\x1a\x45\x60\x72\xcf\x65\x2f\xde\x52\x6f\x85\xcc\x22\x4b\xf4\xfe\xe2\x38\x8f\xc9\xf4\xae\xbc\x59\xc4\xee\x87\x74\xc9\xce\xe5\x50\xac\x28\x2b\x6f\xf3\xfd\x81\x5e\x25\x3c\x72\x3b\x82\x6a\x9d\xb4\x02\x03\x4d\xfa\x22\xd9\x52\xfc\xb7\x91\xae\xb0\xfa\x49\xd7\x19\x58\xdc\x4f\xbc\x7e\xcf\xaf\xb5\x2b\xc5\x4b\x95\xb3\x23\x15\x8f\x2e\x1b\xc5\xa5\x1a\xde\xe2\xe0\x0f\xa3\x03\x3f\x8f\x12\x6e\x2a\xa8\xd0\x8f\x34\x0d\xec\xe3\x88\xa8\x74\x1c\xd1\x87\x1d\x20\x16\x30\xc7\x31\xea\xcb\x03\x60\x1a\xf3\x01\x65\x8f\x41\x5a\xd6\xcd\xe9\x9d\xb3\xbc\x75\x16\x93\xf1\x5c\x89\x49\xe9\xbe\x16\xec\x6c\x3c\x1f\xff\xd5\x9e\xd9\xf3\xa5\xf3\xf3\xc2\xbe\x77\xe6\xe3\x99\xad\x60\xd5\xde\x79\x15\xf3\x6e\xbc\x58\xfc\xe3\xf6\xfe\x4a\xc1\xce\xd4\x8b\xa5\xfe\xc0\x95\xe5\x5a\xfc\xea\x43\xcc\xd2\xe3\x27\xf5\x2f\x2d\x93\x38\x8a\x72\x16\x78\xa2\x59\x8a\x4d\x18\x7e\x38\xa1\xea\x6d\x23\x1a\x92\x0e\xdc\xf4\x81\x37\x2e\xc2\x20\x67\x07\xf4\x5b\x90\x99\xa7\x96\xf6\xdf\x00\x00\x00\xff\xff\xa2\xf7\x64\xcb\x9f\x1e\x00\x00") +var _iloPy = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xec\x1a\x6b\x6f\xdb\x46\xf2\xbb\x7e\xc5\x56\xf9\x40\x12\xe7\x30\xb2\xec\xe4\x92\x1c\x7c\x80\x2a\xd3\x57\xe1\x2c\xd9\xb0\xd4\x7b\x40\x10\x08\x8a\x5c\x59\x6c\xc8\x25\x8f\xbb\xb4\xa3\x16\xfe\xef\x37\xb3\xcb\xc7\x52\x22\x6d\xb9\x77\x41\x51\xa0\x2c\x9a\x90\xbb\xf3\x7e\xed\xcc\x2a\x6f\xbe\x7b\x97\xf3\xec\xdd\x3a\x64\xef\x28\x7b\x20\xe9\x4e\x6c\x13\xd6\xeb\x85\x71\x9a\x64\x82\xfc\xc4\xe1\xa3\x78\x4f\x78\xf9\xc6\x77\xbc\xb7\xc9\x92\x98\xf8\x49\xba\x23\xc5\x62\x40\x69\x8a\xdf\x15\xee\x36\x0d\xa3\xa4\xd7\xeb\x4d\x47\x63\xf7\xf6\xce\xb9\x9a\xfc\xcb\xfd\xfe\x7a\x34\xfe\xfb\xf5\x64\xbe\x20\x17\x64\xd9\x23\xf0\x18\xef\x07\xf0\xdf\xb9\x71\x42\x8c\xb3\xb3\xf7\x83\x0f\x57\xf8\x36\x18\x7c\xfa\xf8\xe7\x0f\xea\x0d\x9f\xea\x6d\x8c\x6f\xc3\xc1\xf9\xe9\xfb\x33\x7c\x3b\x3d\xff\x74\x3a\x84\x5d\x45\x69\x30\x1c\x14\x94\xae\x9c\x2b\x78\x24\xc4\xe8\xea\xd3\x50\xe1\x0f\x07\x1f\xd5\xdb\xa5\x33\xba\x1c\x8e\x15\xdc\xe8\xf2\xfc\x12\xf0\x57\xbd\xde\xa5\xf3\x8f\xc9\xd8\x71\x27\xb3\xab\x1b\x77\xe1\x4c\x6f\xaf\x47\x0b\x07\xa4\xfc\x45\xd2\x7e\x43\x36\xe1\x3a\xa3\xae\xbf\xf5\x18\xa3\x91\xeb\x7b\x59\xc0\x4f\x48\x10\xf2\x2f\xf0\xd7\x26\xcc\xe2\x47\x0f\xb6\x1f\x68\xc6\xc3\x84\x11\x8f\x05\x64\x1d\x26\xbc\x5e\xc8\x28\xc9\x59\xce\x69\x50\x90\x33\xa5\x71\x48\x90\x50\xce\x0c\x41\xd2\x2c\x79\x08\x03\x4a\x78\xee\x6f\x49\xc8\x36\x89\x25\xe1\xfa\x71\x12\x00\x37\xe6\xc5\xb4\xff\x99\xf4\xfb\x4a\xd1\x3e\x15\x5b\x9a\x31\x2a\x38\x2c\x2e\x57\xc5\x62\x4c\xe3\x24\xdb\xe9\x2b\x2d\x22\xeb\xdb\xc0\xd3\xa7\x9c\x27\x59\x63\x55\xaa\xa4\x2f\x70\x9a\x85\x1e\xc8\x90\xc7\x6b\x9a\xe9\x52\xec\x6b\xad\xef\xe9\xca\x17\xeb\x4f\x3d\x67\xf1\x83\x73\x37\x73\x16\x6d\xe6\xad\x15\x3d\x21\x3c\xa5\x34\x90\x36\x2c\x59\x68\xf6\x7b\xce\x72\x05\x2d\xdd\x7e\x9e\xaf\x8b\xd5\x6e\x4e\xc9\x0f\x17\x72\xf6\x85\x25\x8f\x4c\x09\xf0\x82\x9a\x4f\xbd\xdb\xbb\x9b\xb1\x33\x9f\xdf\xdc\x1d\xea\x73\xc0\x08\xc5\x7a\x59\x7e\x5d\xf2\x52\xa8\x59\xc2\x68\x21\x89\x9f\x64\x94\x57\x4b\x4f\xbd\xa9\x33\xbd\xb9\xfb\xf7\xb7\xe1\x1e\xfe\x4c\x9b\xcc\x9b\xf2\x3c\xf5\x7a\x7e\xe4\x71\x4e\x26\x51\xe2\x64\x59\x92\x99\xce\x57\x9f\xa6\x02\xec\x63\x7d\x96\x08\x29\xec\x42\xee\x07\x74\x43\x58\x92\xc5\x5e\x04\x14\x5d\x70\x87\x09\xff\x17\x20\xf0\x06\x32\xc3\x9f\x76\x9e\xa6\x34\x33\x2d\x3b\xa3\x69\xe4\xf9\xd4\x34\xde\x62\x76\x7e\x36\x94\x34\x19\x15\x79\xc6\x10\xb0\x20\x78\x4f\x85\x0b\x5a\xb8\x21\xe3\xc2\x63\x00\xbf\x4d\xb8\x38\x21\xa0\x60\x76\x22\x19\x3f\x26\x59\x50\x30\x41\x6d\x2f\x54\x29\xb2\x41\x58\x09\x8a\x96\xb9\x50\x38\x51\x72\x1f\xb2\x8b\x26\xe6\x45\x45\x42\x67\xaf\x6a\x19\xb2\x77\x91\x7f\x95\x83\x66\xe6\x3d\xa2\x62\x50\x07\x50\xa6\x22\x4a\x0a\xee\x6f\xc8\x62\x4b\x49\xe0\x09\x8f\x70\x91\xe5\x3e\x50\xa2\x64\x93\x64\x04\x6a\x22\xf1\x82\x00\x1c\xca\x29\x2f\x58\x80\x7b\x64\x51\x55\x2e\x0a\x39\x78\x87\x0a\xb1\x23\xcc\xe3\x62\x77\x52\xd0\xa3\xe0\x08\x1f\x12\x32\xda\x49\x3a\xe1\xf5\xcd\x19\x31\x59\x42\xfc\x88\x7a\x19\x16\x24\x11\x32\x1f\xfd\x40\xd6\x54\x3c\x52\xca\x08\x85\xc4\x0d\x02\x20\x3e\x9b\x8c\xb9\x4c\xab\x70\x3e\x9e\x4f\x0a\x7a\x58\xa9\xb9\x65\xcb\xaf\x4a\x27\xac\xce\x2b\x65\xbe\x8d\xae\x15\x84\x08\x59\x1a\xc0\x73\x88\xfe\x41\xde\xc6\x4a\x29\xda\x02\x7b\x71\x51\x80\xd4\x10\xf8\x80\xcb\x32\x70\x5f\xf0\x15\x98\x0c\xaa\x1d\x1a\x71\xda\x0d\x77\x5a\xed\xa0\xce\x31\x8a\x51\x5a\xbd\x89\xb4\x09\x69\x14\xa0\xf8\xb1\x0d\x4e\x32\x0d\xf5\x0d\xc2\x2e\x57\x56\x13\x10\x6d\xa7\xe8\xb0\x7b\x6a\x56\xcc\x20\x22\x28\x33\x15\x9a\x75\x42\x86\x56\x93\x7e\xa1\xa6\x79\xb0\x58\x33\x5f\x86\xab\xa5\x81\x11\x66\xac\xa4\x09\x6e\xc1\xc0\x06\x9a\xfd\x25\x9c\x07\x2f\xca\x11\xe9\x3b\x65\x37\x03\xbd\xb3\xa6\x51\xc2\xee\x39\x11\x09\x89\xef\x63\x51\x86\xcc\x01\xa9\x16\x31\xf1\x51\x19\xd6\xcc\xbf\x92\x23\xf9\x13\x39\xad\xb9\x5a\xad\xf8\xa0\x2a\xa0\x2c\x3f\x7f\x58\x01\x11\x81\xe6\x6a\x3b\xcb\xdb\x79\xe3\x03\x01\x05\xfc\xcb\xc6\xc0\x3c\x38\x00\xda\xb9\x16\x98\x4b\x03\x78\xa3\x11\x65\xe6\x3f\x03\xa8\x62\xd6\xf6\xa0\x88\xb0\xc0\x84\x05\x45\x96\x46\xed\x01\x79\xae\x05\xe4\x0b\xe1\xf4\x3a\xf9\x1b\x32\xef\x15\xbd\xa5\x01\x96\xdb\x37\x73\xb7\xec\x45\xcd\xa9\x00\xf4\xca\x23\x2b\xb1\xc9\xab\x0a\xc3\xbd\x38\x8d\x68\x89\x22\xfd\xa9\xd5\x11\x38\x00\x86\xef\xcf\xce\xc8\xf4\x87\x9f\xfb\x65\x46\x73\x2c\x2e\xe8\x50\x2c\xe6\xb5\xc6\x98\x37\x21\x13\x26\xb7\x79\x1a\x85\xc2\xec\x93\xbe\xb5\x1c\xac\x1a\x12\x35\x24\xa9\x3b\x08\x59\x04\xf1\x13\xc5\x92\xf0\x65\x9d\x96\x87\x96\xe9\x6b\x01\x7a\x84\xc4\xe7\x24\xd9\x90\x73\x22\x71\xff\x42\x3e\x12\xb1\xcd\xa8\x07\xdd\x8b\x5e\x6a\xfc\x76\x25\xf0\xf1\x0b\x45\xfc\x4a\x11\x20\xa7\xe9\xa2\xe9\xe3\x2b\x69\x6b\x4d\xea\xd2\x87\xb1\x91\x96\xb1\x21\x75\xab\xb9\xe0\xa7\x1e\x19\x87\xbd\x80\xd5\x80\x5d\x1a\xd2\x6b\x32\x32\x34\x27\xa6\xaa\x4a\xcd\xe5\x9e\xb5\x8f\x22\xd5\x97\x28\xb5\x21\x0b\x0c\xe7\x2b\xf5\x73\x59\xe5\x17\xd4\xdf\xb2\x04\x8e\xb1\xdd\x3e\x01\xa5\x4f\x19\x5a\xb8\xd2\xf0\x64\x0d\xa2\xbb\x54\x75\x91\xea\x4c\x93\xaf\xfb\xfe\xc4\xce\xa0\x0a\xbe\x63\xdd\x39\xf8\xf4\x81\x4c\xbf\x6f\xb8\xaf\x23\x06\x5f\x8c\xc3\x66\x2c\xe2\x97\x92\xb3\xe9\xb7\x3a\xa7\xe5\x66\x4d\x1f\xbe\x75\xbf\xed\xb5\x50\x96\x0e\x07\x3e\x03\x5d\x2b\xfb\x4b\xc5\x8b\x63\x65\x8e\x1b\xd6\x3e\x74\x9b\x87\xe3\x0e\x0f\x2b\xb9\x4a\xe7\xc0\x57\xb3\xd5\x91\xbb\xe0\x97\xd6\xfe\xa1\xd9\x2d\xa8\x81\xed\x6d\xd5\x34\xfc\x27\x0f\x05\x05\xf5\xfd\x84\x3d\x50\x16\x52\x26\xa4\x45\x92\x3c\x03\x6a\xd0\xe8\xbc\xf5\x3d\x0e\x4d\x36\x56\x16\x0a\x1b\x94\x3c\x52\xc2\xb0\xe1\x86\x33\x06\x22\x6c\xeb\xa5\x80\x0d\x27\x0d\x01\xd3\x0b\x70\xeb\x3a\x14\xb6\x8a\x0f\x68\x47\x52\x6c\x84\xb1\x73\x72\x51\x26\x19\x26\xd5\x57\x5b\xff\x53\x6d\x56\xcd\x29\x3e\x7d\x98\x1f\x5d\xec\x36\xb5\x39\x43\xae\xb7\x8e\x24\x72\xe7\x60\xba\x51\xab\x9e\xef\x56\x5d\x94\xb6\xf9\xd4\xd6\xbb\x14\xe5\x7f\xb8\x57\xfe\x41\x25\x51\x46\x4b\x25\x6e\x33\x20\x81\x10\x42\x15\xae\xcc\xd7\x3f\x51\x5f\x18\x96\x24\x38\xdf\x71\x01\x21\x35\x01\x65\xa0\xde\x63\x46\x1a\x87\xc7\x61\x45\x16\x82\xa4\xd0\xdc\x58\x55\x89\x09\x94\x0f\xcf\x41\xf0\x1e\x34\x72\x39\x3d\x56\x8e\xdb\xd2\x72\xc7\x8b\x52\x1b\xfb\xd7\x0a\xd3\xde\x06\x75\x89\x38\x55\x79\x7a\x49\x1f\x42\x9f\x76\x77\x44\x1a\xba\xcc\x32\xd9\x0f\xa9\xee\x03\xba\xb4\x28\x82\x3c\x6a\xe0\xb5\xb4\x3e\x9a\x92\x2a\x6e\xfe\x9f\xd6\x86\x14\xc3\x92\x25\x1b\xe9\x7a\xbf\x68\x34\xad\xee\xaa\x86\x4f\xd5\x9e\x1e\x22\x1e\xc2\x82\x2f\xe5\x26\x06\xa7\x82\x6a\x6f\xb4\x3a\x1d\x51\x01\xf0\x6a\x50\x92\x74\xf0\xde\xc2\x17\x56\xa7\x07\x1a\xd2\xd6\x7d\x29\xfa\xd0\xd1\x66\x09\x39\xc3\x8c\x38\x0f\xef\x59\x0c\x55\xc6\x68\xa5\xd5\xd1\x98\xe2\xa3\x7b\x49\xcf\xe3\x97\x9c\x55\x3e\x6b\xe8\x09\xbe\x3c\xef\xca\xae\x16\xf0\xec\x7f\xac\x01\x90\x6d\x01\x14\x63\x32\xc3\x36\xff\x05\x9f\x7f\x93\xe4\x6f\x3f\xff\x8f\x16\xe4\x5b\xa4\x7e\x2d\xdc\xb5\x07\x63\x4b\x53\x9a\xd6\x58\x3b\xc8\xf4\x57\x20\xa8\xf3\x54\xc7\xf8\x0d\x8a\xc2\x91\x49\xaf\x27\xf2\x21\x72\x7b\x82\xa8\x83\x1f\x44\x08\x42\xe9\x66\x3c\xad\x4b\x36\x10\xcc\x3b\x38\xaa\xa3\xd0\x5b\x47\x70\x92\xaf\x73\x01\xa7\xb9\x27\x0c\x8e\x87\x7a\x07\xb5\x84\x45\x3b\xf2\xe8\xed\xf0\x94\x57\x97\x04\xf7\x79\xc8\xb7\xd5\x25\x41\x29\x0e\x9c\xfa\x5c\x48\xd5\xbd\x90\x01\x50\x07\xb9\xe6\x9d\xc2\x03\xb7\xd5\x9d\x02\x57\xd7\x09\xf6\x6f\x52\xa7\x8e\x9e\xb9\xf7\xf0\xf4\xfa\x86\x73\xf7\xef\xa8\x8e\xed\x8f\xb2\x7f\xd4\xb1\x3f\xea\xd8\xaf\xf0\x02\x5e\x4d\x1c\x6f\xf4\x57\x05\xf9\x5e\x18\xeb\x97\x7c\x99\x17\x72\x5a\x5f\x20\xf7\x7f\x64\x3c\x4f\xb1\x7e\x40\x59\x29\xe3\x1c\xe6\x76\x08\x73\x62\xfe\xf2\x64\xd9\x7d\x5b\x35\xb6\xa6\x3e\x66\x58\x65\xa7\x8f\xd7\x76\xad\x21\x6a\x91\xbf\x92\xd3\x4e\xae\x0d\x81\xfb\x0b\x59\x66\xf9\x36\xc9\xa1\x5a\xaf\xa9\xaa\x9a\xe8\xc5\xb6\x3e\x5f\x56\x27\xd2\x6f\x52\x80\xe4\x13\xe5\xc4\x56\xcd\x69\xeb\x5d\x63\x4a\xb3\x6b\x9c\xc6\xd4\x57\x89\x5f\x0c\xe4\xa8\x67\x20\xbb\x65\xa9\x8a\xd4\x3b\xf6\x98\x77\x8f\x97\xd5\x87\xb3\x56\x23\xe9\x71\x84\xae\xc1\xd1\xcd\xda\xd8\x66\x1d\xcc\x66\xaf\x9b\xed\x8a\x0b\x81\x4a\x32\x20\xd0\xf6\xeb\xd9\x3e\x58\x33\x5f\xcb\x39\x59\xbb\x44\xea\xc8\xec\x03\x7e\x4b\xa3\xba\x18\x93\x74\x6a\x2f\xee\x5d\xcd\x77\x47\x6d\x8b\x42\x2d\x6c\x1a\xbf\x7d\xed\xb1\x6a\x0d\xb6\xe5\x60\x55\x24\xb6\xc4\x24\x33\x85\x79\x42\xfa\x7d\xcb\x86\x09\x3e\x4c\xcd\x4e\x66\xf5\xaf\x36\xaf\xe2\xd4\xa8\xe1\x92\x51\x27\x83\xa2\x5c\x94\x96\x2f\xee\x7a\x5a\x0a\x4a\x23\x2c\x35\x1a\x45\x60\x72\xdf\x63\xcf\xfe\xe6\xb2\x91\x32\xe3\x29\xd5\xef\x77\x27\xfc\x2c\x21\x93\xdb\xf2\x4a\x1b\x1b\x13\xa4\x4b\xb6\x1e\x87\xd4\xa3\xac\xfc\x6d\x2a\xb0\xfb\x55\x92\x23\xb7\x23\xa8\xaa\xa8\xc7\xa1\x44\x62\xa0\x49\x9f\x25\x5b\x8a\xff\x3a\xd2\x15\x56\x37\xe9\x3a\x03\x8b\x4b\xa4\x97\x7f\xb5\x52\x57\x58\x8f\xf5\x49\x7f\x90\xc7\xf5\xa6\x59\xb3\xa9\xc1\xeb\x6d\x15\x1f\xb5\xc4\x75\xaa\x19\x6d\x29\x7c\x74\xb9\x29\x6e\x4c\xf1\x8a\x0e\xff\x79\x80\x1d\xe4\x71\xca\x4d\x0d\x15\xaa\x72\xaf\x07\x76\x75\x65\x34\xbb\xae\x6c\x57\x5c\x20\x16\x32\xd7\x35\xea\x9b\x21\x60\x9a\x70\x9b\xb2\x87\x30\x2b\xa5\x9d\xdc\xba\x8b\x1b\x77\x3e\x1e\xcd\xb4\x58\x56\x6e\x3f\x80\x9d\x8e\x66\xa3\xbf\x39\x53\x67\xb6\x70\x7f\x9c\x3b\x77\xee\x6c\x34\x75\x34\xac\xda\xab\x2f\x62\xde\x8e\xe6\xf3\x7f\xde\xdc\x5d\x6a\xd8\x42\xbf\x35\xec\x0e\x78\x75\xae\xc9\xdf\x3e\x89\x59\x46\xca\x49\xfd\x7b\xe3\x38\x89\xe3\x9c\x85\xbe\x3c\x32\xe4\x26\xf4\xb3\x9c\x50\xfd\x2a\x19\x0d\x49\x6d\x2f\xbb\xe7\x8d\x5b\x4e\xc8\x75\x9b\x7e\x0d\x85\x79\x6a\xf5\xfe\x1b\x00\x00\xff\xff\xea\x00\xdd\x31\xa5\x21\x00\x00") func iloPyBytes() ([]byte, error) { return bindataRead( @@ -126,7 +126,7 @@ func iloPy() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "ilo.py", size: 7839, mode: os.FileMode(420), modTime: time.Unix(1469445036, 0)} + info := bindataFileInfo{name: "ilo.py", size: 8613, mode: os.FileMode(420), modTime: time.Unix(1473167631, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/bundled_scripts/ilo.py b/bundled_scripts/ilo.py index 4074809..4fe9eb6 100644 --- a/bundled_scripts/ilo.py +++ b/bundled_scripts/ilo.py @@ -61,25 +61,31 @@ def get_ilo_instance(host, user, password): def _get_ethernets(raw_macs, ilo_version): # The data structure for MAC addresses returned from hpilo is pretty nasty, - # especially for iLO3 (no clear distinction between embedded NICs and - # iSCSI ports). - if ilo_version == 3: - start_idx = 0 - else: - start_idx = 1 + # especially for iLO3 (no clear distinction between embedded NICs and iSCSI + # ports). ethernets = [] - for m in raw_macs: - fields = m.get('fields', []) - for i in range(start_idx, len(fields), 2): - if ( - fields[i]['name'] == 'Port' and - fields[i]['value'] != 'iLO' # belongs to mgmt address - ): - mac = normalize_mac(fields[i + 1]['value']) - if mac[:6] not in MAC_PREFIX_BLACKLIST: - eth = deepcopy(ETHERNET_TEMPLATE) - eth["mac"] = mac - ethernets.append(eth) + if ilo_version in ['iLO2', 'iLO3']: + if ilo_version == 'iLO3': + start_idx = 0 + else: + start_idx = 1 + for m in raw_macs: + fields = m.get('fields', []) + for i in range(start_idx, len(fields), 2): + if ( + fields[i]['name'] == 'Port' and + fields[i]['value'] != 'iLO' # belongs to mgmt address + ): + mac = normalize_mac(fields[i + 1]['value']) + if mac[:6] not in MAC_PREFIX_BLACKLIST: + eth = deepcopy(ETHERNET_TEMPLATE) + eth['mac'] = mac + ethernets.append(eth) + elif ilo_version == 'iLO4': + for m in raw_macs: + eth = deepcopy(ETHERNET_TEMPLATE) + eth['mac'] = normalize_mac(m['MAC']) + ethernets.append(eth) return ethernets @@ -133,7 +139,7 @@ def _prepare_host_data(raw_host_data, ilo_version): "memory": [], "mac_addresses": [], } - if ilo_version == 2: + if ilo_version == 'iLO2': for part in raw_host_data: if part.get('Subject') == 'System Information': host_data['sys_info'].append(part) @@ -157,7 +163,7 @@ def _prepare_host_data(raw_host_data, ilo_version): host_data['mac_addresses'].append(part) break continue - elif ilo_version == 3: + elif ilo_version == 'iLO3': for part in raw_host_data: if part.get('Product Name') is not None: host_data['sys_info'].append(part) @@ -185,8 +191,26 @@ def _prepare_host_data(raw_host_data, ilo_version): host_data['mac_addresses'].append(part) break continue + elif ilo_version == 'iLO4': + for part in raw_host_data: + if part.get('Product Name') is not None: + host_data['sys_info'].append(part) + continue + if part.get('Execution Technology') is not None: + host_data['processors'].append(part) + continue + if ( + part.get('Label') is not None and + part.get('Size') is not None and + part.get('Speed') is not None + ): + host_data['memory'].append(part) + continue + if part.get('MAC') is not None: + host_data['mac_addresses'].append(part) + continue else: - raise IloError("Unknown version of iLO: %d".format(ilo_version)) + raise IloError("Unsupported version of iLO ({}).".format(ilo_version)) if len(host_data['sys_info']) > 1: raise IloError( "There should be only one 'System Information' dict " @@ -195,17 +219,6 @@ def _prepare_host_data(raw_host_data, ilo_version): return host_data -def get_ilo_version(ilo_manager): - fw_version = ilo_manager.get_fw_version() - if fw_version.get('management_processor') == "iLO3": - ilo_version = 3 - elif fw_version.get('management_processor') == "iLO2": - ilo_version = 2 - else: - ilo_version = None - return ilo_version - - def ilo_device_info(ilo_manager, ilo_version): raw_host_data = ilo_manager.get_host_data() host_data = _prepare_host_data(raw_host_data, ilo_version) @@ -232,7 +245,8 @@ def scan(host, user, password): if password == "": raise IloError("No management password has been provided.") ilo_manager = get_ilo_instance(host, user, password) - ilo_version = get_ilo_version(ilo_manager) + fw_version = ilo_manager.get_fw_version() + ilo_version = fw_version.get('management_processor') device_info = ilo_device_info(ilo_manager, ilo_version) print(json.dumps(device_info))