{"id":27320083,"url":"https://github.com/em-geeklab/redfish-client-ts","last_synced_at":"2025-10-26T17:36:43.099Z","repository":{"id":285253782,"uuid":"955615929","full_name":"EM-GeekLab/redfish-client-ts","owner":"EM-GeekLab","description":"Redfish TypeScript SDK (only implement the part required by ModelMachine)","archived":false,"fork":false,"pushed_at":"2025-04-10T13:36:28.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-12T09:11:57.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EM-GeekLab.png","metadata":{"files":{"readme":"README.cn.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-26T23:24:05.000Z","updated_at":"2025-04-10T13:36:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa59b6f3-1cf1-47e7-9103-4a5e45142283","html_url":"https://github.com/EM-GeekLab/redfish-client-ts","commit_stats":null,"previous_names":["em-geeklab/redfish-client-ts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EM-GeekLab%2Fredfish-client-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EM-GeekLab%2Fredfish-client-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EM-GeekLab%2Fredfish-client-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EM-GeekLab%2Fredfish-client-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EM-GeekLab","download_url":"https://codeload.github.com/EM-GeekLab/redfish-client-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543848,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-12T09:11:48.452Z","updated_at":"2025-10-26T17:36:38.059Z","avatar_url":"https://github.com/EM-GeekLab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redfish-client\n\n[\\[English Version\\]](./README.md)\n\n这是一个用于与支持 Redfish API 的 BMC 交互的库。\n\n该代码已开源，您可从 [GitHub](https://github.com/EM-GeekLab/redfish-client-ts) 获得代码。\n\nNPM 包: [redfish-client](https://www.npmjs.com/package/redfish-client)\n\n## 安装方法：\n\n```bash\nbun add redfish-client\n```\n\n## 使用方法\n\n```typescript\nimport {iDRACRedfishClient} from 'redfish-client';\n\nconst bmcClient = new iDRACRedfishClient(\"192.168.0.1\", \"root\", \"\u003cYourPassword\u003e\")\n\nconsole.log(`服务器状态：${await bmcClient.isAvailable()}`)\nconsole.log(`服务器信息：${JSON.stringify(await bmcClient.getSystemInfo(), null, 2)}`)\n\nconst [cpus, memory, pcieDevices] = await Promise.all([\n  bmcClient.getCPUInfo(systemId),\n  bmcClient.getMemoryInfo(systemId),\n  bmcClient.getPCIeDevicesInfo(systemId)\n]);\nconsole.log(`CPU 信息：${JSON.stringify(cpus, null, 2)}`);\nconsole.log(`内存信息：${JSON.stringify(memory, null, 2)}`);\nconsole.log(`PCIe 设备信息：${JSON.stringify(pcieDevices, null, 2)}`);\n\n// 重要提示：不要忘记关闭客户端，Redfish 存在全局会话数量限制，因此需要及时退出 \nawait bmcClient.closeSession();\n```\n\n注意，默认会使用首个获取的 System，但在部分高密度服务器中，可能存在多个 System，可以通过 `getAvailableSystemIds` 获取所有 System 信息，然后通过 `getSystemInfo(sysId)` 获取指定 System 的信息。\n\n## 贡献\n\n由于团队目前仅拥有一台 Dell iDRAC 9 的服务器，因此目前仅在该服务器上进行了测试，如果您开发了其他品牌服务器的 Redfish 支持，欢迎提交 PR。建议主要考虑对 mountVirtualMedia、unmountVirtualMedia 及 setVirtualMediaAsNextBootDevice 的适配。\n\n同时，若您有其他品牌服务器，欢迎使用 [Redfish Mockup Creator](https://github.com/DMTF/Redfish-Mockup-Creator) 对您现有的 Redfish 的服务器进行模拟保存，然后提交 Issue，我们会尽快进行适配。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fem-geeklab%2Fredfish-client-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fem-geeklab%2Fredfish-client-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fem-geeklab%2Fredfish-client-ts/lists"}