Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support physical server provisioning #578

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

miha-plesko
Copy link
Contributor

@miha-plesko miha-plesko commented Apr 18, 2019

With this commit we implement two things:

  1. Expose necessary API calls so React can populate dropdowns for provisioning dialog (when showing popup to user, see React implementation PR here)
  2. allow React to create Request of type PhysicalServerProvisionRequest via API (when user clicks "Provision" on the popup)

Capture

To fulfil (1) we basically need following API calls:

/api/pxe_servers                            # offer user to pick PXE server
/api/pxe_servers/:id/pxe_images             # offer user to pick image on selected server
/api/pxe_images/:id/customization_templates # offer user to pick template on selected image

And to fulfil (2) we basically need following API call to be accepted:

POST /api/requests
{
    "options" : {
      "request_type" : "provision_physical_server", # maps to PhysicalServerProvisionRequest
      "src_ids": [1],
      "pxe_image_id": 1,
      "configuration_profile_id": 1
  }
}

@miq-bot add_label enhancement
@miq-bot assign @abellotti

With this commit we implement two things:

a) expose necessary API calls so React can populate dropdowns
   for provisioning dialog (when showing popup to user)
b) allow React to create Request of type PhysicalServerProvisionRequest
   via API (when user clicks "Provision" on the popup)

To fulfil (a) we basically need following API calls:

```
/api/pxe_servers                            # offer user to pick PXE server
/api/pxe_servers/:id/pxe_images             # offer user to pick image on selected server
/api/pxe_images/:id/customization_templates # offer user to pick template on selected image
```

And to fulfil (b) we basically need following API call to be accepted:

```
POST /api/requests
{
  "options" : {
    "request_type" : "provision_physical_server", # maps to PhysicalServerProvisionRequest
    "src_ids": [1],
    "pxe_image_id": 1,
    "configuration_profile_id": 1
  }
}
```

Signed-off-by: Miha Pleško <miha.plesko@xlab.si>
@miha-plesko miha-plesko force-pushed the physical-server-provision branch from 3a330b3 to 0256d55 Compare April 18, 2019 08:57
@miq-bot
Copy link
Member

miq-bot commented Apr 18, 2019

Checked commit xlab-si@0256d55 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
8 files checked, 0 offenses detected
Everything looks fine. 👍

@miha-plesko
Copy link
Contributor Author

@abellotti would you perhaps prefer if I split the PR into three smaller PRs? Currently it's kinda big, but I think those API calls belong together. However you prefer

@miha-plesko
Copy link
Contributor Author

Reassigning to Gregg because I'm not sure who else to assign. Related miq-core and miq-automate PRs have been merged.

@miq-bot assign @gtanzillo

@miq-bot miq-bot assigned gtanzillo and unassigned abellotti Apr 30, 2019
Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me 👍 @abellotti, can you give it a quick look?

@gtanzillo gtanzillo requested a review from abellotti April 30, 2019 13:06
@abellotti
Copy link
Member

yep, looks good here too. 👍

@gtanzillo gtanzillo added this to the Sprint 111 Ending May 13, 2019 milestone Apr 30, 2019
@gtanzillo gtanzillo merged commit b723d38 into ManageIQ:master Apr 30, 2019
@miha-plesko miha-plesko deleted the physical-server-provision branch May 6, 2019 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants