smc-python
smc-python copied to clipboard
CVI mode error while adding VLAN interfaces
Hi David,
I am trying to add VLAN interfaces to an existing layer3 physical interface of a cluster.
cluster.physical_interface.add_layer3_vlan_cluster_interface(
interface_id=9,
vlan_id=123,
cluster_virtual='10.0.0.1',
network_value='10.0.0.0/24',
# cvi_mode='packetdispatch'
)
Unfortunately this throws an exception.
smc.api.exceptions.UpdateElementFailed: Impossible to update the specified interface for the target Dummy-Cluster. Element appears invalid: You must define a CVI mode for NIC 9 Physical Interface.
There is no difference between explicitly setting cvi_mode or leaving it out, the exception is always thrown. If I understand the source code correctly, it seems like the value is set to none later:
https://github.com/gabstopper/smc-python/blob/e027b8a5dcfaf884eada32d113d41c1e56b32457/smc/core/collection.py#L643
Changing that expression to 'cvi_mode': cvi_mode if macaddress else 'packetdispatch' does the trick and the VLANs are added.
Am I using it wrong or is this a bug?
Btw: is this still the right place to raise issues, or should I move to Forcepoint/fp-NGFW-SMC-python?