zVSciy / cisco-configurator-2.0

3 stars 0 forks source link

Views.py does not support DHCP configuration on an interface #4

Closed KaveXD closed 3 months ago

KaveXD commented 4 months ago

Interfaces in views.py don't support dhcp configuration. this is due to the checks in line 365. There should be a check if the ip address is dhcp or something.

KaveXD commented 4 months ago
        if '' not in (checkIntShutdown(interfaces_shutdown), checkIntDescription(interfaces_description), checkIntIP(interfaces_ip), checkIntSM(interfaces_sm)):

            for j in config_objects[1]:
                if j.interface == i.port_name:
                    j.shutdown = checkIntShutdown(interfaces_shutdown)
                    j.description = checkIntDescription(interfaces_description)
                    j.ip = checkIntIP(interfaces_ip)
                    j.sm = checkIntSM(interfaces_sm)
                    cm.writeInterface(j)
KaveXD commented 4 months ago

To add to this. if an interface is configured to be dhcp, and therefore is rejected by the input checks, when you open the interface page, the interfaces seem to shift: What it looks like in the webpage: image

What it looks like in the running-config: image image