Commit cc87d736 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Allow instance NIC's IP address to be None



Also add some assertions.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 405241dc
......@@ -631,19 +631,26 @@ NICS_PARAMETERS = frozenset(NICS_PARAMETER_TYPES.keys())
IDISK_SIZE = "size"
IDISK_MODE = "mode"
IDISK_ADOPT = "adopt"
IDISK_PARAMS = frozenset([IDISK_SIZE, IDISK_MODE, IDISK_ADOPT])
IDISK_PARAMS_TYPES = {
IDISK_SIZE: VTYPE_SIZE,
IDISK_MODE: VTYPE_STRING,
IDISK_ADOPT: VTYPE_STRING,
}
IDISK_PARAMS = frozenset(IDISK_PARAMS_TYPES.keys())
INIC_MAC = "mac"
INIC_IP = "ip"
INIC_MODE = "mode"
INIC_LINK = "link"
INIC_BRIDGE = "bridge"
INIC_PARAMS = frozenset([INIC_MAC, INIC_IP, INIC_MODE, INIC_LINK, INIC_BRIDGE])
INIC_PARAMS_TYPES = dict([(name, VTYPE_STRING) for name in INIC_PARAMS])
INIC_PARAMS_TYPES = {
INIC_BRIDGE: VTYPE_STRING,
INIC_IP: VTYPE_MAYBE_STRING,
INIC_LINK: VTYPE_STRING,
INIC_MAC: VTYPE_STRING,
INIC_MODE: VTYPE_STRING,
}
INIC_PARAMS = frozenset(INIC_PARAMS_TYPES.keys())
# Hypervisor constants
HT_XEN_PVM = "xen-pvm"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment