Revision 5cfa6c37 lib/opcodes.py
b/lib/opcodes.py | ||
---|---|---|
361 | 361 |
_PStorageType = ("storage_type", ht.NoDefault, _CheckStorageType, |
362 | 362 |
"Storage type") |
363 | 363 |
|
364 |
_CheckNetworkType = ht.TElemOf(constants.NETWORK_VALID_TYPES) |
|
365 |
|
|
366 | 364 |
|
367 | 365 |
@ht.WithDesc("IPv4 network") |
368 | 366 |
def _CheckCIDRNetNotation(value): |
... | ... | |
2065 | 2063 |
OP_DSC_FIELD = "network_name" |
2066 | 2064 |
OP_PARAMS = [ |
2067 | 2065 |
_PNetworkName, |
2068 |
("network_type", None, ht.TMaybe(_CheckNetworkType), "Network type"), |
|
2069 | 2066 |
("network", ht.NoDefault, _TIpNetwork4, "IPv4 subnet"), |
2070 | 2067 |
("gateway", None, ht.TMaybe(_TIpAddress4), "IPv4 gateway"), |
2071 | 2068 |
("network6", None, ht.TMaybe(_TIpNetwork6), "IPv6 subnet"), |
... | ... | |
2099 | 2096 |
OP_DSC_FIELD = "network_name" |
2100 | 2097 |
OP_PARAMS = [ |
2101 | 2098 |
_PNetworkName, |
2102 |
("network_type", None, ht.TMaybeValueNone(_CheckNetworkType), |
|
2103 |
"Network type"), |
|
2104 | 2099 |
("gateway", None, ht.TMaybeValueNone(_TIpAddress4), "IPv4 gateway"), |
2105 | 2100 |
("network6", None, ht.TMaybeValueNone(_TIpNetwork6), "IPv6 subnet"), |
2106 | 2101 |
("gateway6", None, ht.TMaybeValueNone(_TIpAddress6), "IPv6 gateway"), |
Also available in: Unified diff