This parameter is used to store the vlans each nic is connected to. It is only used if the network is in openvswitch mode.
Signed-off-by: Sebastian Gebhard <[email protected]> --- lib/constants.py | 5 +++++ src/Ganeti/Objects.hs | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/constants.py b/lib/constants.py index 8844791..9866ed5 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -1315,6 +1315,7 @@ PP_DEFAULT = "default" # NIC_* constants are used inside the ganeti config NIC_MODE = "mode" NIC_LINK = "link" +NIC_VLAN = "vlan" NIC_MODE_BRIDGED = "bridged" NIC_MODE_ROUTED = "routed" @@ -1333,6 +1334,7 @@ RELEASE_ACTION = "release" NICS_PARAMETER_TYPES = { NIC_MODE: VTYPE_STRING, NIC_LINK: VTYPE_STRING, + NIC_VLAN: VTYPE_MAYBE_STRING, } NICS_PARAMETERS = frozenset(NICS_PARAMETER_TYPES.keys()) @@ -1365,6 +1367,7 @@ INIC_MODE = "mode" INIC_LINK = "link" INIC_NETWORK = "network" INIC_NAME = "name" +INIC_VLAN = "vlan" INIC_PARAMS_TYPES = { INIC_IP: VTYPE_MAYBE_STRING, INIC_LINK: VTYPE_STRING, @@ -1372,6 +1375,7 @@ INIC_PARAMS_TYPES = { INIC_MODE: VTYPE_STRING, INIC_NETWORK: VTYPE_MAYBE_STRING, INIC_NAME: VTYPE_MAYBE_STRING, + INIC_VLAN: VTYPE_MAYBE_STRING, } INIC_PARAMS = frozenset(INIC_PARAMS_TYPES.keys()) @@ -2255,6 +2259,7 @@ del _LV_DEFAULTS, _DRBD_DEFAULTS NICC_DEFAULTS = { NIC_MODE: NIC_MODE_BRIDGED, NIC_LINK: DEFAULT_BRIDGE, + NIC_VLAN: "", } # All of the following values are quite arbitrarily - there are no diff --git a/src/Ganeti/Objects.hs b/src/Ganeti/Objects.hs index 021a860..c6c8c0f 100644 --- a/src/Ganeti/Objects.hs +++ b/src/Ganeti/Objects.hs @@ -277,6 +277,7 @@ instance UuidObject Network where $(buildParam "Nic" "nicp" [ simpleField "mode" [t| NICMode |] , simpleField "link" [t| String |] + , simpleField "vlan" [t| Maybe String |] ]) $(buildObject "PartialNic" "nic" $ -- 1.8.1.2
