Comment 0 for bug 1643600

Revision history for this message
Julia Aranovich (jkirnosova) wrote :

Steps to reproduce:

1. create an environment (any settings)
2. add a node to the environment with SR-IOV enabled inteface(s) and go to the node interfaces configuration screen
3. enable SR-IOV on a node interface and check SR-IOV settings

Expected result: all SR-IOV settings are valid by default

Actual result: numvfs setting is marked as invalid on UI.

UI highlights numvfs field because it has "number" type and "null" default value. "null" isn't recognized by UI as valid number input value.
Proposed solution is to split numvfs setting into 2 separate settings:

sriov: {
  ...,
  use_custom_numvfs: {
    type: 'checkbox'
    value: false,
    label: 'Use custom virtual functions number',
    description: ?,
    weight: 10
  },
  numvfs: {
    type: 'number',
    value: 2,
    min: 0,
    weight: 20,
    label: 'Custom virtual functions number',
    description: ?,
    restrictions: ['nic_attributes:sriov.use_custom_numvfs.value = false']
  }
}

This will guarantee having not a null value for number input and will make numvfs setting UX more clear.