Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Allow a user to update manifest on a CF appliance #27

Closed
bthurber opened this issue Nov 19, 2019 · 7 comments · Fixed by #36
Closed

Allow a user to update manifest on a CF appliance #27

bthurber opened this issue Nov 19, 2019 · 7 comments · Fixed by #36
Assignees

Comments

@bthurber
Copy link

Use case:
As a Migration Analytics user/admin, I would like the ability to update the manifest on my CF appliance through the UI. This will provide the ability to enhance data collection used to generate the needed payload when analyzing my environment. Required support:

  • API: import a new manifest

  • Check to see if a manifest exists and if so save the existing to a new file and import the new manifest

  • UI: provide an import/upload button where a file path can be selected for the new manifest file

@martinpovolny
Copy link
Contributor

Progress:
I am trying to parse the API requirements from this task. The API issue that I asked for on our meeting was not created.

@mturley : You are the one who is going to use this API, aren't you?
For the upload, do you want classical multipart form data handling or will you pass the data as a string in a JSON body of a request?

@agrare
Copy link
Member

agrare commented Dec 12, 2019

The API issue that I asked for on our meeting was not created.

Pretty sure this is that issue @martinpovolny 😉 What requirements are you missing? Maybe I can help fill in any blanks

@martinpovolny
Copy link
Contributor

martinpovolny commented Dec 12, 2019

@agrare : do you have an idea about the name of the endpoint? Something like api/migration_analytics and then an action such as import? Does that work for you, guys?

I remember there was also some talk about downloading the file. Shall I also add that or just the upload/import?

Check to see if a manifest exists and if so save the existing to a new file and import the new manifest

Do you want to keep some history? Such as 10 files back named name.1 name.2 ... name.9 and rotate on upload? Or just keep the latest and the original one (as someone said on a meeting that we had).

Should this be somehow accessible? Or just save it now and figure what's next later?

@agrare
Copy link
Member

agrare commented Dec 12, 2019

do you have an idea about the name of the endpoint? Something like api/migration_analytics and then an action such as import? Does that work for you, guys?

I remember there was also some talk about downloading the file. Shall I also add that or just the upload/import?

If we create a user_manifest or custom_manifest endpoint that we can GET/POST/DELETE that gives us some options but I don't feel strongly about the names of things.

The "custom" manifest just has to be stored at /opt/rh/cfme-migration_analytics/manifest.json if it is uploaded.

Do you want to keep some history?

It would make the API a bit more complicated so unless there is a need we could just keep it simple, @bthurber ?

@mturley
Copy link
Collaborator

mturley commented Dec 12, 2019

@martinpovolny

For the upload, do you want classical multipart form data handling or will you pass the data as a string in a JSON body of a request?

I was thinking JSON body of a request, but either way works for me, whatever is easiest for you. I don't expect the data to be very large, the current default manifest is ~8 KB.

As for keeping history, I'm not sure that's necessary, but we should definitely implement the DELETE method on that endpoint so the user can "restore default manifest" by deleting the custom one. There's no need to remember an original file at this /opt/rh/... path, the app will default to the one stored in the gem if there is no custom file present.

@martinpovolny
Copy link
Contributor

martinpovolny commented Dec 13, 2019

As for keeping history, I'm not sure that's necessary, but we should definitely implement the DELETE method on that endpoint so the user can "restore default manifest" by deleting the custom one. There's no need to remember an original file at this /opt/rh/... path, the app will default to the one stored in the gem if there is no custom file present.

As for the DELETE: the API is not ready to implement a DELETE w/o an ID

(can not do api delete red_hat_migration_analytics would need something like api delete red_hat_migration_analytics/1).

So I'd rather implement the resetting of the manifest using POST.

@mturley
Copy link
Collaborator

mturley commented Dec 13, 2019

I'd rather implement the resetting of the manifest using POST.

Sounds good to me 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants