コード例 #1
0
        /// <summary>
        /// 查询昆仑列表
        /// </summary>
        /// <param name="startPage">The start page.</param>
        /// <returns>机架列表</returns>
        public ApiServerList <KunLunServer> QueryKunLunServer(int startPage)
        {
            var result           = new ApiServerList <KunLunServer>();
            var queryDeviceParam = new DeviceParam()
            {
                PageSize = 100, StartPage = startPage, ServerType = "kunlun"
            };
            var reqResult = this.GetServerList(queryDeviceParam);

            reqResult.Data.ForEach(x =>
            {
                KunLunServer kunlunServer = new KunLunServer(x);
                result.Data.Add(kunlunServer);
            });
            result.TotalSize = reqResult.TotalSize;
            result.TotalPage = reqResult.TotalPage;
            return(result);
        }
コード例 #2
0
        /// <summary>
        /// 查询机架列表
        /// </summary>
        /// <param name="startPage">The start page.</param>
        /// <returns>机架列表</returns>
        public ApiServerList <RackServer> QueryRackServer(int startPage)
        {
            var result           = new ApiServerList <RackServer>();
            var queryDeviceParam = new DeviceParam()
            {
                PageSize = 100, StartPage = startPage, ServerType = "rack"
            };
            var reqResult = this.GetServerList(queryDeviceParam);

            reqResult.Data.ForEach(x =>
            {
                RackServer rackServer = new RackServer(x);
                result.Data.Add(rackServer);
            });
            result.TotalSize = reqResult.TotalSize;
            result.TotalPage = reqResult.TotalPage;
            return(result);
        }
コード例 #3
0
        /// <summary>
        /// 查询高密列表
        /// </summary>
        /// <param name="startPage">The start page.</param>
        /// <returns>高密列表</returns>
        public ApiServerList <HighdensityServer> QueryHighDesentyServer(int startPage)
        {
            var result           = new ApiServerList <HighdensityServer>();
            var queryDeviceParam = new DeviceParam()
            {
                PageSize = 100, StartPage = startPage, ServerType = "highdensity"
            };
            var reqResult = this.GetServerList(queryDeviceParam);

            reqResult.Data.ForEach(x =>
            {
                var highDesentyServer = new HighdensityServer(x);
                x.ChildBlades.ForEach(m =>
                {
                    var childHighdensity = new ChildHighdensity(m, this.ESight.HostIP);
                    highDesentyServer.ChildHighdensitys.Add(childHighdensity);
                });
                result.Data.Add(highDesentyServer);
            });
            result.TotalSize = reqResult.TotalSize;
            result.TotalPage = reqResult.TotalPage;
            return(result);
        }
コード例 #4
0
        /// <summary>
        /// 查询刀片列表
        /// </summary>
        /// <param name="startPage">The start page.</param>
        /// <returns>刀片列表</returns>
        public ApiServerList <BladeServer> QueryBladeServer(int startPage)
        {
            var result           = new ApiServerList <BladeServer>();
            var queryDeviceParam = new DeviceParam()
            {
                PageSize = 100, StartPage = startPage, ServerType = "blade"
            };
            var reqResult = this.GetServerList(queryDeviceParam);

            reqResult.Data.ForEach(x =>
            {
                BladeServer bladeServer = new BladeServer(x);
                x.ChildBlades.ForEach(m =>
                {
                    ChildBlade childBlade = new ChildBlade(m, this.ESight.HostIP);
                    bladeServer.ChildBlades.Add(childBlade);
                });
                result.Data.Add(bladeServer);
            });
            result.TotalSize = reqResult.TotalSize;
            result.TotalPage = reqResult.TotalPage;
            return(result);
        }