def print_gbe_core_details(self, arp=False, cpu=False, refresh=True): """ Prints 40GbE core details. """ details = self.get_gbe_core_details() print('------------------------') print('%s configuration:' % self.name) print('MAC: ', Mac.mac2str(int(details['mac']))) print('Gateway: ', details['gateway_ip'].__str__()) print('IP: ', details['ip'].__str__()) print('Fabric port: %5d' % details['fabric_port']) print('Fabric interface is currently: %s' % 'Enabled' if details['fabric_en'] else 'Disabled') # print('XAUI Status: ', details['xaui_status']) # for ctr in range(0, 4): # print('\tlane sync %i: %i' % (ctr, details['xaui_lane_sync'][ctr])) # print('\tChannel bond: %i' % details['xaui_chan_bond']) # print('XAUI PHY config: ') # print('\tRX_eq_mix: %2X' % details['xaui_phy']['rx_eq_mix']) # print('\tRX_eq_pol: %2X' % details['xaui_phy']['rx_eq_pol']) # print('\tTX_pre-emph: %2X' % details['xaui_phy']['tx_preemph']) # print('\tTX_diff_ctrl: %2X' % details['xaui_phy']['tx_swing']) print('Multicast:') for k in details['multicast']: print('\t%s: %s' % (k, details['multicast'][k].__str__()))
def print_gbe_core_details(self, arp=False, cpu=False, refresh=True): """ Prints 10GbE core details. :param arp: boolean, include the ARP table :param cpu: boolean, include the CPU packet buffers :param refresh: read the 10gbe details first """ if refresh or (self.core_details is None): self.get_gbe_core_details(arp, cpu) details = self.core_details print('------------------------') print('%s configuration:' % self.fullname) print('MAC: ', Mac.mac2str(int(details['mac']))) print('Gateway: ', details['gateway_ip']) print('IP: ', details['ip']) print('Fabric port: ',) print('%5d' % details['fabric_port']) print('Fabric interface is currently: %s' % 'Enabled' if details['fabric_en'] else 'Disabled') print('XAUI Status: ', details['xaui_status']) for ctr in range(0, 4): print('\tlane sync %i: %i' % (ctr, details['xaui_lane_sync'][ctr])) print('\tChannel bond: %i' % details['xaui_chan_bond']) print('XAUI PHY config: ') print('\tRX_eq_mix: %2X' % details['xaui_phy']['rx_eq_mix']) print('\tRX_eq_pol: %2X' % details['xaui_phy']['rx_eq_pol']) print('\tTX_pre-emph: %2X' % details['xaui_phy']['tx_preemph']) print('\tTX_diff_ctrl: %2X' % details['xaui_phy']['tx_swing']) print('Multicast:') for k in details['multicast']: print('\t%s: %s' % (k, details['multicast'][k])) if arp: self.print_arp_details(refresh=refresh, only_hits=True) if cpu: self.print_cpu_details(refresh=refresh)
def print_gbe_core_details(self, arp=False, cpu=False, refresh=True): """ Prints 40GbE core details. """ details = self.get_gbe_core_details() print('------------------------') print('%s configuration:' % self.name) print('MAC: ', Mac.mac2str(int(details['mac']))) print('Gateway: ', details['gateway_ip'].__str__()) print('IP: ', details['ip'].__str__()) print('Fabric port: %5d' % details['fabric_port']) print('Fabric interface is currently: %s' % 'Enabled' if details['fabric_en'] else 'Disabled') # print('XAUI Status: ', details['xaui_status']) # for ctr in range(0, 4): # print('\tlane sync %i: %i' % (ctr, details['xaui_lane_sync'][ctr])) # print('\tChannel bond: %i' % details['xaui_chan_bond']) # print('XAUI PHY config: ') # print('\tRX_eq_mix: %2X' % details['xaui_phy']['rx_eq_mix']) # print('\tRX_eq_pol: %2X' % details['xaui_phy']['rx_eq_pol']) # print('\tTX_pre-emph: %2X' % details['xaui_phy']['tx_preemph']) # print('\tTX_diff_ctrl: %2X' % details['xaui_phy']['tx_swing']) print('Multicast:') for k in details['multicast']: print('\t%s: %s' % (k, details['multicast'][k].__str__()))
def print_gbe_core_details(self, arp=False, cpu=False, refresh=True): """ Prints 10GbE core details. :param arp: boolean, include the ARP table :param cpu: boolean, include the CPU packet buffers :param refresh: read the 10gbe details first """ if refresh or (self.core_details is None): self.get_gbe_core_details(arp, cpu) details = self.core_details print('------------------------') print('%s configuration:' % self.fullname) print('MAC: ', Mac.mac2str(int(details['mac']))) print('Gateway: ', details['gateway_ip']) print('IP: ', details['ip']) print('Fabric port: ',) print('%5d' % details['fabric_port']) print('Fabric interface is currently: %s' % 'Enabled' if details['fabric_en'] else 'Disabled') print('XAUI Status: ', details['xaui_status']) for ctr in range(0, 4): print('\tlane sync %i: %i' % (ctr, details['xaui_lane_sync'][ctr])) print('\tChannel bond: %i' % details['xaui_chan_bond']) print('XAUI PHY config: ') print('\tRX_eq_mix: %2X' % details['xaui_phy']['rx_eq_mix']) print('\tRX_eq_pol: %2X' % details['xaui_phy']['rx_eq_pol']) print('\tTX_pre-emph: %2X' % details['xaui_phy']['tx_preemph']) print('\tTX_diff_ctrl: %2X' % details['xaui_phy']['tx_swing']) print('Multicast:') for k in details['multicast']: print('\t%s: %s' % (k, details['multicast'][k])) if arp: self.print_arp_details(refresh=refresh, only_hits=True) if cpu: self.print_cpu_details(refresh=refresh)