Project

General

Profile

Actions

ConfigFileFormat

File Format v2.0

Topology Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "/",
  "type": "object",
  "properties": {
    "hosts": {
      "id": "hosts",
      "type": "array",
      "items": [],
      "description": "Array of hosts in the topology"
    },
    "links": {
      "id": "links",
      "type": "array",
      "items": [],
      "description": "Array of links in the topology"
    },
    "routers": {
      "id": "routers",
      "type": "array",
      "items": [],
      "description": "Array of routers in the topology"
    },
    "switches": {
      "id": "switches",
      "type": "array",
      "items": [],
      "description": "Array of switches in the topology"
    },
    "version": {
      "id": "version",
      "type": "string",
      "description": "File format version"
    }
  },
  "required": [
    "hosts",
    "links",
    "routers",
    "switches",
    "version"
  ]
}

Host Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "Host",
  "type": "object",
  "properties": {
    "number": {
      "id": "number",
      "type": "string"
    },
    "opts": {
      "id": "opts",
      "type": "object",
      "properties": {
        "cpu": {
          "id": "cpu",
          "type": "string"
        },
        "hostname": {
          "id": "hostname",
          "type": "string"
        },
        "mem": {
          "id": "mem",
          "type": "string"
        },
        "nfd": {
          "id": "nfd",
          "type": "object",
          "properties": {
            "log-level": {
              "id": "log-level",
              "type": "string"
            }
          }
        },
        "nlsr": {
          "id": "nlsr",
          "type": "object",
          "properties": {
            "angle": {
              "id": "angle",
              "type": "string"
            },
            "hyperbolic-state": {
              "id": "hyperbolic-state",
              "type": "string"
            },
            "log-level": {
              "id": "log-level",
              "type": "string"
            },
            "max-faces-per-prefix": {
              "id": "max-faces-per-prefix",
              "type": "string"
            },
            "network": {
              "id": "network",
              "type": "string"
            },
            "radius": {
              "id": "radius",
              "type": "string"
            },
            "router": {
              "id": "router",
              "type": "string"
            },
            "site": {
              "id": "site",
              "type": "string"
            }
          }
        },
        "nodeNum": {
          "id": "nodeNum",
          "type": "integer"
        }
      },
      "required": [
        "hostname",
        "nodeNum"
      ]
    },
    "x": {
      "id": "x",
      "type": "string"
    },
    "y": {
      "id": "y",
      "type": "string"
    }
  },
  "required": [
    "number",
    "opts",
    "x",
    "y"
  ],
  "description": "Configuration for a single host"
}

Link Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "Link",
  "type": "object",
  "properties": {
    "dest": {
      "id": "dest",
      "type": "string"
    },
    "opts": {
      "id": "opts",
      "type": "object",
      "properties": {
        "bw": {
          "id": "bw",
          "type": "integer"
        },
        "delay": {
          "id": "delay",
          "type": "string"
        },
        "loss": {
          "id": "loss",
          "type": "integer"
        }
      }
    },
    "src": {
      "id": "src",
      "type": "string"
    }
  },
  "required": [
    "dest",
    "opts",
    "src"
  ]
}

Switch Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "/",
  "type": "object",
  "properties": {
    "number": {
      "id": "number",
      "type": "string"
    },
    "opts": {
      "id": "opts",
      "type": "object",
      "properties": {
        "hostname": {
          "id": "hostname",
          "type": "string"
        },
        "nodeNum": {
          "id": "nodeNum",
          "type": "integer"
        }
      },
      "required": [
        "hostname",
        "nodeNum"
      ]
    },
    "x": {
      "id": "x",
      "type": "string"
    },
    "y": {
      "id": "y",
      "type": "string"
    }
  },
  "required": [
    "number",
    "opts",
    "x",
    "y"
  ]
}

Updated by Vince Lehman almost 5 years ago · 5 revisions