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,15 +0,0 @@
1
- {
2
- "type": "ServerProfileListV4",
3
- "members": [
4
- ],
5
- "total": 0,
6
- "start": 0,
7
- "prevPageUri": null,
8
- "nextPageUri": null,
9
- "count": 1,
10
- "category": "server-profiles",
11
- "created": "20150810T223058.112Z",
12
- "eTag": "20150810T223058.112Z",
13
- "modified": "20150810T223058.112Z",
14
- "uri": "/rest/server-profiles?filter=serialNumber%20matches%20'FAKESN'&sort=name:asc"
15
- }
@@ -1,26 +0,0 @@
1
- {
2
- "type": "StorageVolumeV2",
3
- "deviceType": "FC",
4
- "wwn": "50:00:2A:C0:02:B0:15:9F",
5
- "raidLevel": "RAID5",
6
- "storageSystemUri": "/rest/storage-systems/1405534",
7
- "storagePoolUri": "/rest/storage-pools/707E383B-56F6-48A1-BFF1-782BB2AC6BA7",
8
- "isPermanent": false,
9
- "provisionType": "Thin",
10
- "shareable": false,
11
- "provisionedCapacity": "53687091200",
12
- "deviceVolumeName": "bootVol",
13
- "allocatedCapacity": "671088640",
14
- "revertToSnapshotUri": null,
15
- "refreshState": "NotRefreshing",
16
- "stateReason": "None",
17
- "description": null,
18
- "status": "OK",
19
- "name": "bootVol",
20
- "state": "Normal",
21
- "eTag": "2015-10-16T20:20:06.364Z",
22
- "created": "2015-10-16T20:19:36.526Z",
23
- "modified": null,
24
- "category": "storage-volumes",
25
- "uri": "/rest/storage-volumes/1B5D3CA2-6C5B-41C2-8B97-1821F1883F22"
26
- }
@@ -1,5 +0,0 @@
1
- {
2
- "taskState": "active",
3
- "taskStatus": "active",
4
- "running": "true"
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "taskState": "completed",
3
- "taskStatus": "completed",
4
- "running": "false"
5
- }
@@ -1,4 +0,0 @@
1
- {
2
- "minimumVersion": 1,
3
- "currentVersion": 120
4
- }
@@ -1,109 +0,0 @@
1
- {
2
- "type": "ServerProfileTemplateListV1",
3
- "members": [
4
- {
5
- "type": "ServerProfileTemplateV1",
6
- "uri": "/rest/server-profile-templates/d64da635-f08a-41d4-b6eb-6517206a8bae",
7
- "name": "Web Server Template",
8
- "description": "",
9
- "serverProfileDescription": "web server template",
10
- "serverHardwareTypeUri": "/rest/server-hardware-types/5B42EABE-5140-4E38-91F0-68367B529DE9",
11
- "enclosureGroupUri": "/rest/enclosure-groups/c0f86584-5a82-4480-ad13-8ed6544d6c98",
12
- "affinity": "Bay",
13
- "hideUnusedFlexNics": true,
14
- "macType": "Virtual",
15
- "wwnType": "Virtual",
16
- "serialNumberType": "Virtual",
17
- "firmware": {
18
- "manageFirmware": false,
19
- "firmwareInstallType": null,
20
- "forceInstallFirmware": false,
21
- "firmwareBaselineUri": null
22
- },
23
- "connections": [
24
- {
25
- "id": 7,
26
- "name": "Altair PXE",
27
- "functionType": "Ethernet",
28
- "networkUri": "/rest/ethernet-networks/7984a764-69ae-48c0-aec2-780d4f0366f8",
29
- "portId": "Flb 1:1-a",
30
- "requestedVFs": "Auto",
31
- "requestedMbps": "1000",
32
- "boot": {
33
- "priority": "Primary"
34
- }
35
- },
36
- {
37
- "id": 8,
38
- "name": "Corpnet",
39
- "functionType": "Ethernet",
40
- "networkUri": "/rest/ethernet-networks/52b6f044-f51b-4d4c-8d59-497c14c4681c",
41
- "portId": "Flb 1:1-c",
42
- "requestedVFs": "Auto",
43
- "requestedMbps": "2500",
44
- "boot": {
45
- "priority": "NotBootable"
46
- }
47
- }
48
- ],
49
- "bootMode": null,
50
- "boot": {
51
- "manageBoot": true,
52
- "order": [
53
- "HardDisk",
54
- "PXE",
55
- "CD",
56
- "Floppy",
57
- "USB"
58
- ]
59
- },
60
- "bios": {
61
- "manageBios": false,
62
- "overriddenSettings": [
63
-
64
- ]
65
- },
66
- "localStorage": {
67
- "controllers": [
68
- {
69
- "slotNumber": "0",
70
- "managed": true,
71
- "mode": "RAID",
72
- "initialize": true,
73
- "logicalDrives": [
74
- {
75
- "raidLevel": "RAID1",
76
- "bootable": true,
77
- "driveName": "boot",
78
- "numPhysicalDrives": 2,
79
- "driveTechnology": null
80
- }
81
- ]
82
- }
83
- ]
84
- },
85
- "sanStorage": {
86
- "manageSanStorage": false,
87
- "volumeAttachments": [
88
-
89
- ]
90
- },
91
- "category": "server-profile-templates",
92
- "created": "2015-09-04T17:15:39.249Z",
93
- "modified": "2015-09-04T17:41:44.999Z",
94
- "status": "OK",
95
- "state": null,
96
- "eTag": "1441388504999/3"
97
- }
98
- ],
99
- "nextPageUri": null,
100
- "start": 0,
101
- "prevPageUri": null,
102
- "total": 1,
103
- "count": 1,
104
- "modified": "2015-09-15T23:18:39.561Z",
105
- "eTag": "2015-09-15T23:18:39.561Z",
106
- "created": "2015-09-15T23:18:39.561Z",
107
- "category": "server-profile-templates",
108
- "uri": "/rest/server-profile-templates?filter=%22name%20matches%20'Web%20Server%20Template'%22&sort=name:asc&start=0&count=64"
109
- }
@@ -1,144 +0,0 @@
1
- {
2
- "type": "ServerProfileTemplateListV1",
3
- "members": [
4
- {
5
- "type": "ServerProfileTemplateV1",
6
- "uri": "/rest/server-profile-templates/d64da635-f08a-41d4-b6eb-6517206a8baf",
7
- "name": "Web Server Template with SAN",
8
- "description": "",
9
- "serverProfileDescription": "Web Server Template with SAN",
10
- "serverHardwareTypeUri": "/rest/server-hardware-types/5B42EABE-5140-4E38-91F0-68367B529DE9",
11
- "enclosureGroupUri": "/rest/enclosure-groups/c0f86584-5a82-4480-ad13-8ed6544d6c98",
12
- "affinity": "Bay",
13
- "hideUnusedFlexNics": true,
14
- "macType": "Virtual",
15
- "wwnType": "Virtual",
16
- "serialNumberType": "Virtual",
17
- "firmware": {
18
- "manageFirmware": false,
19
- "firmwareInstallType": null,
20
- "forceInstallFirmware": false,
21
- "firmwareBaselineUri": null
22
- },
23
- "connections": [
24
- {
25
- "id": 7,
26
- "name": "Altair PXE",
27
- "functionType": "Ethernet",
28
- "networkUri": "/rest/ethernet-networks/7984a764-69ae-48c0-aec2-780d4f0366f8",
29
- "portId": "Flb 1:1-a",
30
- "requestedVFs": "Auto",
31
- "requestedMbps": "1000",
32
- "boot": {
33
- "priority": "Primary"
34
- }
35
- },
36
- {
37
- "id": 8,
38
- "name": "Corpnet",
39
- "functionType": "Ethernet",
40
- "networkUri": "/rest/ethernet-networks/52b6f044-f51b-4d4c-8d59-497c14c4681c",
41
- "portId": "Flb 1:1-c",
42
- "requestedVFs": "Auto",
43
- "requestedMbps": "2500",
44
- "boot": {
45
- "priority": "NotBootable"
46
- }
47
- },
48
- {
49
- "id": 9,
50
- "name": "san1",
51
- "functionType": "FibreChannel",
52
- "networkUri": "/rest/fc-networks/2c04a682-66b4-4a64-8c2d-3095937a8e7e",
53
- "portId": "Flb 1:1-b",
54
- "requestedVFs": null,
55
- "requestedMbps": "4000",
56
- "boot": {
57
- "priority": "Primary",
58
- "specifyBootTarget": false
59
- }
60
- },
61
- {
62
- "id": 10,
63
- "name": "san2",
64
- "functionType": "FibreChannel",
65
- "networkUri": "/rest/fc-networks/93c97ad9-3e6d-4cc4-8b37-3ef3a6a9cf77",
66
- "portId": "Flb 1:2-b",
67
- "requestedVFs": null,
68
- "requestedMbps": "4000",
69
- "boot": {
70
- "priority": "Secondary",
71
- "specifyBootTarget": false
72
- }
73
- }
74
- ],
75
- "bootMode": null,
76
- "boot": {
77
- "manageBoot": true,
78
- "order": [
79
- "HardDisk",
80
- "PXE",
81
- "CD",
82
- "Floppy",
83
- "USB"
84
- ]
85
- },
86
- "bios": {
87
- "manageBios": false,
88
- "overriddenSettings": [
89
-
90
- ]
91
- },
92
- "localStorage": {
93
- "controllers": []
94
- },
95
- "sanStorage": {
96
- "manageSanStorage": true,
97
- "hostOSType": "RHE Linux (5.x, 6.x)",
98
- "volumeAttachments": [
99
- {
100
- "id": 1,
101
- "lun": "0",
102
- "lunType": "Manual",
103
- "permanent": false,
104
- "storagePaths": [
105
- {
106
- "connectionId": 9,
107
- "isEnabled": true,
108
- "storageTargetType": "Auto"
109
- },
110
- {
111
- "connectionId": 10,
112
- "isEnabled": true,
113
- "storageTargetType": "Auto"
114
- }
115
- ],
116
- "volumeName": "bootVol",
117
- "volumeDescription": "",
118
- "volumeStoragePoolUri": "/rest/storage-pools/707E383B-56F6-48A1-BFF1-782BB2AC6BA7",
119
- "volumeProvisionedCapacityBytes": "53687091200",
120
- "volumeProvisionType": "Thin",
121
- "volumeShareable": false,
122
- "volumeStorageSystemUri": "/rest/storage-systems/1405534"
123
- }
124
- ]
125
- },
126
- "category": "server-profile-templates",
127
- "created": "2015-09-04T17:15:39.249Z",
128
- "modified": "2015-09-04T17:41:44.999Z",
129
- "status": "OK",
130
- "state": null,
131
- "eTag": "1441388504999/3"
132
- }
133
- ],
134
- "nextPageUri": null,
135
- "start": 0,
136
- "prevPageUri": null,
137
- "total": 1,
138
- "count": 1,
139
- "modified": "2015-09-15T23:18:39.561Z",
140
- "eTag": "2015-09-15T23:18:39.561Z",
141
- "created": "2015-09-15T23:18:39.561Z",
142
- "category": "server-profile-templates",
143
- "uri": "/rest/server-profile-templates?filter=%22name%20matches%20'Web%20Server%20Template%20with%20SAN'%22&sort=name:asc&start=0&count=64"
144
- }
@@ -1,16 +0,0 @@
1
- {
2
- "type": "ServerProfileTemplateListV1",
3
- "members": [
4
-
5
- ],
6
- "nextPageUri": null,
7
- "start": 0,
8
- "prevPageUri": null,
9
- "total": 0,
10
- "count": 0,
11
- "modified": "2015-09-15T23:22:13.939Z",
12
- "eTag": "2015-09-15T23:22:13.939Z",
13
- "created": "2015-09-15T23:22:13.939Z",
14
- "category": "server-profile-templates",
15
- "uri": "/rest/server-profile-templates?filter=%22name%20matches%20'INVALID'%22&sort=name:asc&start=0&count=64"
16
- }
@@ -1,125 +0,0 @@
1
- {
2
- "type": "ServerProfileV5",
3
- "uri": null,
4
- "name": null,
5
- "description": "web server template",
6
- "serialNumber": null,
7
- "uuid": null,
8
- "serverProfileTemplateUri": "/rest/server-profile-templates/d64da635-f08a-41d4-b6eb-6517206a8bae",
9
- "templateCompliance": "Unknown",
10
- "serverHardwareUri": null,
11
- "serverHardwareTypeUri": "/rest/server-hardware-types/5B42EABE-5140-4E38-91F0-68367B529DE9",
12
- "enclosureGroupUri": "/rest/enclosure-groups/c0f86584-5a82-4480-ad13-8ed6544d6c98",
13
- "enclosureUri": null,
14
- "enclosureBay": null,
15
- "affinity": "Bay",
16
- "associatedServer": null,
17
- "hideUnusedFlexNics": true,
18
- "firmware": {
19
- "firmwareInstallType": null,
20
- "forceInstallFirmware": false,
21
- "manageFirmware": false,
22
- "firmwareBaselineUri": null
23
- },
24
- "macType": "Virtual",
25
- "wwnType": "Virtual",
26
- "serialNumberType": "Virtual",
27
- "category": "server-profiles",
28
- "created": null,
29
- "modified": null,
30
- "status": "OK",
31
- "state": "Creating",
32
- "inProgress": false,
33
- "taskUri": null,
34
- "connections": [
35
- {
36
- "id": 7,
37
- "name": "Altair PXE",
38
- "functionType": "Ethernet",
39
- "deploymentStatus": null,
40
- "networkUri": "/rest/ethernet-networks/7984a764-69ae-48c0-aec2-780d4f0366f8",
41
- "portId": "Flb 1:1-a",
42
- "requestedVFs": "Auto",
43
- "allocatedVFs": null,
44
- "interconnectUri": null,
45
- "macType": null,
46
- "wwpnType": null,
47
- "mac": null,
48
- "wwnn": null,
49
- "wwpn": null,
50
- "requestedMbps": "1000",
51
- "allocatedMbps": 0,
52
- "maximumMbps": 0,
53
- "boot": {
54
- "priority": "Primary"
55
- }
56
- },
57
- {
58
- "id": 8,
59
- "name": "Corpnet",
60
- "functionType": "Ethernet",
61
- "deploymentStatus": null,
62
- "networkUri": "/rest/ethernet-networks/52b6f044-f51b-4d4c-8d59-497c14c4681c",
63
- "portId": "Flb 1:1-c",
64
- "requestedVFs": "Auto",
65
- "allocatedVFs": null,
66
- "interconnectUri": null,
67
- "macType": null,
68
- "wwpnType": null,
69
- "mac": null,
70
- "wwnn": null,
71
- "wwpn": null,
72
- "requestedMbps": "2500",
73
- "allocatedMbps": 0,
74
- "maximumMbps": 0,
75
- "boot": {
76
- "priority": "NotBootable"
77
- }
78
- }
79
- ],
80
- "bootMode": null,
81
- "boot": {
82
- "order": [
83
- "HardDisk",
84
- "PXE",
85
- "CD",
86
- "Floppy",
87
- "USB"
88
- ],
89
- "manageBoot": true
90
- },
91
- "bios": {
92
- "overriddenSettings": [
93
-
94
- ],
95
- "manageBios": false
96
- },
97
- "localStorage": {
98
- "controllers": [
99
- {
100
- "slotNumber": "0",
101
- "managed": true,
102
- "mode": "RAID",
103
- "initialize": true,
104
- "importConfiguration": false,
105
- "logicalDrives": [
106
- {
107
- "driveNumber": null,
108
- "raidLevel": "RAID1",
109
- "numPhysicalDrives": 2,
110
- "driveTechnology": null,
111
- "bootable": true,
112
- "driveName": "boot"
113
- }
114
- ]
115
- }
116
- ]
117
- },
118
- "sanStorage": {
119
- "volumeAttachments": [
120
-
121
- ],
122
- "manageSanStorage": false
123
- },
124
- "eTag": null
125
- }