xcat2 / xcat-inventory

An inventory tool for xcat cluster
8 stars 16 forks source link

Node list API #201

Closed robin2008 closed 5 years ago

robin2008 commented 5 years ago

This is for https://github.ibm.com/xcat2/task_management/issues/146

Not required filters here as it is planned the noderange API for it later.

robin2008 commented 5 years ago

The order is required to be handled in CLI, or later when we supporting the pagenation.

time nodels
abcd
c461c022
c461c026
c910f05c01bc07
core01
ipminode
mgmtsw01
mid05
mid05tor12
mid05tor12cn01
mid05tor12cn02
mid05tor12cn02k02
mid05tor12cn03
mid05tor12cn04
mid05tor12cn05
mid05tor12cn05-bmc
mid05tor12cn05-bmc-test
mid05tor12cn06
mid05tor12cn07
mid05tor12cn08
mid05tor12cn09
mid05tor12cn10
mid05tor12cn11
mid05tor12cn12
mid05tor12cn13
mid05tor12cn14
mid05tor12cn15
mid05tor12cn16
mid05tor12cn16-ipmi
mid05tor12cn17
mid05tor12cn18
mid05tor25
node-8335-gth-1318c4a
node0001
node0002
testnode
testnodes

real    0m0.248s
user    0m0.119s
sys 0m0.000s
time curl -X GET "http://10.6.27.1:5000/api/v2/system/nodes" -H  "accept: application/json"
[
    "abcd",
    "mid05tor12cn02",
    "mid05tor12cn01",
    "mid05tor12cn06",
    "mid05tor12cn07",
    "mid05tor12cn04",
    "mid05tor12cn03",
    "mid05tor12cn08",
    "mid05tor12cn09",
    "mid05tor25",
    "mid05",
    "mid05tor12cn14",
    "c910f05c01bc07",
    "c461c026",
    "c461c022",
    "mid05tor12cn05",
    "testnode",
    "mid05tor12cn11",
    "mid05tor12cn10",
    "mid05tor12cn13",
    "mid05tor12cn12",
    "mid05tor12cn15",
    "ipminode",
    "mid05tor12cn17",
    "mid05tor12cn16",
    "mid05tor12cn18",
    "core01",
    "node0001",
    "node0002",
    "mid05tor12",
    "mgmtsw01",
    "mid05tor12cn02k02",
    "mid05tor12cn16-ipmi",
    "testnodes",
    "node-8335-gth-1318c4a",
    "mid05tor12cn05-bmc",
    "mid05tor12cn05-bmc-test"
]

real    0m0.007s
user    0m0.004s
sys 0m0.000s
bybai commented 5 years ago

I am ok to merge it.