Skip to content

Latest commit

 

History

History
24 lines (24 loc) · 715 Bytes

proof_of_concept_opzioni.md

File metadata and controls

24 lines (24 loc) · 715 Bytes

Proof of concept: struttura dati che contiene la configurazione dello switch

La nuova versione dello switch potrebbe produrre un file json, strutturato nel seguente modo:

{
  "ds" : [{
    "showinfo" : {
      "type" : "command",
      "syntax" : "",
      "info" : "show ds info",
    },
    "help" : {
      "type" : "command",
      "syntax" : "[arg]",
      "info" : "Help (limited to arg when specified)",
    },
    ...
  }],
  "debug" : [
    ...
  ],
  ...
}

La nuova versione di vdetelweb quindi potrebbe prendere il file da una posizione nota (per esempio /etc/vde/vdeswitch/settings.json) e parsarlo (attraverso una libreria come jsmn) e creare il menù.