# crush

CRUSH map and rule management.
Set management node URL:

# GET /crush/rules/classes

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush/rules/classes

# Response 200

# Example response

[
  "string"
]

# POST /crush/rules/simple

# Parameters

  • bodyobjectoptional-
    • namestringoptional-
    • startBucketstringoptional-
    • independentstringoptional-
    • deviceClassstringoptional-
    • erasureCodingbooleanoptional-

# Endpoint

curl -X POST http://mgmt-node:8080/api/crush/rules/simple

# Example body

{
  "name": "string",
  "startBucket": "string",
  "independent": "string",
  "deviceClass": "string",
  "erasureCoding": true
}

# POST /crush/rules/ssdPrimary

# Parameters

  • bodyobjectoptional-
    • namestringoptional-
    • ssdStartBucketstringoptional-
    • ssdIndependentstringoptional-
    • ssdDeviceClassstringoptional-
    • hddStartBucketstringoptional-
    • hddIndependentstringoptional-
    • hddDeviceClassstringoptional-
    • ssdCopiesintegeroptional-

# Endpoint

curl -X POST http://mgmt-node:8080/api/crush/rules/ssdPrimary

# Example body

{
  "name": "string",
  "ssdStartBucket": "string",
  "ssdIndependent": "string",
  "ssdDeviceClass": "string",
  "hddStartBucket": "string",
  "hddIndependent": "string",
  "hddDeviceClass": "string",
  "ssdCopies": 0
}

# GET /crush/ec-profiles

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush/ec-profiles

# Response 200

# Example response

{}

# GET /crush/destroyed-osd-ids

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush/destroyed-osd-ids

# Response 200

  • destroyedOsdsarrayoptional-
    • idintegeroptional-
    • hoststringoptional-

# Example response

{
  "destroyedOsds": [
    {
      "id": 0,
      "host": "string"
    }
  ]
}

# GET /crush

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush

# Response 200

  • nodesarrayoptional-
    • idintegeroptional-
    • namestringoptional-
    • statusstringoptional[UP, DOWN, DESTROYED, UNKNOWN]
    • typestringoptional[OSD, HOST, CHASSIS, RACK, ROW, PDU, POD, ROOM, DATACENTER, REGION, ROOT, UNKNOWN]
    • childrenarrayoptional-
    • deviceClassstringoptional-
    • sizeintegeroptional-
    • usedintegeroptional-
    • reweightnumberoptional-
    • diskIdintegeroptional-
    • serverIdintegeroptional-
  • strayarrayoptional-
    • idintegeroptional-
    • namestringoptional-
    • statusstringoptional[UP, DOWN, DESTROYED, UNKNOWN]
    • typestringoptional[OSD, HOST, CHASSIS, RACK, ROW, PDU, POD, ROOM, DATACENTER, REGION, ROOT, UNKNOWN]
    • childrenarrayoptional-
    • deviceClassstringoptional-
    • sizeintegeroptional-
    • usedintegeroptional-
    • reweightnumberoptional-
    • diskIdintegeroptional-
    • serverIdintegeroptional-

# Example response

{
  "nodes": [
    {
      "id": 0,
      "name": "string",
      "status": "UP",
      "type": "OSD",
      "children": [
        0
      ],
      "deviceClass": "string",
      "size": 0,
      "used": 0,
      "reweight": ,
      "diskId": 0,
      "serverId": 0
    }
  ],
  "stray": [
    {
      "id": 0,
      "name": "string",
      "status": "UP",
      "type": "OSD",
      "children": [
        0
      ],
      "deviceClass": "string",
      "size": 0,
      "used": 0,
      "reweight": ,
      "diskId": 0,
      "serverId": 0
    }
  ]
}

# POST /crush

# Parameters

  • bodyobjectoptional-
    • nodesarrayoptional-
      • idintegeroptional-
      • namestringoptional-
      • statusstringoptional[UP, DOWN, DESTROYED, UNKNOWN]
      • typestringoptional[OSD, HOST, CHASSIS, RACK, ROW, PDU, POD, ROOM, DATACENTER, REGION, ROOT, UNKNOWN]
      • childrenarrayoptional-
      • deviceClassstringoptional-
      • sizeintegeroptional-
      • usedintegeroptional-
      • reweightnumberoptional-
      • diskIdintegeroptional-
      • serverIdintegeroptional-
    • strayarrayoptional-
      • idintegeroptional-
      • namestringoptional-
      • statusstringoptional[UP, DOWN, DESTROYED, UNKNOWN]
      • typestringoptional[OSD, HOST, CHASSIS, RACK, ROW, PDU, POD, ROOM, DATACENTER, REGION, ROOT, UNKNOWN]
      • childrenarrayoptional-
      • deviceClassstringoptional-
      • sizeintegeroptional-
      • usedintegeroptional-
      • reweightnumberoptional-
      • diskIdintegeroptional-
      • serverIdintegeroptional-

# Endpoint

curl -X POST http://mgmt-node:8080/api/crush

# Example body

{
  "nodes": [
    {
      "id": 0,
      "name": "string",
      "status": "UP",
      "type": "OSD",
      "children": [
        0
      ],
      "deviceClass": "string",
      "size": 0,
      "used": 0,
      "reweight": ,
      "diskId": 0,
      "serverId": 0
    }
  ],
  "stray": [
    {
      "id": 0,
      "name": "string",
      "status": "UP",
      "type": "OSD",
      "children": [
        0
      ],
      "deviceClass": "string",
      "size": 0,
      "used": 0,
      "reweight": ,
      "diskId": 0,
      "serverId": 0
    }
  ]
}

# Response 200

  • idintegeroptional-
  • descriptionstringoptional-
  • createdByobjectoptional-
    • idintegeroptional-
    • namestringoptional-
  • affectedObjectstringoptional-
  • changesarrayoptional-
    • typestringoptional-
  • statestringoptional[PENDING, APPROVED, REJECTED]

# Example response

{
  "id": 0,
  "description": "string",
  "createdBy": {
    "id": 0,
    "name": "string"
  },
  "affectedObject": "string",
  "changes": [
    {
      "type": "string"
    }
  ],
  "state": "PENDING"
}

# DELETE /crush/rules/{name}

# Parameters

  • namestringpath-

# Endpoint

curl -X DELETE http://mgmt-node:8080/api/crush/rules/{name}

# GET /crush/rules

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush/rules

# Response 200

  • idintegeroptional-
  • namestringoptional-
  • typestringoptional[REPLICATED, ERASURE]
  • minSizeintegeroptional-
  • maxSizeintegeroptional-
  • stepsarrayoptional-
    • opstringoptional[TAKE, CHOOSE, CHOOSE_INDEP, CHOOSELEAF, CHOOSELEAF_INDEP, EMIT, NOOP, UNKNOWN, TUNING]
    • crushMapTextFormatstringoptional-

# Example response

[
  {
    "id": 0,
    "name": "string",
    "type": "REPLICATED",
    "minSize": 0,
    "maxSize": 0,
    "steps": [
      {
        "op": "TAKE",
        "crushMapTextFormat": "string"
      }
    ]
  }
]