Changes between Version 1 and Version 2 of DataElementDesign


Ignore:
Timestamp:
Jan 20, 2010, 8:48:19 AM (8 years ago)
Author:
jelte
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataElementDesign

    v1 v2  
    6060                                        // mandatory if "optional"
    6161                                        // is false
    62   "map_spec":           [ <data_item_spec> ],   // only for maps
    63   "list_spec":          <data_item_spec>        // only for lists
     62  "map_item_spec":      [ <data_item_spec> ],   // only for maps
     63  "list_item_spec":     <data_item_spec>        // only for lists
    6464}
    6565
     
    7373== Example ==
    7474
    75 (note: this example contains zone_add and zone_delete, however these are typically actions that are not performed directly, but rather through configuration changes. this will be updated as soon as it is supported)
     75This is the current version of the parkinglot.spec file. The print_message command is an example of a supported command, that has no real use apart from commands. It is included because the parkinglot currently has no direct commands.
     76
    7677{{{
    7778{
     
    9697          "item_default": ""
    9798        }
     99      },
     100      {
     101        "item_name": "a_records",
     102        "item_type": "list",
     103        "item_optional": false,
     104        "item_default": [ "127.0.0.1" ],
     105        "list_item_spec": {
     106          "item_name": "address",
     107          "item_type": "string",
     108          "item_optional": false,
     109          "item_default": ""
     110        }
     111      },
     112      {
     113        "item_name": "aaaa_records",
     114        "item_type": "list",
     115        "item_optional": false,
     116        "item_default": [ "::1" ],
     117        "list_item_spec": {
     118          "item_name": "address",
     119          "item_type": "string",
     120          "item_optional": false,
     121          "item_default": ""
     122        }
     123      },
     124      {
     125        "item_name": "ns_records",
     126        "item_type": "list",
     127        "item_optional": false,
     128        "item_default": [ "ns1.parking.example", "ns2.parking.example" ],
     129        "list_item_spec": {
     130          "item_name": "address",
     131          "item_type": "string",
     132          "item_optional": false,
     133          "item_default": ""
     134        }
    98135      }
    99136    ],
    100137    "commands": [
    101138      {
    102         "command_name": "zone_add",
     139        "command_name": "print_message",
     140        "command_description": "Print the given message to stdout",
    103141        "command_args": [ {
    104           "item_name": "zone_name",
    105           "item_type": "string",
    106           "item_optional": False,
    107           "item_default": ""
    108         } ]
    109       },
    110       {
    111         "command_name": "zone_delete",
    112         "command_args": [ {
    113           "item_name": "zone_name",
     142          "item_name": "message",
    114143          "item_type": "string",
    115144          "item_optional": False,
     
    120149  }
    121150}
    122 
    123151}}}
    124152