Skip to content

Commit

Permalink
Merge pull request #259 from HewlettPackard/5.4_St_pool
Browse files Browse the repository at this point in the history
extended support to storage resources
  • Loading branch information
AsisBagga authored Sep 11, 2020
2 parents a78e172 + 6d18308 commit 617227c
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 39 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
- Server Hardware Types
- Server Profile
- Server Profile Template
- Storage Pool
- Storage Systems
- Storage Volume
- Storage Volume Attachments
- Storage Volume Template
- Tasks
- Uplink Set

Expand Down
42 changes: 21 additions & 21 deletions endpoints-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,26 +208,26 @@
<sub>/rest/server-profiles</sub> | PUT | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
<sub>/rest/server-profiles</sub> | PATCH | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| **Storage Pools** |
|<sub>/rest/storage-pools</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-pools/{id}</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-pools/{id}</sub> | PUT | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-pools</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-pools/{id}</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-pools/{id}</sub> | PUT | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
| **Storage Systems** |
|<sub>/rest/storage-systems</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems/{id}</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems/{id}/reachable-ports</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems</sub> | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: |
|<sub>/rest/storage-systems</sub> | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
<sub>/rest/storage-systems/{id}</sub> | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems/{id}/storage-volume-sets</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems/{id}</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems/{id}/reachable-ports</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems</sub> | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems</sub> | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
<sub>/rest/storage-systems/{id}</sub> | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems/{id}/storage-volume-sets</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
| **Storage Volume Attachments** |
|<sub>/rest/storage-volume-attachments</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-attachments/{id}</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-attachments/{id}</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
| **Storage Volume Templates** |
|<sub>/rest/storage-volume-templates</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-templates/{id}</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-templates</sub> | POST | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-templates</sub> | DELETE | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
<sub>/rest/storage-volume-templates/{id}</sub> | PUT | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-templates</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-templates/{id}</sub> | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-templates</sub> | POST | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volume-templates</sub> | DELETE | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
<sub>/rest/storage-volume-templates/{id}</sub> | PUT | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
| **Switch Types** |
|<sub>/rest/switch-types</sub> | GET | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: |
|<sub>/rest/switch-types/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: |
Expand All @@ -243,11 +243,11 @@
|<sub>/rest/uplink-sets/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |
|<sub>/rest/uplink-sets/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |
| **Volumes** |
|<sub>/rest/storage-volumes</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-volumes/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |

## HPE Synergy Image Streamer

Expand Down
4 changes: 2 additions & 2 deletions examples/storage_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func main() {

var (
ClientOV *ov.OVClient
storage_pool = "<storage_pool>"
storage_pool = "<st_pool>"
)

ovc := ClientOV.NewOVClient(
Expand All @@ -19,7 +19,7 @@ func main() {
os.Getenv("ONEVIEW_OV_DOMAIN"),
os.Getenv("ONEVIEW_OV_ENDPOINT"),
false,
1800,
2000,
"*")

//Get storage pool by name to update
Expand Down
2 changes: 1 addition & 1 deletion examples/storage_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
os.Getenv("ONEVIEW_OV_DOMAIN"),
os.Getenv("ONEVIEW_OV_ENDPOINT"),
false,
1800,
2000,
"*")

// Create storage system
Expand Down
11 changes: 8 additions & 3 deletions examples/storage_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,24 @@ func main() {
os.Getenv("ONEVIEW_OV_DOMAIN"),
os.Getenv("ONEVIEW_OV_ENDPOINT"),
false,
1800,
2000,
"*")

// Create storage volume with name <new_volume>
st_pool, _ := ovc.GetStoragePoolByName("CPG-SSD")
properties := &ov.Properties{
Name: new_volume,
Storagepool: utils.NewNstring("/rest/storage-pools/7D2A17CD-414A-45EF-B221-ABF1006D6F44"),
Storagepool: st_pool.URI,
Size: 268435456,
ProvisioningType: "Thin",
DataProtectionLevel: "NetworkRaid10Mirror2Way",
}
trueVal := true
storageVolume := ov.StorageVolume{TemplateURI: utils.NewNstring("/rest/storage-volume-templates/798f3224-8f8d-43b1-a02f-abf100736549"), Properties: properties, IsPermanent: &trueVal}
vol_template, err := ovc.GetStorageVolumeTemplateByName("template1")
if err != nil {
fmt.Println(err)
}
storageVolume := ov.StorageVolume{TemplateURI: vol_template.URI, Properties: properties, IsPermanent: &trueVal}

err := ovc.CreateStorageVolume(storageVolume)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions examples/storage_volume_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func main() {

var (
ClientOV *ov.OVClient
name_to_get = "<volume attachment name>"
name_to_get = "<vol_attachment_name>"
)

ovc := ClientOV.NewOVClient(
Expand All @@ -20,7 +20,7 @@ func main() {
os.Getenv("ONEVIEW_OV_DOMAIN"),
os.Getenv("ONEVIEW_OV_ENDPOINT"),
false,
1800,
2000,
"*")

// Get All the attachments present
Expand Down
Loading

0 comments on commit 617227c

Please sign in to comment.