chef-provisioning-oneview 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +119 -65
  3. data/chef-provisioning-oneview.gemspec +39 -0
  4. data/lib/chef/provisioning/create_machine.rb +43 -46
  5. data/lib/chef/provisioning/customize_machine.rb +50 -48
  6. data/lib/chef/provisioning/helpers.rb +18 -0
  7. data/lib/chef/provisioning/icsp/api_v104.rb +3 -2
  8. data/lib/chef/provisioning/icsp/icsp_helper.rb +288 -0
  9. data/lib/chef/provisioning/icsp/rest.rb +50 -0
  10. data/lib/chef/provisioning/oneview/oneview_helper.rb +53 -0
  11. data/lib/chef/provisioning/oneview/san_storage.rb +69 -69
  12. data/lib/chef/provisioning/oneview_driver.rb +124 -105
  13. data/lib/chef/provisioning/version.rb +1 -1
  14. metadata +23 -61
  15. data/Rakefile +0 -19
  16. data/lib/chef/provisioning/icsp/icsp_api.rb +0 -284
  17. data/lib/chef/provisioning/oneview/oneview_api.rb +0 -186
  18. data/lib/chef/provisioning/oneview/v1.2/api.rb +0 -3
  19. data/lib/chef/provisioning/oneview/v2.0/api.rb +0 -3
  20. data/lib/chef/provisioning/rest.rb +0 -52
  21. data/spec/shared_context.rb +0 -78
  22. data/spec/spec_helper.rb +0 -23
  23. data/spec/support/fake_action_handler.rb +0 -6
  24. data/spec/support/fake_icsp.rb +0 -73
  25. data/spec/support/fake_machine_spec.rb +0 -18
  26. data/spec/support/fake_oneview.rb +0 -148
  27. data/spec/support/fixtures/icsp/v102/error_404.json +0 -14
  28. data/spec/support/fixtures/icsp/v102/login.json +0 -5
  29. data/spec/support/fixtures/icsp/v102/os-deployment-build-plans.json +0 -99
  30. data/spec/support/fixtures/icsp/v102/os-deployment-servers.json +0 -179
  31. data/spec/support/fixtures/icsp/v102/os-deployment-servers_1670001.json +0 -83
  32. data/spec/support/fixtures/icsp/v102/os-deployment-servers_fakesn.json +0 -9
  33. data/spec/support/fixtures/icsp/v102/server_by_sn_VCGE9KB041.json +0 -45
  34. data/spec/support/fixtures/icsp/v102/server_by_sn_empty.json +0 -16
  35. data/spec/support/fixtures/icsp/v102/version.json +0 -4
  36. data/spec/support/fixtures/oneview/v120/error_404.json +0 -14
  37. data/spec/support/fixtures/oneview/v120/login.json +0 -5
  38. data/spec/support/fixtures/oneview/v120/server-hardware.json +0 -1476
  39. data/spec/support/fixtures/oneview/v120/server-hardware_Template-WebServer.json +0 -468
  40. data/spec/support/fixtures/oneview/v120/server-hardware_specific.json +0 -151
  41. data/spec/support/fixtures/oneview/v120/server-profiles.json +0 -369
  42. data/spec/support/fixtures/oneview/v120/server-profiles_invalid_filter.json +0 -14
  43. data/spec/support/fixtures/oneview/v120/server-profiles_name_Template-WebServer.json +0 -133
  44. data/spec/support/fixtures/oneview/v120/server-profiles_name_Template-WebServerWithSAN.json +0 -200
  45. data/spec/support/fixtures/oneview/v120/server-profiles_name_chef-web01.json +0 -133
  46. data/spec/support/fixtures/oneview/v120/server-profiles_name_chef-web03.json +0 -133
  47. data/spec/support/fixtures/oneview/v120/server-profiles_name_empty.json +0 -15
  48. data/spec/support/fixtures/oneview/v120/server-profiles_sn_VCGE9KB041.json +0 -133
  49. data/spec/support/fixtures/oneview/v120/server-profiles_sn_VCGE9KB042.json +0 -206
  50. data/spec/support/fixtures/oneview/v120/server-profiles_sn_empty.json +0 -15
  51. data/spec/support/fixtures/oneview/v120/storage-volumes_1B5D3CA2-6C5B-41C2-8B97-1821F1883F22.json +0 -26
  52. data/spec/support/fixtures/oneview/v120/tasks_fake_active.json +0 -5
  53. data/spec/support/fixtures/oneview/v120/tasks_fake_complete.json +0 -5
  54. data/spec/support/fixtures/oneview/v120/version.json +0 -4
  55. data/spec/support/fixtures/oneview/v200/server-profile-templates_WebServerTemplate.json +0 -109
  56. data/spec/support/fixtures/oneview/v200/server-profile-templates_WebServerTemplateWithSAN.json +0 -144
  57. data/spec/support/fixtures/oneview/v200/server-profile-templates_invalid.json +0 -16
  58. data/spec/support/fixtures/oneview/v200/server-profile-templates_new-profile_WebServerTemplate.json +0 -125
  59. data/spec/support/fixtures/oneview/v200/server-profile-templates_new-profile_WebServerTemplateWithSAN.json +0 -178
  60. data/spec/support/fixtures/oneview/v200/version.json +0 -4
  61. data/spec/unit/create_machine_spec.rb +0 -78
  62. data/spec/unit/destroy_spec.rb +0 -26
  63. data/spec/unit/icsp_nic_teams_spec.rb +0 -38
  64. data/spec/unit/icsp_search_spec.rb +0 -25
  65. data/spec/unit/oneview_driver_spec.rb +0 -79
  66. data/spec/unit/oneview_login_spec.rb +0 -17
  67. data/spec/unit/oneview_power_spec.rb +0 -51
  68. data/spec/unit/oneview_san_spec.rb +0 -86
  69. data/spec/unit/oneview_search_spec.rb +0 -63
  70. data/spec/unit/rest_api_spec.rb +0 -115
@@ -1,14 +0,0 @@
1
- {
2
- "errorCode": "INVALID_FILTER",
3
- "data": {
4
- },
5
- "details": "",
6
- "errorSource": null,
7
- "nestedErrors": [
8
-
9
- ],
10
- "recommendedActions": [
11
- "Verify parameters and try again."
12
- ],
13
- "message": "The specified filter is not valid ([serialNumber matches ''])."
14
- }
@@ -1,133 +0,0 @@
1
- {
2
- "type": "ServerProfileListV4",
3
- "members": [
4
- {
5
- "type": "ServerProfileV4",
6
- "uri": "/rest/server-profiles/a16654c6-d12d-4e42-aa04-8868cf3dc31a",
7
- "name": "Template - Web Server",
8
- "description": "Web server machine template",
9
- "serialNumber": "VCGE9KB035",
10
- "uuid": "a16654c6-d12d-4e42-aa04-8868cf3dc31a",
11
- "serverHardwareUri": null,
12
- "serverHardwareTypeUri": "/rest/server-hardware-types/2947DC35-BE48-4075-A3FD-254A9B42F5BD",
13
- "enclosureGroupUri": "/rest/enclosure-groups/3a11ccdd-b352-4046-a568-a8b0faa6cc39",
14
- "enclosureUri": null,
15
- "enclosureBay": null,
16
- "affinity": "Bay",
17
- "associatedServer": null,
18
- "hideUnusedFlexNics": true,
19
- "firmware": {
20
- "forceInstallFirmware": false,
21
- "manageFirmware": true,
22
- "firmwareBaselineUri": "/rest/firmware-drivers/bp-hp-service-pack-for-proliant-oneview-2014-11-30-05"
23
- },
24
- "macType": "Virtual",
25
- "wwnType": "Virtual",
26
- "serialNumberType": "Virtual",
27
- "category": "server-profiles",
28
- "created": "20150730T115836.727Z",
29
- "modified": "20150807T051446.275Z",
30
- "status": "OK",
31
- "state": "Normal",
32
- "inProgress": false,
33
- "taskUri": "/rest/tasks/26235118-827A-445D-9E5D-F2BBCAC8E9E8",
34
- "connections": [
35
- {
36
- "id": 1,
37
- "name": "Altair PXE 1133",
38
- "functionType": "Ethernet",
39
- "deploymentStatus": "Reserved",
40
- "networkUri": "/rest/ethernet-networks/02b0b5c3-1a0a-4d5f-b5c9-0c7532cb1e5e",
41
- "portId": "Flb 1:1-a",
42
- "interconnectUri": null,
43
- "macType": "Virtual",
44
- "wwpnType": "Virtual",
45
- "mac": "11:11:11:11:00:D8",
46
- "wwnn": null,
47
- "wwpn": null,
48
- "requestedMbps": "2500",
49
- "allocatedMbps": 2500,
50
- "maximumMbps": 10000,
51
- "boot": {
52
- "priority": "Primary"
53
- }
54
- },
55
- {
56
- "id": 2,
57
- "name": "corpnet 10",
58
- "functionType": "Ethernet",
59
- "deploymentStatus": "Reserved",
60
- "networkUri": "/rest/ethernet-networks/7a4698ae-5933-4e2e-8af3-57893c23a2d2",
61
- "portId": "Flb 1:2-a",
62
- "interconnectUri": null,
63
- "macType": "Virtual",
64
- "wwpnType": "Virtual",
65
- "mac": "11:11:11:11:00:D9",
66
- "wwnn": null,
67
- "wwpn": null,
68
- "requestedMbps": "2500",
69
- "allocatedMbps": 2500,
70
- "maximumMbps": 10000,
71
- "boot": {
72
- "priority": "NotBootable"
73
- }
74
- }
75
- ],
76
- "bootMode": null,
77
- "boot": {
78
- "manageBoot": true,
79
- "order": [
80
- "HardDisk",
81
- "PXE",
82
- "CD",
83
- "Floppy",
84
- "USB"
85
- ]
86
- },
87
- "bios": {
88
- "manageBios": true,
89
- "overriddenSettings": [
90
- {
91
- "id": "176",
92
- "value": "1"
93
- },
94
- {
95
- "id": "181",
96
- "value": "1"
97
- },
98
- {
99
- "id": "158",
100
- "value": "2"
101
- }
102
- ]
103
- },
104
- "localStorage": {
105
- "logicalDrives": [
106
- {
107
- "raidLevel": "RAID0",
108
- "bootable": true
109
- }
110
- ],
111
- "manageLocalStorage": true,
112
- "initialize": true
113
- },
114
- "sanStorage": {
115
- "volumeAttachments": [
116
-
117
- ],
118
- "manageSanStorage": false
119
- },
120
- "eTag": "1438924486161/12"
121
- }
122
- ],
123
- "total": 1,
124
- "start": 0,
125
- "prevPageUri": null,
126
- "nextPageUri": null,
127
- "count": 1,
128
- "category": "server-profiles",
129
- "created": "20150810T223058.112Z",
130
- "eTag": "20150810T223058.112Z",
131
- "modified": "20150810T223058.112Z",
132
- "uri": "/rest/server-profiles?filter=name%20matches%20'Template%20-%20Web%20Server'&sort=name:asc"
133
- }
@@ -1,200 +0,0 @@
1
- {
2
- "type": "ServerProfileListV4",
3
- "members": [
4
- {
5
- "type": "ServerProfileV4",
6
- "uri": "/rest/server-profiles/a16654c6-d12d-4e42-aa04-8868cf3dc31b",
7
- "name": "Template - Web Server with SAN",
8
- "description": "Web server machine template with SAN",
9
- "serialNumber": "VCGE9KB035",
10
- "uuid": "a16654c6-d12d-4e42-aa04-8868cf3dc31a",
11
- "serverHardwareUri": null,
12
- "serverHardwareTypeUri": "/rest/server-hardware-types/2947DC35-BE48-4075-A3FD-254A9B42F5BD",
13
- "enclosureGroupUri": "/rest/enclosure-groups/3a11ccdd-b352-4046-a568-a8b0faa6cc39",
14
- "enclosureUri": null,
15
- "enclosureBay": null,
16
- "affinity": "Bay",
17
- "associatedServer": null,
18
- "hideUnusedFlexNics": true,
19
- "firmware": {
20
- "forceInstallFirmware": false,
21
- "manageFirmware": true,
22
- "firmwareBaselineUri": "/rest/firmware-drivers/bp-hp-service-pack-for-proliant-oneview-2014-11-30-05"
23
- },
24
- "macType": "Virtual",
25
- "wwnType": "Virtual",
26
- "serialNumberType": "Virtual",
27
- "category": "server-profiles",
28
- "created": "20150730T115836.727Z",
29
- "modified": "20150807T051446.275Z",
30
- "status": "OK",
31
- "state": "Normal",
32
- "inProgress": false,
33
- "taskUri": "/rest/tasks/26235118-827A-445D-9E5D-F2BBCAC8E9F1",
34
- "connections": [
35
- {
36
- "id": 1,
37
- "name": "Altair PXE 1133",
38
- "functionType": "Ethernet",
39
- "deploymentStatus": "Reserved",
40
- "networkUri": "/rest/ethernet-networks/02b0b5c3-1a0a-4d5f-b5c9-0c7532cb1e5e",
41
- "portId": "Flb 1:1-a",
42
- "interconnectUri": null,
43
- "macType": "Virtual",
44
- "wwpnType": "Virtual",
45
- "mac": "11:11:11:11:00:D8",
46
- "wwnn": null,
47
- "wwpn": null,
48
- "requestedMbps": "2500",
49
- "allocatedMbps": 2500,
50
- "maximumMbps": 10000,
51
- "boot": {
52
- "priority": "Primary"
53
- }
54
- },
55
- {
56
- "id": 2,
57
- "name": "corpnet 10",
58
- "functionType": "Ethernet",
59
- "deploymentStatus": "Reserved",
60
- "networkUri": "/rest/ethernet-networks/7a4698ae-5933-4e2e-8af3-57893c23a2d2",
61
- "portId": "Flb 1:2-a",
62
- "interconnectUri": null,
63
- "macType": "Virtual",
64
- "wwpnType": "Virtual",
65
- "mac": "11:11:11:11:00:D9",
66
- "wwnn": null,
67
- "wwpn": null,
68
- "requestedMbps": "2500",
69
- "allocatedMbps": 2500,
70
- "maximumMbps": 10000,
71
- "boot": {
72
- "priority": "NotBootable"
73
- }
74
- },
75
- {
76
- "id": 3,
77
- "name": "san1",
78
- "functionType": "FibreChannel",
79
- "deploymentStatus": "Deployed",
80
- "networkUri": "/rest/fc-networks/2c04a682-66b4-4a64-8c2d-3095937a8e7e",
81
- "portId": "Flb 1:1-b",
82
- "interconnectUri": "/rest/interconnects/f43ee5ba-a3b5-44c3-a299-4cc9c100debc",
83
- "macType": "Virtual",
84
- "wwpnType": "Virtual",
85
- "mac": "11:11:11:11:00:E1",
86
- "wwnn": "10:00:fa:a9:af:e0:04:5d",
87
- "wwpn": "10:00:fa:a9:af:e0:04:5c",
88
- "requestedMbps": "4000",
89
- "allocatedMbps": 4000,
90
- "maximumMbps": 4000,
91
- "boot": {
92
- "priority": "Primary",
93
- "targets": [{ "arrayWwpn": "20540002AC00159E", "lun": "0" }]
94
- }
95
- },
96
- {
97
- "id": 4,
98
- "name": "san2",
99
- "functionType": "FibreChannel",
100
- "deploymentStatus": "Deployed",
101
- "networkUri": "/rest/fc-networks/93c97ad9-3e6d-4cc4-8b37-3ef3a6a9cf77",
102
- "portId": "Flb 1:2-b",
103
- "interconnectUri": "/rest/interconnects/964c1236-4eca-4410-b219-911e6ae0b731",
104
- "macType": "Virtual",
105
- "wwpnType": "Virtual",
106
- "mac": "11:11:11:11:00:E2",
107
- "wwnn": "10:00:fa:a9:af:e0:04:5f",
108
- "wwpn": "10:00:fa:a9:af:e0:04:5e",
109
- "requestedMbps": "4000",
110
- "allocatedMbps": 4000,
111
- "maximumMbps": 4000,
112
- "boot": {
113
- "priority": "Secondary",
114
- "targets": [{ "arrayWwpn": "21210002AC00159F", "lun": "0" }]
115
- }
116
- }
117
- ],
118
- "bootMode": null,
119
- "boot": {
120
- "manageBoot": true,
121
- "order": [
122
- "HardDisk",
123
- "PXE",
124
- "CD",
125
- "Floppy",
126
- "USB"
127
- ]
128
- },
129
- "bios": {
130
- "manageBios": true,
131
- "overriddenSettings": [
132
- {
133
- "id": "176",
134
- "value": "1"
135
- },
136
- {
137
- "id": "181",
138
- "value": "1"
139
- },
140
- {
141
- "id": "158",
142
- "value": "2"
143
- }
144
- ]
145
- },
146
- "localStorage": {
147
- "manageLocalStorage": false,
148
- "initialize": false,
149
- "logicalDrives": null
150
- },
151
- "sanStorage": {
152
- "volumeAttachments": [
153
- {
154
- "storagePaths": [
155
- {
156
- "storageTargets": [
157
- "21:21:00:02:AC:00:15:9E"
158
- ],
159
- "storageTargetType": "Auto",
160
- "connectionId": 4,
161
- "isEnabled": true,
162
- "status": "OK"
163
- },
164
- {
165
- "storageTargets": [
166
- "20:54:00:02:AC:00:15:9E"
167
- ],
168
- "storageTargetType": "Auto",
169
- "connectionId": 3,
170
- "isEnabled": true,
171
- "status": "OK"
172
- }
173
- ],
174
- "state": "Attached",
175
- "volumeStoragePoolUri": "/rest/storage-pools/707E383B-56F6-48A1-BFF1-782BB2AC6BA7",
176
- "volumeStorageSystemUri": "/rest/storage-systems/1405534",
177
- "lun": "0",
178
- "lunType": "Manual",
179
- "volumeUri": "/rest/storage-volumes/1B5D3CA2-6C5B-41C2-8B97-1821F1883F22",
180
- "status": "OK",
181
- "id": 1
182
- }
183
- ],
184
- "hostOSType": "RHE Linux (5.x, 6.x)",
185
- "manageSanStorage": true
186
- },
187
- "eTag": "1438924486161/12"
188
- }
189
- ],
190
- "total": 1,
191
- "start": 0,
192
- "prevPageUri": null,
193
- "nextPageUri": null,
194
- "count": 1,
195
- "category": "server-profiles",
196
- "created": "20150810T223058.112Z",
197
- "eTag": "20150810T223058.112Z",
198
- "modified": "20150810T223058.112Z",
199
- "uri": "/rest/server-profiles?filter=name%20matches%20'Template%20-%20Web%20Server%20with%20SAN'&sort=name:asc"
200
- }
@@ -1,133 +0,0 @@
1
- {
2
- "type": "ServerProfileListV4",
3
- "members": [
4
- {
5
- "type": "ServerProfileV4",
6
- "uri": "/rest/server-profiles/1c5e807d-acbe-4ee8-868b-2fb0b6504474",
7
- "name": "chef-web01",
8
- "description": "Web server machine template",
9
- "serialNumber": "VCGE9KB041",
10
- "uuid": "1c5e807d-acbe-4ee8-868b-2fb0b6504474",
11
- "serverHardwareUri": "/rest/server-hardware/31363636-3136-584D-5132-333230314D38",
12
- "serverHardwareTypeUri": "/rest/server-hardware-types/2947DC35-BE48-4075-A3FD-254A9B42F5BD",
13
- "enclosureGroupUri": "/rest/enclosure-groups/3a11ccdd-b352-4046-a568-a8b0faa6cc39",
14
- "enclosureUri": "/rest/enclosures/09SGH236PMVW",
15
- "enclosureBay": 2,
16
- "affinity": "Bay",
17
- "associatedServer": null,
18
- "hideUnusedFlexNics": true,
19
- "firmware": {
20
- "forceInstallFirmware": false,
21
- "manageFirmware": true,
22
- "firmwareBaselineUri": "/rest/firmware-drivers/bp-hp-service-pack-for-proliant-oneview-2014-11-30-05"
23
- },
24
- "macType": "Virtual",
25
- "wwnType": "Virtual",
26
- "serialNumberType": "Virtual",
27
- "category": "server-profiles",
28
- "created": "20150810T040139.738Z",
29
- "modified": "20150810T042450.221Z",
30
- "status": "OK",
31
- "state": "Normal",
32
- "inProgress": false,
33
- "taskUri": "/rest/tasks/2A17C3F9-6DBF-40B1-B99E-E8BA40848B40",
34
- "connections": [
35
- {
36
- "id": 1,
37
- "name": "Altair PXE 1133",
38
- "functionType": "Ethernet",
39
- "deploymentStatus": "Deployed",
40
- "networkUri": "/rest/ethernet-networks/02b0b5c3-1a0a-4d5f-b5c9-0c7532cb1e5e",
41
- "portId": "Flb 1:1-a",
42
- "interconnectUri": "/rest/interconnects/34501559-719f-4393-9fb1-a43714037f06",
43
- "macType": "Virtual",
44
- "wwpnType": "Virtual",
45
- "mac": "11:11:11:11:01:14",
46
- "wwnn": null,
47
- "wwpn": null,
48
- "requestedMbps": "2500",
49
- "allocatedMbps": 2500,
50
- "maximumMbps": 10000,
51
- "boot": {
52
- "priority": "Primary"
53
- }
54
- },
55
- {
56
- "id": 2,
57
- "name": "corpnet 10",
58
- "functionType": "Ethernet",
59
- "deploymentStatus": "Deployed",
60
- "networkUri": "/rest/ethernet-networks/7a4698ae-5933-4e2e-8af3-57893c23a2d2",
61
- "portId": "Flb 1:2-a",
62
- "interconnectUri": "/rest/interconnects/d6c76eb3-10e6-43bf-95a6-ec824dc7bb2e",
63
- "macType": "Virtual",
64
- "wwpnType": "Virtual",
65
- "mac": "11:11:11:11:01:15",
66
- "wwnn": null,
67
- "wwpn": null,
68
- "requestedMbps": "2500",
69
- "allocatedMbps": 2500,
70
- "maximumMbps": 10000,
71
- "boot": {
72
- "priority": "NotBootable"
73
- }
74
- }
75
- ],
76
- "bootMode": null,
77
- "boot": {
78
- "manageBoot": true,
79
- "order": [
80
- "HardDisk",
81
- "PXE",
82
- "CD",
83
- "Floppy",
84
- "USB"
85
- ]
86
- },
87
- "bios": {
88
- "manageBios": true,
89
- "overriddenSettings": [
90
- {
91
- "id": "158",
92
- "value": "2"
93
- },
94
- {
95
- "id": "181",
96
- "value": "1"
97
- },
98
- {
99
- "id": "176",
100
- "value": "1"
101
- }
102
- ]
103
- },
104
- "localStorage": {
105
- "logicalDrives": [
106
- {
107
- "raidLevel": "RAID0",
108
- "bootable": true
109
- }
110
- ],
111
- "manageLocalStorage": true,
112
- "initialize": false
113
- },
114
- "sanStorage": {
115
- "volumeAttachments": [
116
-
117
- ],
118
- "manageSanStorage": false
119
- },
120
- "eTag": "1439179303124/6"
121
- }
122
- ],
123
- "total": 1,
124
- "start": 0,
125
- "prevPageUri": null,
126
- "nextPageUri": null,
127
- "count": 1,
128
- "category": "server-profiles",
129
- "created": "20150810T223058.112Z",
130
- "eTag": "20150810T223058.112Z",
131
- "modified": "20150810T223058.112Z",
132
- "uri": "/rest/server-profiles?filter=name%20matches%20'chef-web01'&sort=name:asc"
133
- }