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,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-web03",
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
- }
@@ -1,15 +0,0 @@
1
- {
2
- "type": "ServerProfileListV4",
3
- "members": [
4
- ],
5
- "total": 0,
6
- "start": 0,
7
- "prevPageUri": null,
8
- "nextPageUri": null,
9
- "count": 0,
10
- "category": "server-profiles",
11
- "created": "20150810T223058.112Z",
12
- "eTag": "20150810T223058.112Z",
13
- "modified": "20150810T223058.112Z",
14
- "uri": "/rest/server-profiles?filter=name%20matches%20'FAKENAME'&sort=name:asc"
15
- }
@@ -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=serialNumber%20matches%20'VCGE9KB041'&sort=name:asc"
133
- }
@@ -1,206 +0,0 @@
1
- {
2
- "type": "ServerProfileListV4",
3
- "members": [
4
- {
5
- "type": "ServerProfileV4",
6
- "uri": "/rest/server-profiles/1c5e807d-acbe-4ee8-868b-2fb0b6504476",
7
- "name": "chef-web01",
8
- "description": "Web server machine template",
9
- "serialNumber": "VCGE9KB042",
10
- "uuid": "1c5e807d-acbe-4ee8-868b-2fb0b6504476",
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
- "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": "6E:D2:84:B0:08:9D",
86
- "wwnn": "10:00:fa:a9:af:e0:04:4d",
87
- "wwpn": "10:00:fa:a9:af:e0:04:4c",
88
- "requestedMbps": "4000",
89
- "allocatedMbps": 4000,
90
- "maximumMbps": 4000,
91
- "boot": {
92
- "priority": "Primary",
93
- "targets": [
94
- {
95
- "arrayWwpn": "20540002AC00159E",
96
- "lun": "0"
97
- }
98
- ]
99
- }
100
- },
101
- {
102
- "id": 4,
103
- "name": "san2",
104
- "functionType": "FibreChannel",
105
- "deploymentStatus": "Deployed",
106
- "networkUri": "/rest/fc-networks/93c97ad9-3e6d-4cc4-8b37-3ef3a6a9cf77",
107
- "portId": "Flb 1:2-b",
108
- "interconnectUri": "/rest/interconnects/964c1236-4eca-4410-b219-911e6ae0b731",
109
- "macType": "Virtual",
110
- "wwpnType": "Virtual",
111
- "mac": "6E:D2:84:B0:08:9E",
112
- "wwnn": "10:00:fa:a9:af:e0:04:4f",
113
- "wwpn": "10:00:fa:a9:af:e0:04:4e",
114
- "requestedMbps": "4000",
115
- "allocatedMbps": 4000,
116
- "maximumMbps": 4000,
117
- "boot": {
118
- "priority": "Secondary",
119
- "targets": [
120
- {
121
- "arrayWwpn": "21210002AC00159E",
122
- "lun": "0"
123
- }
124
- ]
125
- }
126
- }
127
- ],
128
- "bootMode": null,
129
- "boot": {
130
- "manageBoot": true,
131
- "order": [
132
- "HardDisk",
133
- "PXE",
134
- "CD",
135
- "Floppy",
136
- "USB"
137
- ]
138
- },
139
- "bios": {
140
- "manageBios": true,
141
- "overriddenSettings": [
142
- {
143
- "id": "158",
144
- "value": "2"
145
- },
146
- {
147
- "id": "181",
148
- "value": "1"
149
- },
150
- {
151
- "id": "176",
152
- "value": "1"
153
- }
154
- ]
155
- },
156
- "localStorage": {
157
- "logicalDrives": [],
158
- "manageLocalStorage": false,
159
- "initialize": false
160
- },
161
- "sanStorage": {
162
- "volumeAttachments": [
163
- {
164
- "storagePaths": [
165
- {
166
- "storageTargets": ["20:54:00:02:AC:00:15:9E"],
167
- "storageTargetType": "Auto",
168
- "connectionId": 3,
169
- "isEnabled": true,
170
- "status": "OK"
171
- },
172
- {
173
- "storageTargets": ["21:21:00:02:AC:00:15:9E"],
174
- "storageTargetType": "Auto",
175
- "connectionId": 4,
176
- "isEnabled": true,
177
- "status": "OK"
178
- }
179
- ],
180
- "state": "Attached",
181
- "volumeStoragePoolUri": "/rest/storage-pools/707E383B-56F6-48A1-BFF1-782BB2AC6BA7",
182
- "volumeStorageSystemUri": "/rest/storage-systems/1405534",
183
- "lun": "0",
184
- "lunType": "Manual",
185
- "volumeUri": "/rest/storage-volumes/1B5D3CA2-6C5B-41C2-8B97-1821F1883F22",
186
- "status": "OK",
187
- "id": 1
188
- }
189
- ],
190
- "hostOSType": "RHE Linux (5.x, 6.x)",
191
- "manageSanStorage": true
192
- },
193
- "eTag": "1439179303124/6"
194
- }
195
- ],
196
- "total": 1,
197
- "start": 0,
198
- "prevPageUri": null,
199
- "nextPageUri": null,
200
- "count": 1,
201
- "category": "server-profiles",
202
- "created": "20150810T223058.112Z",
203
- "eTag": "20150810T223058.112Z",
204
- "modified": "20150810T223058.112Z",
205
- "uri": "/rest/server-profiles?filter=serialNumber%20matches%20'VCGE9KB041'&sort=name:asc"
206
- }