Make SR-IOV numvfs setting nullable
Change-Id: I134d4002d6ce825c6986b930a515012bcdf4b551 Closes-bug: #1643600
This commit is contained in:
parent
ca498021fd
commit
66e85fec7f
|
@ -180,8 +180,9 @@ DEFAULT_RELEASE_NIC_ATTRIBUTES = {
|
|||
'metadata': {'weight': 20, 'label': 'MTU'}
|
||||
},
|
||||
'sriov': {
|
||||
'numvfs': {'min': 0, 'type': 'number', 'value': None,
|
||||
'weight': 20, 'label': 'Virtual functions'},
|
||||
'numvfs': {'min': 1, 'type': 'number', 'value': None,
|
||||
'nullable': True, 'weight': 20,
|
||||
'label': 'Custom Number of Virtual Functions'},
|
||||
'enabled': {'type': 'checkbox', 'value': False,
|
||||
'weight': 10, 'label': 'SR-IOV enabled'},
|
||||
'physnet': {'type': 'text', 'value': '', 'weight': 30,
|
||||
|
|
|
@ -313,9 +313,10 @@ class TestHandlers(BaseIntegrationTest):
|
|||
}]
|
||||
},
|
||||
'numvfs': {
|
||||
'label': 'Number of Virtual Functions',
|
||||
'label': 'Custom Number of Virtual Functions',
|
||||
'weight': 20,
|
||||
'type': 'number',
|
||||
'nullable': True,
|
||||
'min': 1,
|
||||
'value': None,
|
||||
'restrictions': [
|
||||
|
@ -1256,9 +1257,10 @@ class TestNICAttributesHandlers(BaseIntegrationTest):
|
|||
}]
|
||||
},
|
||||
'numvfs': {
|
||||
'label': 'Number of Virtual Functions',
|
||||
'label': 'Custom Number of Virtual Functions',
|
||||
'weight': 20,
|
||||
'type': 'number',
|
||||
'nullable': True,
|
||||
'min': 1,
|
||||
'value': None,
|
||||
'restrictions': [
|
||||
|
|
|
@ -2143,9 +2143,10 @@
|
|||
restrictions:
|
||||
- "settings:common.libvirt_type.value != 'kvm'": "Only KVM hypervisor works with SR-IOV"
|
||||
numvfs:
|
||||
label: "Number of Virtual Functions"
|
||||
label: "Custom Number of Virtual Functions"
|
||||
weight: 20
|
||||
type: "number"
|
||||
nullable: True
|
||||
min: 1
|
||||
value: null
|
||||
restrictions:
|
||||
|
|
|
@ -97,8 +97,9 @@ DEFAULT_NIC_ATTRIBUTES = {
|
|||
'metadata': {'weight': 20, 'label': 'MTU'}
|
||||
},
|
||||
'sriov': {
|
||||
'numvfs': {'min': 0, 'type': 'number', 'value': None,
|
||||
'weight': 20, 'label': 'Virtual functions'},
|
||||
'numvfs': {'min': 1, 'type': 'number', 'nullable': True,
|
||||
'value': None, 'weight': 20,
|
||||
'label': 'Custom Number of Virtual Functions'},
|
||||
'enabled': {'type': 'checkbox', 'value': False,
|
||||
'weight': 10, 'label': 'SR-IOV enabled'},
|
||||
'physnet': {'type': 'text', 'value': '', 'weight': 30,
|
||||
|
|
Loading…
Reference in New Issue