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

Fix interface constraint construction in VM host compose form. #1141

Merged
merged 2 commits into from
May 21, 2020

Conversation

Caleb-Ellis
Copy link
Contributor

Done

  • Fixed interface constraint logic in VM host compose form.
  • Slightly updated subnet list styling to be less space-y.

QA

  • Go to the KVM details page of a KVM that has attached VLANs (e.g. bolla LXD) and open the machine compose dropdown.
  • Confirm that you can still compose a machine with default interface constraints. Check the websocket request has params.interfaces : "".
  • Open the compose dropdown again and add a couple of custom interface constraints. Check that the first available subnet is already selected by default, and the IP address field has a placeholder saying "Leave empty to auto-assign"
  • For the first interface just select a subnet, and for the second select a subnet and enter an IP address.
  • Submit the form and check that the websocket request correctly adheres to the api. You might get some cryptic errors if you input an IP address that is not part of the selected subnet.

Fixes

Fixes #1107

Launchpad Issue

lp#1876180

Screenshot

Screenshot_2020-05-19 MAAS UI

@Caleb-Ellis
Copy link
Contributor Author

@cassiocassio @lilyvidenova I've added UX needed and tagging you here because from the code it looks like fields were being deliberately disabled depending on whether an ip address was typed or a subnet was selected.

This PR makes it so the first subnet is automatically selected so I've had to remove the disable-y work -- now you can enter both, but you'll get an error from the api if you do it wrong.

@Caleb-Ellis Caleb-Ellis force-pushed the interface-constraints branch from e6c69c7 to 136d92e Compare May 21, 2020 05:08
Copy link
Contributor

@squidsoup squidsoup left a comment

Choose a reason for hiding this comment

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

lgtm!

@Caleb-Ellis
Copy link
Contributor Author

Removing UX needed - this can be considered in the overall UX review and I'd like to merge it so I can handle conflicts with another branch

@Caleb-Ellis Caleb-Ellis merged commit 0888411 into canonical:master May 21, 2020
@Caleb-Ellis Caleb-Ellis deleted the interface-constraints branch May 21, 2020 09:37
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.

UI does not send interface constraints when composing a machine
2 participants