LCOV - code coverage report
Current view: top level - legacy/ascend910/framework/common/src/topo/topo_device - topoinfo_ranktableConcise_device.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 11.9 % 59 7
Test Date: 2026-07-28 12:11:00 Functions: 10.0 % 30 3

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2025 Huawei Technologies Co., Ltd.
       3              :  * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       4              :  * CANN Open Software License Agreement Version 2.0 (the "License").
       5              :  * Please refer to the License for details. You may not use this file except in compliance with the License.
       6              :  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       7              :  * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       8              :  * See LICENSE in the root of the software repository for the full text of the License.
       9              :  */
      10              : 
      11              : #include "topoinfo_ranktableConcise.h"
      12              : #include <map>
      13              : #include <vector>
      14              : #include <string>
      15              : #include <fstream>
      16              : #include <algorithm>
      17              : #include <unistd.h>
      18              : #include <chrono>
      19              : #include <iostream>
      20              : #include <arpa/inet.h>
      21              : 
      22              : #include "log.h"
      23              : #include "env_config.h"
      24              : #include "hccl_comm_pub.h"
      25              : // ltm指定config路径
      26              : #include "common/src/config.h"
      27              : #include "workflow_pub.h"
      28              : #include "device_capacity.h"
      29              : 
      30              : using namespace std;
      31              : using namespace hccl;
      32              : 
      33            1 : TopoinfoRanktableConcise::TopoinfoRanktableConcise(const std::string &rankTableM, const std::string &identify)
      34              :     : TopoInfoRanktableParser(rankTableM, identify),
      35            1 :     isInterSuperPodRetryEnable_(GetExternalInputInterSuperPodRetryEnable())
      36              : {
      37            1 : }
      38              : 
      39            1 : TopoinfoRanktableConcise::~TopoinfoRanktableConcise()
      40              : {
      41            1 : }
      42              : 
      43            0 : HcclResult TopoinfoRanktableConcise::Init()
      44              : {
      45            0 :     return HCCL_E_NOT_SUPPORT;
      46              : }
      47              : 
      48            0 : HcclResult TopoinfoRanktableConcise::GetClusterInfo(RankTable_t &clusterInfo)
      49              : {
      50            0 :     return HCCL_E_NOT_SUPPORT;
      51              : }
      52              : 
      53            0 : HcclResult TopoinfoRanktableConcise::GetSelfClusterInfo(HcclCommParams &params)
      54              : {
      55            0 :     return HCCL_E_NOT_SUPPORT;
      56              : }
      57              : 
      58            0 : HcclResult TopoinfoRanktableConcise::GetClusterInfo(hccl::HcclCommParams &params,
      59              :     hccl::RankTable_t &rankTable)
      60              : {
      61            0 :     return HCCL_E_NOT_SUPPORT;
      62              : }
      63              : 
      64            0 : HcclResult TopoinfoRanktableConcise::SetIsInterSuperPodRetryEnable(bool isRetryEnable)
      65              : {
      66            0 :     return HCCL_E_NOT_SUPPORT;
      67              : }
      68              : 
      69            0 : void TopoinfoRanktableConcise::DetectNicDepoly(RankTable_t &rankTable)
      70              : {
      71            0 :     return;
      72              : }
      73              : 
      74            0 : HcclResult TopoinfoRanktableConcise::ParserClusterInfo(hccl::HcclCommParams &params, hccl::RankTable_t &rankTable)
      75              : {
      76            0 :     return HCCL_E_NOT_SUPPORT;
      77              : }
      78              : 
      79            0 : HcclResult TopoinfoRanktableConcise::CheckNicDeployConsistence(RankTable_t &clusterInfo, NICDeployment deploy) const
      80              : {
      81            0 :     return HCCL_E_NOT_SUPPORT;
      82              : }
      83              : 
      84            0 : HcclResult TopoinfoRanktableConcise::GetRanktableInfo(RankTable_t &clusterInfo)
      85              : {
      86            0 :     return HCCL_E_NOT_SUPPORT;
      87              : }
      88              : 
      89            0 : HcclResult TopoinfoRanktableConcise::GetServerList(const nlohmann::json &obj, RankTable_t &clusterInfo)
      90              : {
      91            0 :     return HCCL_E_NOT_SUPPORT;
      92              : }
      93              : 
      94              : 
      95            0 : HcclResult TopoinfoRanktableConcise::GetSingleServer(const nlohmann::json &serverListObj, u32 objIndex,
      96              :     RankTable_t &clusterInfo)
      97              : {
      98            0 :     return HCCL_E_NOT_SUPPORT;
      99              : }
     100              : 
     101            0 : HcclResult TopoinfoRanktableConcise::GetDeviceList(const nlohmann::json &serverListObj, u32 objIndex,
     102              :     RankTable_t &clusterInfo, std::string &serverId, u32 &serverIdx, HcclIpAddress &hostIp)
     103              : {
     104            0 :     return HCCL_E_NOT_SUPPORT;
     105              : }
     106              : 
     107            0 : HcclResult TopoinfoRanktableConcise::GetSingleDevice(const nlohmann::json &deviceListObj, u32 objIndex,
     108              :     RankTable_t &clusterInfo, std::string &serverId, u32 &serverIdx, HcclIpAddress &hostIp)
     109              : {
     110            0 :     return HCCL_E_NOT_SUPPORT;
     111              : }
     112              : 
     113            0 : HcclResult TopoinfoRanktableConcise::SplitString(const std::string& str, const std::string& strC,
     114              :     std::vector<std::string>& strVector) const
     115              : {
     116            0 :     return HCCL_E_NOT_SUPPORT;
     117              : }
     118              : 
     119            0 : HcclResult TopoinfoRanktableConcise::GetSingleDeviceIp(const nlohmann::json &deviceListObj, u32 objIndex,
     120              :     RankTable_t &clusterInfo, RankInfo_t &rankinfo, DevType deviceType, bool invalidHostIp)
     121              : {
     122            0 :     return HCCL_E_NOT_SUPPORT;
     123              : }
     124              : 
     125            0 : HcclResult TopoinfoRanktableConcise::GetSingleBackupDeviceIp(const nlohmann::json &deviceListObj, u32 objIndex,
     126              :     RankInfo_t &rankinfo)
     127              : {
     128            0 :     return HCCL_E_NOT_SUPPORT;
     129              : }
     130              : 
     131            0 : HcclResult TopoinfoRanktableConcise::GetSingleDeviceHostPort(const nlohmann::json &deviceListObj, u32 objIndex,
     132              :     RankInfo_t &rankinfo)
     133              : {
     134            0 :     return HCCL_E_NOT_SUPPORT;
     135              : }
     136              : 
     137            0 : HcclResult TopoinfoRanktableConcise::GetSingleDevicePort(const nlohmann::json &deviceListObj, u32 objIndex,
     138              :     RankInfo_t &rankinfo)
     139              : {
     140            0 :     return HCCL_E_NOT_SUPPORT;
     141              : }
     142              : 
     143            0 : HcclResult TopoinfoRanktableConcise::GetSingleBackupDevicePort(const nlohmann::json &deviceListObj, u32 objIndex,
     144              :     RankInfo_t &rankinfo)
     145              : {
     146            0 :     return HCCL_E_NOT_SUPPORT;
     147              : }
     148              : 
     149            0 : HcclResult TopoinfoRanktableConcise::VerifyBackupDeviceIpAndPort(std::vector<RankInfo_t> &rankList, u32 devIndex)
     150              : {
     151            0 :     return HCCL_E_NOT_SUPPORT;
     152              : }
     153              : 
     154            0 : HcclResult TopoinfoRanktableConcise::GetSingleSuperDeviceId(const nlohmann::json &deviceListObj, u32 objIndex,
     155              :     RankTable_t &clusterInfo, RankInfo_t &rankinfo)
     156              : {
     157            0 :     return HCCL_E_NOT_SUPPORT;
     158              : }
     159              : 
     160            0 : HcclResult TopoinfoRanktableConcise::GetSuperPodList(const nlohmann::json &obj, RankTable_t &clusterInfo)
     161              : {
     162            0 :     return HCCL_E_NOT_SUPPORT;
     163              : }
     164              : 
     165            0 : HcclResult TopoinfoRanktableConcise::GetSingleSuperPod(const nlohmann::json &superPodList, u32 objIndex,
     166              :     RankTable_t &clusterInfo)
     167              : {
     168            0 :     return HCCL_E_NOT_SUPPORT;
     169              : }
     170              : 
     171            0 : HcclResult TopoinfoRanktableConcise::GetSuperPodServerList(const nlohmann::json &superPodList, u32 objIndex,
     172              :     RankTable_t &clusterInfo, std::string superPodId)
     173              : {
     174            0 :     return HCCL_E_NOT_SUPPORT;
     175              : }
     176              : 
     177            0 : HcclResult TopoinfoRanktableConcise::GetSingleSuperPodSever(const nlohmann::json &superPodServerList, u32 objIndex,
     178              :     RankTable_t &clusterInfo, std::string superPodId)
     179              : {
     180            0 :     return HCCL_E_NOT_SUPPORT;
     181              : }
     182              : 
     183            0 : HcclResult TopoinfoRanktableConcise::CheckSuperPodInfo(RankTable_t &clusterInfo) const
     184              : {
     185            0 :     return HCCL_E_NOT_SUPPORT;
     186              : }
     187              : 
     188            1 : HcclResult TopoinfoRanktableConcise::GetSingleNicInfo(const nlohmann::json &serverListObj, u32 objIndex,
     189              :     RankInfo_t &rankinfo)
     190              : {
     191            1 :     return HCCL_E_NOT_SUPPORT;
     192              : }
        

Generated by: LCOV version 2.0-1