Make a way to change both the vm name and hostname#16
Open
frybin wants to merge 1 commit intoComputerScienceHouse:masterfrom
Open
Make a way to change both the vm name and hostname#16frybin wants to merge 1 commit intoComputerScienceHouse:masterfrom
frybin wants to merge 1 commit intoComputerScienceHouse:masterfrom
Conversation
csssuf
reviewed
Feb 18, 2019
com6056
reviewed
Feb 20, 2019
|
|
||
| @app.route("/starrs/<string:vmid>/hostname/<string:old_name>/<string:new_name>", methods=['POST']) | ||
| @auth.oidc_auth | ||
| def vm_disk(vmid, old_name, new_name): |
Member
There was a problem hiding this comment.
Probably shouldn't be named vm_disk
com6056
reviewed
Feb 20, 2019
| if valid and available: | ||
| vm = VM(vmid) | ||
| vm.rename_vm(new_name) | ||
| change_hostname(starrs, old_name, new_name) |
Member
There was a problem hiding this comment.
Can you also add a function to rename the name of the system in STARRS? Proxstar tracks systems by their system name, so changing everything but that will cause it to no longer be able to match up a STARRS record with a VM.
com6056
reviewed
Feb 20, 2019
| }) | ||
| .then((new_name) => { | ||
| if (new_name) { | ||
| fetch(`/starrs/${vmid}/hostname/${old_name}/${new_name}`, { |
Member
There was a problem hiding this comment.
Probably better to do something like /vm/${vmid}/rename and include the new name in the POST data
com6056
reviewed
Feb 20, 2019
| credentials: 'same-origin', | ||
| method: 'post' | ||
| }).then((response) => { | ||
| return swal(`VM Name has been changes!`, { |
com6056
reviewed
Feb 20, 2019
| } | ||
| }).catch(err => { | ||
| if (err) { | ||
| swal("Uh oh...", `Unable to change VM Name. Please try again later.`, "error"); |
Member
|
@frybin Any progress on this? I think this would be a cool feature to see |
Author
|
@devinmatte I plan to do this during the summer when I have some more time to work on things. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.