Add 'state' field to interfaces and sub-interfaces
Assert that children cannot be 'up' of their parent is 'down'. Add tests. Update user-guide.
This commit is contained in:
@ -920,7 +920,7 @@ class Reconciler():
|
||||
config_admin_state = 1
|
||||
else:
|
||||
vpp_ifname, config_iface = interface.get_by_name(self.cfg, ifname)
|
||||
config_admin_state = 1
|
||||
config_admin_state = interface.get_admin_state(self.cfg, ifname)
|
||||
|
||||
vpp_admin_state = 0
|
||||
if vpp_ifname in self.vpp.cache['interface_names']:
|
||||
|
@ -316,6 +316,9 @@ class VPPApiDumper(VPPApi):
|
||||
if iface.sw_if_index in self.cache['l2xcs']:
|
||||
l2xc = self.cache['l2xcs'][iface.sw_if_index]
|
||||
i['l2xc'] = self.cache['interfaces'][l2xc.tx_sw_if_index].interface_name
|
||||
if not self.cache['interfaces'][idx].flags & 1: # IF_STATUS_API_FLAG_ADMIN_UP
|
||||
i['state'] = 'down'
|
||||
|
||||
i['mtu'] = iface.mtu[0]
|
||||
if iface.sub_number_of_tags == 0:
|
||||
config['interfaces'][iface.interface_name] = i
|
||||
|
Reference in New Issue
Block a user