xcat2 / xcat-inventory

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

fetch node status for all nodes #208

Closed robin2008 closed 5 years ago

robin2008 commented 5 years ago

Give PATH to get all nodes status to address https://github.ibm.com/xcat2/task_management/issues/188

robin2008 commented 5 years ago
curl -X GET "http://10.6.27.1:5000/api/v2/system/nodes?type=status" -H  "accept: application/json"
[
    {
        "status": {},
        "meta": {
            "name": "abcd"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn02"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn01"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn06"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn07"
        }
    },
    {
        "status": {
            "boot": {
                "state": "standingby",
                "updated_at": "04-10-2019 22:18:20"
            }
        },
        "meta": {
            "name": "mid05tor12cn04"
        }
    },
    {
        "status": {
            "boot": {
                "state": "powering-on",
                "updated_at": "05-14-2019 01:59:19"
            },
            "sync": {
                "state": "synced",
                "updated_at": "02-13-2019 00:26:52"
            }
        },
        "meta": {
            "name": "mid05tor12cn03"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn08"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn09"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor25"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn14"
        }
    },
    {
        "status": {
            "boot": {
                "state": "booting",
                "updated_at": "12-03-2015 01:11:49"
            },
            "sync": {
                "state": "synced",
                "updated_at": "12-03-2015 02:23:15"
            }
        },
        "meta": {
            "name": "c910f05c01bc07"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "c461c026"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "c461c022"
        }
    },
    {
        "status": {
            "boot": {
                "state": "failed",
                "updated_at": "04-15-2019 12:58:15"
            },
            "sync": {
                "state": "synced",
                "updated_at": "04-09-2019 06:13:07"
            }
        },
        "meta": {
            "name": "mid05tor12cn05"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "testnode"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn11"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn10"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn13"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn12"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn15"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "ipminode"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn17"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn16"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn18"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "core01"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "node0001"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "node0002"
        }
    },
    {
        "status": {
            "boot": {
                "state": "ssh_configured",
                "updated_at": null
            }
        },
        "meta": {
            "name": "mid05tor12"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "node000211"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mgmtsw01"
class ToLogin(Resource):
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn02k02"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn16-ipmi"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "testnodes"
        }
    },
    {
        "status": {
            "boot": {
                "state": "powering-on",
                "updated_at": "10-17-2018 04:49:19"
            }
        },
        "meta": {
            "name": "node-8335-gth-1318c4a"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn05-bmc"
        }
    },
    {
        "status": {},
        "meta": {
            "name": "mid05tor12cn05-bmc-test"
        }
    }
]