def init_plat_tree(): # Create /api end point as root node r_api = tree("api", data = get_node_api()) # Add /api/spb to represent side plane board r_spb = tree("spb", data = get_node_spb()) r_api.addChild(r_spb) # Add servers /api/server[1-max] num = pal_get_num_slots() for i in range(1, num+1): r_server = populate_server_node(i) if r_server: r_api.addChild(r_server) # TODO: Need to add /api/nic to represent NIC Mezz Card # Add /api/spb/fruid end point r_temp = tree("fruid", data = get_node_fruid("spb")) r_spb.addChild(r_temp) # /api/spb/bmc end point r_temp = tree("bmc", data = get_node_bmc()) r_spb.addChild(r_temp) # /api/spb/sensors end point r_temp = tree("sensors", data = get_node_sensors("spb")) r_spb.addChild(r_temp) return r_api
def setup_board_routes(app: Application, write_enabled: bool): # Create /api end point as root node r_api = tree("api", data=get_node_api()) # Add /api/sled to represent entire SLED r_sled = tree("sled", data=get_node_sled()) r_api.addChild(r_sled) # Add mb /api/sled/mb r_mb = tree("mb", data=get_node_server_2s(1, "mb")) r_sled.addChild(r_mb) # Add /api/sled/mb/fruid end point r_temp = tree("fruid", data=get_node_fruid("mb")) r_mb.addChild(r_temp) # /api/sled/mb/bmc end point r_temp = tree("bmc", data=get_node_bmc()) r_mb.addChild(r_temp) # /api/sled/mb/sensors end point r_temp = tree("sensors", data=get_node_sensors("mb")) r_mb.addChild(r_temp) # /api/sled/mb/logs end point r_temp = tree("logs", data=get_node_logs("mb")) r_mb.addChild(r_temp) r_api.setup(app, write_enabled)
def init_plat_tree(): # Create /api end point as root node r_api = tree("api", data = get_node_api()) # Add /api/fcb to represent fan control board r_fcb = tree("fcb", data = get_node_fcb()) r_api.addChild(r_fcb) # Add /api/pdpb to represent fan control board r_pdpb = tree("pdpb", data = get_node_pdpb()) r_api.addChild(r_pdpb) # Add /api/peb to represent fan control board r_peb = tree("peb", data = get_node_peb()) r_api.addChild(r_peb) #Add /api/fcb/fans end point r_temp = tree("fans", data = get_node_fans()) r_fcb.addChild(r_temp) #Add /api/fcb/fruid end point r_temp = tree("fruid", data = get_node_fruid("fcb")) r_fcb.addChild(r_temp) #Add /api/fcb/sensors end point r_temp = tree("sensors", data = get_node_sensors("fcb")) r_fcb.addChild(r_temp) #Add /api/fcb/logs end point r_temp = tree("logs", data = get_node_logs("fcb")) r_fcb.addChild(r_temp) #Add /api/pdpb/sensors end point r_temp = tree("sensors", data = get_node_sensors("pdpb")) r_pdpb.addChild(r_temp) #Add /api/pdpb/flash end point r_temp = tree("flash", data = get_node_flash()) r_pdpb.addChild(r_temp) #Add /api/pdpb/fruid end point r_temp = tree("fruid", data = get_node_fruid("pdpb")) r_pdpb.addChild(r_temp) #Add /api/pdpb/logs end point r_temp = tree("logs", data = get_node_logs("pdpb")) r_pdpb.addChild(r_temp) #Add /api/peb/fruid end point r_temp = tree("fruid", data = get_node_fruid("peb")) r_peb.addChild(r_temp) #Add /api/peb/sensors end point r_temp = tree("sensors", data = get_node_sensors("peb")) r_peb.addChild(r_temp) #Add /api/peb/bmc end point r_temp = tree("bmc", data = get_node_bmc()) r_peb.addChild(r_temp) #Add /api/peb/health end point r_temp = tree("health", data = get_node_health()) r_peb.addChild(r_temp) #Add /api/peb/logs end point r_temp = tree("logs", data = get_node_logs("peb")) r_peb.addChild(r_temp) return r_api
def init_plat_tree(): # Create /api end point as root node r_api = tree("api", data = get_node_api()) # Add /api/sled to represent entire SLED r_sled = tree("sled", data = get_node_sled()) r_api.addChild(r_sled) # Add mb /api/sled/mb r_mb = tree("mb", data = get_node_server_2s()) r_sled.addChild(r_mb) # Add /api/sled/mb/fruid end point r_temp = tree("fruid", data = get_node_fruid("mb")) r_mb.addChild(r_temp) # /api/sled/mb/bmc end point r_temp = tree("bmc", data = get_node_bmc()) r_mb.addChild(r_temp) r_temp = tree("vboot", data = get_node_vboot()) r_mb.addChild(r_temp) # /api/sled/mb/sensors end point r_temp = tree("sensors", data = get_node_sensors("mb")) r_mb.addChild(r_temp) # /api/sled/mb/logs end point r_temp = tree("logs", data = get_node_logs("mb")) r_mb.addChild(r_temp) # Add /api/sled/mezz to represent Network Mezzaine card r_mezz = tree("mezz", data = get_node_mezz()) r_sled.addChild(r_mezz) # Add /api/mezz/fruid end point r_temp = tree("fruid", data = get_node_fruid("nic")) r_mezz.addChild(r_temp) # /api/mezz/sensors end point r_temp = tree("sensors", data = get_node_sensors("nic")) r_mezz.addChild(r_temp) # /api/mezz/logs end point r_temp = tree("logs", data = get_node_logs("nic")) r_mezz.addChild(r_temp) return r_api
def init_plat_tree(): # Create /api end point as root node r_api = tree("api", data = get_node_api()) # Add /api/spb to represent side plane board r_spb = tree("spb", data = get_node_spb()) r_api.addChild(r_spb) # Add /api/mezz to represent Network Mezzaine card r_mezz = tree("mezz", data = get_node_mezz()) r_api.addChild(r_mezz) # Add servers /api/server[1-max] num = pal_get_num_slots() for i in range(1, num+1): r_server = populate_server_node(i) if r_server: r_api.addChild(r_server) # Add /api/spb/fruid end point r_temp = tree("fruid", data = get_node_fruid("spb")) r_spb.addChild(r_temp) # /api/spb/bmc end point r_temp = tree("bmc", data = get_node_bmc()) r_spb.addChild(r_temp) # /api/spb/sensors end point r_temp = tree("sensors", data = get_node_sensors("spb")) r_spb.addChild(r_temp) # /api/spb/logs end point r_temp = tree("logs", data = get_node_logs("spb")) r_spb.addChild(r_temp) # Add /api/mezz/fruid end point r_temp = tree("fruid", data = get_node_fruid("nic")) r_mezz.addChild(r_temp) # /api/mezz/sensors end point r_temp = tree("sensors", data = get_node_sensors("nic")) r_mezz.addChild(r_temp) # /api/mezz/logs end point r_temp = tree("logs", data = get_node_logs("nic")) r_mezz.addChild(r_temp) return r_api
def setup_board_routes(app: Application, write_enabled: bool): # Create /api end point as root node r_api = tree("api", data=get_node_api()) # Add /api/spb to represent side plane board r_spb = tree("spb", data=get_node_spb()) r_api.addChild(r_spb) # Add /api/mezz to represent Network Mezzaine card r_mezz = tree("mezz", data=get_node_mezz()) r_api.addChild(r_mezz) # Add servers /api/server[1-max] num = pal_get_num_slots() for i in range(1, num + 1): r_server = populate_server_node(i) if r_server: r_api.addChild(r_server) # Add /api/spb/fruid end point r_temp = tree("fruid", data=get_node_fruid("spb")) r_spb.addChild(r_temp) # /api/spb/bmc end point r_temp = tree("bmc", data=get_node_bmc()) r_spb.addChild(r_temp) # /api/spb/sensors end point r_temp = tree("sensors", data=get_node_sensors("spb")) r_spb.addChild(r_temp) # /api/spb/logs end point r_temp = tree("logs", data=get_node_logs("spb")) r_spb.addChild(r_temp) # Add /api/mezz/fruid end point r_temp = tree("fruid", data=get_node_fruid("nic")) r_mezz.addChild(r_temp) # /api/mezz/sensors end point r_temp = tree("sensors", data=get_node_sensors("nic")) r_mezz.addChild(r_temp) # /api/mezz/logs end point r_temp = tree("logs", data=get_node_logs("nic")) r_mezz.addChild(r_temp) r_api.setup(app, write_enabled)
def init_plat_tree(): # Create /api end point as root node r_api = tree("api", data = get_node_api()) # Add /api/spb to represent side plane board r_spb = tree("spb", data = get_node_spb()) r_api.addChild(r_spb) # Add /api/mezz to represent Network Mezzaine card r_mezz = tree("mezz", data = get_node_mezz()) r_api.addChild(r_mezz) # Add servers /api/server[1-max] num = pal_get_num_slots() for i in range(1, num+1): r_server = populate_server_node(i) if r_server: r_api.addChild(r_server) # Add /api/spb/fruid end point r_temp = tree("fruid", data = get_node_fruid("spb")) r_spb.addChild(r_temp) # /api/spb/bmc end point r_temp = tree("bmc", data = get_node_bmc()) r_spb.addChild(r_temp) # /api/spb/sensors end point r_temp = tree("sensors", data = get_node_sensors("spb")) r_spb.addChild(r_temp) #Add /api/spb/fans end point r_temp = tree("fans", data = get_node_fans()) r_spb.addChild(r_temp) # /api/spb/logs end point r_temp = tree("logs", data = get_node_logs("spb")) r_spb.addChild(r_temp) # Add /api/mezz/fruid end point r_temp = tree("fruid", data = get_node_fruid("nic")) r_mezz.addChild(r_temp) # /api/mezz/sensors end point r_temp = tree("sensors", data = get_node_sensors("nic")) r_mezz.addChild(r_temp) # /api/mezz/logs end point r_temp = tree("logs", data = get_node_logs("nic")) r_mezz.addChild(r_temp) return r_api
def init_common_tree(): # Create /api end point as root node r_api = tree("api", data=get_node_api()) # /api/bmc end point r_temp = tree("bmc", data=get_node_bmc()) r_api.addChild(r_temp) # /api/sensors end point r_temp = tree("sensors", data=get_node_sensors("all")) r_api.addChild(r_temp) # /api/logs end point r_temp = tree("logs", data=get_node_logs("all")) r_api.addChild(r_temp) # /api/fans end point r_temp = tree("fans", data=get_node_fans()) r_api.addChild(r_temp) return r_api
def setup_common_routes(app: Application, write_enabled: bool): # Create /api end point as root node r_api = tree("api", data=get_node_api()) # /api/bmc end point r_temp = tree("bmc", data=get_node_bmc()) r_api.addChild(r_temp) # /api/sensors end point r_temp = tree("sensors", data=get_node_sensors("all")) r_api.addChild(r_temp) # /api/logs end point r_temp = tree("logs", data=get_node_logs("all")) r_api.addChild(r_temp) # /api/fans end point r_temp = tree("fans", data=get_node_fans()) r_api.addChild(r_temp) r_api.setup(app, write_enabled)
def init_plat_tree(): # Create /api end point as root node r_api = tree("api", data=get_node_api()) # Add /api/mezz to represent Mezzanine Card r_mezz = tree("nic", data=get_node_mezz()) r_api.addChild(r_mezz) # Add /api/iom to represent IO Module r_iom = tree("iom", data=get_node_iom()) r_api.addChild(r_iom) # Add /api/dpb to represent Drive Plan Board r_dpb = tree("dpb", data=get_node_dpb()) r_api.addChild(r_dpb) # Add /api/scc to represent Storage Controller Card r_scc = tree("scc", data=get_node_scc()) r_api.addChild(r_scc) # Add servers /api/slot[1-max] num = pal_get_num_slots() for i in range(1, num + 1): r_server = populate_server_node(i) if r_server: r_api.addChild(r_server) # Add /api/mezz/sensors end point r_temp = tree("sensors", data=get_node_sensors("nic")) r_mezz.addChild(r_temp) # Add /api/mezz/logs end point r_temp = tree("logs", data=get_node_logs("nic")) r_mezz.addChild(r_temp) # Add /api/iom/fruid end point r_temp = tree("fruid", data=get_node_fruid("iom")) r_iom.addChild(r_temp) # Add /api/iom/sensors end point r_temp = tree("sensors", data=get_node_sensors("iom")) r_iom.addChild(r_temp) # Add /api/iom/logs end point r_temp = tree("logs", data=get_node_logs("iom")) r_iom.addChild(r_temp) # Add /api/iom/bmc end point r_temp = tree("bmc", data=get_node_bmc()) r_iom.addChild(r_temp) # Add /api/iom/health end point r_temp = tree("health", data=get_node_health()) r_iom.addChild(r_temp) # Add /api/iom/identify end point r_temp = tree("identify", data=get_node_identify("iom")) r_iom.addChild(r_temp) # Add /api/dpb/fruid end point r_temp = tree("fruid", data=get_node_fruid("dpb")) r_dpb.addChild(r_temp) # Add /api/dpb/sensors end point r_temp = tree("sensors", data=get_node_sensors("dpb")) r_dpb.addChild(r_temp) # Add /api/dpb/logs end point r_temp = tree("logs", data=get_node_logs("dpb")) r_dpb.addChild(r_temp) # Add /api/dpb/fans end point r_temp = tree("fans", data=get_node_fans()) r_dpb.addChild(r_temp) # Add /api/dpb/hdd-status end point r_tmp = tree("hdd-status", data=get_node_enclosure_hdd_status()) r_dpb.addChild(r_tmp) # Add /api/dpb/error end point r_tmp = tree("error", data=get_node_enclosure_error()) r_dpb.addChild(r_tmp) # Add /api/dpb/flash-health end point r_tmp = tree("flash-health", data=get_node_enclosure_flash_health()) r_dpb.addChild(r_tmp) # Add /api/dpb/flash-status end point r_tmp = tree("flash-status", data=get_node_enclosure_flash_status()) r_dpb.addChild(r_tmp) # Add /api/scc/fruid end point r_temp = tree("fruid", data=get_node_fruid("scc")) r_scc.addChild(r_temp) # Add /api/scc/sensors end point r_temp = tree("sensors", data=get_node_sensors("scc")) r_scc.addChild(r_temp) # Add /api/scc/logs end point r_temp = tree("logs", data=get_node_logs("scc")) r_scc.addChild(r_temp) return r_api
def init_plat_tree(): # Create /api end point as root node r_api = tree("api", data = get_node_api()) # Add /api/fcb to represent fan control board r_fcb = tree("fcb", data = get_node_fcb()) r_api.addChild(r_fcb) # Add /api/pdpb to represent fan control board r_pdpb = tree("pdpb", data = get_node_pdpb()) r_api.addChild(r_pdpb) # Add /api/peb to represent fan control board r_peb = tree("peb", data = get_node_peb()) r_api.addChild(r_peb) #Add /api/fcb/fans end point r_temp = tree("fans", data = get_node_fans()) r_fcb.addChild(r_temp) #Add /api/fcb/fruid end point r_temp = tree("fruid", data = get_node_fruid("fcb")) r_fcb.addChild(r_temp) #Add /api/fcb/sensors end point r_temp = tree("sensors", data = get_node_sensors("fcb")) r_fcb.addChild(r_temp) #Add /api/fcb/logs end point r_temp = tree("logs", data = get_node_logs("fcb")) r_fcb.addChild(r_temp) #Add /api/pdpb/sensors end point r_temp = tree("sensors", data = get_node_sensors("pdpb")) r_pdpb.addChild(r_temp) #Add /api/pdpb/flash end point r_temp = tree("flash", data = get_node_flash()) r_pdpb.addChild(r_temp) #Add /api/pdpb/fruid end point r_temp = tree("fruid", data = get_node_fruid("pdpb")) r_pdpb.addChild(r_temp) #Add /api/pdpb/logs end point r_temp = tree("logs", data = get_node_logs("pdpb")) r_pdpb.addChild(r_temp) #Add /api/peb/fruid end point r_temp = tree("fruid", data = get_node_fruid("peb")) r_peb.addChild(r_temp) #Add /api/peb/sensors end point r_temp = tree("sensors", data = get_node_sensors("peb")) r_peb.addChild(r_temp) #Add /api/peb/bmc end point r_temp = tree("bmc", data = get_node_bmc()) r_peb.addChild(r_temp) #Add /api/peb/health end point r_temp = tree("health", data = get_node_health()) r_peb.addChild(r_temp) #Add /api/peb/identify end point r_temp = tree("identify", data = get_node_identify("peb")) r_peb.addChild(r_temp) #Add /api/peb/logs end point r_temp = tree("logs", data = get_node_logs("peb")) r_peb.addChild(r_temp) return r_api