HewlettPackard / oneview-sdk-ruby

This project is no longer being developed and has limited support. In the near future this repository will be fully deprecated. Please consider using other OneView projects, such as Golang and Python.
Apache License 2.0
12 stars 16 forks source link

Unable to create a Server Profile with Deployment Plan settings #212

Closed marikrg closed 7 years ago

marikrg commented 7 years ago

Scenario/Intent

I'm not able to create any Server Profile using an existing Deployment Plan. There is no way to get the URI of a Deployment Plan, unless copying it from the GUI.

The GET /rest/os-deployment-plans/{id}, from the OneView API 300, returns two URIs in the response data:

"nativePlanUri": "/rest/oedeploymentplan/c85a5181-8c4c-421c-a018-5b5e69082bce"

and

"uri": "/rest/os-deployment-plans/18d42e6d-f64e-422b-affd-7185603ab9c4"

The nativePlanUri is the same URI from ImageStreamer, and it doesn't work for Server Profile creation. I must pass in the uri, which is the canonical URI.

Follow an example of the Deployment Setting from an existing Server Profile:

    "osDeploymentSettings": {
        "osDeploymentPlanUri": "/rest/os-deployment-plans/18d42e6d-f64e-422b-affd-7185603ab9c4",
        "osVolumeUri": "/rest/deployed-targets/c9bc7b3c-e916-425f-9dad-6c304e1140e1",
        "osCustomAttributes": [
            {
                "name": "hostname",
                "value": "newhostname"
            }
        ]
    }

Thus, the endpoints from the OneView Rest API 300 are really useful and must be implemented as soon as possible.

Environment Details

Steps to Reproduce

Call OneviewSDK::API300::Synergy::OSDeploymentPlan.find_by (or anything similar, not sure about the class name)

Expected Result

Return a list of OS Deployment Plans.

Actual Result

This resource is not implemented yet.

tmiotto commented 7 years ago

Well, it's still missing the ServerProfile#set_os_deployment_plan.