Commit db0da0c4 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ added json examples

parent 54209d23
Loading
Loading
Loading
Loading
+143 −0
Original line number Diff line number Diff line
{
    "ieee802-dot1q-bridge:bridges": {
      "bridge": [
        {
          "name": "ne2",
          "address": "10-10-10-10-10-10",
          "bridge-type": "ieee802-dot1q-bridge:customer-vlan-bridge",
          "component": [
            {
              "name": "cv0",
              "id": 0,
              "type": "ieee802-dot1q-bridge:c-vlan-component",
              "bridge-port": [
                "eth1",
                "eth2",
                "eth3"
              ],
              "filtering-database": {
                "vlan-registration-entry": [
                  {
                    "database-id": 1,
                    "vids": "200",
                    "entry-type": "static",
                    "port-map": [
                      {
                        "port-ref": 1,
                        "static-vlan-registration-entries": {
                          "vlan-transmitted": "tagged"
                        }
                      },
                      {
                        "port-ref": 3,
                        "static-vlan-registration-entries": {
                          "vlan-transmitted": "tagged"
                        }
                      }
                    ]
                  },
                  {
                    "database-id": 1,
                    "vids": "300",
                    "entry-type": "static",
                    "port-map": [
                      {
                        "port-ref": 2,
                        "static-vlan-registration-entries": {
                          "vlan-transmitted": "untagged"
                        }
                      },
                      {
                        "port-ref": 3,
                        "static-vlan-registration-entries": {
                          "vlan-transmitted": "tagged"
                        }
                      }
                    ]
                  }
                ]
              },
              "bridge-vlan": {
                "vlan": [
                  {
                    "vid": 200,
                    "name": "E-Line 200",
                    "egress-ports": [
                      "eth1",
                      "eth3"
                    ]
                  },
                  {
                    "vid": 300,
                    "name": "E-Line 300",
                    "untagged-ports": [
                      "eth2"
                    ],
                    "egress-ports": [
                      "eth2",
                      "eth3"
                    ]
                  }
                ]
              }
            }
          ]
        }
      ]
    },
    "ietf-interfaces:interfaces": {
      "interface": [
        {
          "name": "eth1",
          "type": "iana-if-type:ethernetCsmacd",
          "oper-status": "up",
          "statistics": {
            "discontinuity-time": "2022-04-06T11:00:00+02:00"
          },
          "ieee802-dot1q-bridge:bridge-port": {
            "bridge-name": "ne2",
            "component-name": "cv0",
            "port-type": "ieee802-dot1q-bridge:c-vlan-bridge-port",
            "pvid": 1,
            "acceptable-frame": "admit-only-VLAN-tagged-frames",
            "enable-ingress-filtering": true,
            "port-number": 1
          }
        },
        {
          "name": "eth2",
          "type": "iana-if-type:ethernetCsmacd",
          "oper-status": "up",
          "statistics": {
            "discontinuity-time": "2022-04-06T11:00:00+02:00"
          },
          "ieee802-dot1q-bridge:bridge-port": {
            "bridge-name": "ne2",
            "component-name": "cv0",
            "port-type": "ieee802-dot1q-bridge:c-vlan-bridge-port",
            "pvid": 300,
            "acceptable-frame": "admit-only-untagged-and-priority-tagged",
            "enable-ingress-filtering": true,
            "port-number": 2
          }
        },
        {
          "name": "eth3",
          "type": "iana-if-type:ethernetCsmacd",
          "oper-status": "up",
          "statistics": {
            "discontinuity-time": "2022-04-06T11:00:00+02:00"
          },
          "ieee802-dot1q-bridge:bridge-port": {
            "bridge-name": "ne2",
            "component-name": "cv0",
            "port-type": "ieee802-dot1q-bridge:c-vlan-bridge-port",
            "pvid": 1,
            "acceptable-frame": "admit-only-VLAN-tagged-frames",
            "enable-ingress-filtering": true,
            "port-number": 3
          }
        }
      ]
    }
  }
 No newline at end of file
+294 −0
Original line number Diff line number Diff line
Package generated_from_e_line_examples_c_vlan_bridge_json {
    Type String
    Type TODO_RESOLVE_REFERENCED
    Use "e-line-examples-c-vlan-bridge.json" as SOURCE_MAPPING
    Type JSON_String
    Structure JSON (
        JSON_ieee802_dot1q_bridge_bridges ieee802_dot1q_bridge_bridges,
        JSON_ietf_interfaces_interfaces ietf_interfaces_interfaces
    )
    Structure JSON_ieee802_dot1q_bridge_bridges (
        JSON_bridge bridge
    )
    Collection JSON_bridge of JSON_bridge_item
    Structure JSON_bridge_item (
        JSON_String name,
        JSON_String address,
        JSON_String bridge_type,
        JSON_component ^component
    )
    Collection JSON_component of JSON_component_item
    Structure JSON_component_item (
        JSON_String name,
        JSON_String id,
        JSON_String type,
        JSON_bridge_port bridge_port,
        JSON_filtering_database filtering_database,
        JSON_bridge_vlan bridge_vlan
    )
    Collection JSON_bridge_port of JSON_String
    Structure JSON_filtering_database (
        JSON_vlan_registration_entry vlan_registration_entry
    )
    Collection JSON_vlan_registration_entry of JSON_vlan_registration_entry_item
    Structure JSON_vlan_registration_entry_item (
        JSON_String database_id,
        JSON_String vids,
        JSON_String entry_type,
        JSON_port_map port_map
    )
    Collection JSON_port_map of JSON_port_map_item
    Structure JSON_port_map_item (
        JSON_String port_ref,
        JSON_static_vlan_registration_entries static_vlan_registration_entries
    )
    Structure JSON_static_vlan_registration_entries (
        JSON_String vlan_transmitted
    )
    Structure JSON_bridge_vlan (
        JSON_vlan vlan
    )
    Collection JSON_vlan of JSON_vlan_item
    Structure JSON_vlan_item (
        JSON_String vid,
        JSON_String name,
        JSON_egress_ports egress_ports,
        JSON_untagged_ports untagged_ports
    )
    Collection JSON_egress_ports of JSON_String
    Collection JSON_untagged_ports of JSON_String
    Structure JSON_ietf_interfaces_interfaces (
        JSON_interface interface
    )
    Collection JSON_interface of JSON_interface_item
    Structure JSON_interface_item (
        JSON_String name,
        JSON_String type,
        JSON_String oper_status,
        JSON_statistics statistics,
        JSON_ieee802_dot1q_bridge_bridge_port ieee802_dot1q_bridge_bridge_port
    )
    Structure JSON_statistics (
        JSON_String discontinuity_time
    )
    Structure JSON_ieee802_dot1q_bridge_bridge_port (
        JSON_String bridge_name,
        JSON_String component_name,
        JSON_String port_type,
        JSON_String pvid,
        JSON_String acceptable_frame,
        JSON_String enable_ingress_filtering,
        JSON_String port_number
    )
    JSON JSON_instance (
        ieee802_dot1q_bridge_bridges = (
            bridge = [
                (
                    name = "ne2",
                    address = "10-10-10-10-10-10",
                    bridge_type = "ieee802-dot1q-bridge:customer-vlan-bridge",
                    ^component = [
                        (
                            name = "cv0",
                            id = "0",
                            type = "ieee802-dot1q-bridge:c-vlan-component",
                            bridge_port = [
                                "eth1",
                                "eth2",
                                "eth3"
                            ],
                            filtering_database = (
                                vlan_registration_entry = [
                                    (
                                        database_id = "1",
                                        vids = "200",
                                        entry_type = "static",
                                        port_map = [
                                            (
                                                port_ref = "1",
                                                static_vlan_registration_entries = (
                                                    vlan_transmitted = "tagged"
                                                )
                                            ),
                                            (
                                                port_ref = "3",
                                                static_vlan_registration_entries = (
                                                    vlan_transmitted = "tagged"
                                                )
                                            )
                                        ]
                                    ),
                                    (
                                        database_id = "1",
                                        vids = "300",
                                        entry_type = "static",
                                        port_map = [
                                            (
                                                port_ref = "2",
                                                static_vlan_registration_entries = (
                                                    vlan_transmitted = "untagged"
                                                )
                                            ),
                                            (
                                                port_ref = "3",
                                                static_vlan_registration_entries = (
                                                    vlan_transmitted = "tagged"
                                                )
                                            )
                                        ]
                                    )
                                ]
                            ),
                            bridge_vlan = (
                                vlan = [
                                    (
                                        vid = "200",
                                        name = "E-Line 200",
                                        egress_ports = [
                                            "eth1",
                                            "eth3"
                                        ]
                                    ),
                                    (
                                        vid = "300",
                                        name = "E-Line 300",
                                        untagged_ports = [
                                            "eth2"
                                        ],
                                        egress_ports = [
                                            "eth2",
                                            "eth3"
                                        ]
                                    )
                                ]
                            )
                        )
                    ]
                )
            ]
        ),
        ietf_interfaces_interfaces = (
            interface = [
                (
                    name = "eth1",
                    type = "iana-if-type:ethernetCsmacd",
                    oper_status = "up",
                    statistics = (
                        discontinuity_time = "2022-04-06T11:00:00+02:00"
                    ),
                    ieee802_dot1q_bridge_bridge_port = (
                        bridge_name = "ne2",
                        component_name = "cv0",
                        port_type = "ieee802-dot1q-bridge:c-vlan-bridge-port",
                        pvid = "1",
                        acceptable_frame = "admit-only-VLAN-tagged-frames",
                        enable_ingress_filtering = "true",
                        port_number = "1"
                    )
                ),
                (
                    name = "eth2",
                    type = "iana-if-type:ethernetCsmacd",
                    oper_status = "up",
                    statistics = (
                        discontinuity_time = "2022-04-06T11:00:00+02:00"
                    ),
                    ieee802_dot1q_bridge_bridge_port = (
                        bridge_name = "ne2",
                        component_name = "cv0",
                        port_type = "ieee802-dot1q-bridge:c-vlan-bridge-port",
                        pvid = "300",
                        acceptable_frame = "admit-only-untagged-and-priority-tagged",
                        enable_ingress_filtering = "true",
                        port_number = "2"
                    )
                ),
                (
                    name = "eth3",
                    type = "iana-if-type:ethernetCsmacd",
                    oper_status = "up",
                    statistics = (
                        discontinuity_time = "2022-04-06T11:00:00+02:00"
                    ),
                    ieee802_dot1q_bridge_bridge_port = (
                        bridge_name = "ne2",
                        component_name = "cv0",
                        port_type = "ieee802-dot1q-bridge:c-vlan-bridge-port",
                        pvid = "1",
                        acceptable_frame = "admit-only-VLAN-tagged-frames",
                        enable_ingress_filtering = "true",
                        port_number = "3"
                    )
                )
            ]
        )
    )
    Map JSON to "JSON" in SOURCE_MAPPING as JSON_SOURCE_MAPPING {
        ieee802_dot1q_bridge_bridges -> "ieee802-dot1q-bridge:bridges",
        ietf_interfaces_interfaces -> "ietf-interfaces:interfaces"
    }
    Map JSON_ieee802_dot1q_bridge_bridges to "JSON.ieee802-dot1q-bridge:bridges" in SOURCE_MAPPING as JSON_ieee802_dot1q_bridge_bridges_SOURCE_MAPPING {
        bridge -> "bridge"
    }
    Map JSON_bridge_item to "JSON.bridge.item" in SOURCE_MAPPING as JSON_bridge_item_SOURCE_MAPPING {
        name -> "name",
        address -> "address",
        bridge_type -> "bridge-type",
        ^component -> "component"
    }
    Map JSON_component_item to "JSON.component.item" in SOURCE_MAPPING as JSON_component_item_SOURCE_MAPPING {
        name -> "name",
        id -> "id",
        type -> "type",
        bridge_port -> "bridge-port",
        filtering_database -> "filtering-database",
        bridge_vlan -> "bridge-vlan"
    }
    Map JSON_filtering_database to "JSON.filtering-database" in SOURCE_MAPPING as JSON_filtering_database_SOURCE_MAPPING {
        vlan_registration_entry -> "vlan-registration-entry"
    }
    Map JSON_vlan_registration_entry_item to "JSON.vlan-registration-entry.item" in SOURCE_MAPPING as JSON_vlan_registration_entry_item_SOURCE_MAPPING {
        database_id -> "database-id",
        vids -> "vids",
        entry_type -> "entry-type",
        port_map -> "port-map"
    }
    Map JSON_port_map_item to "JSON.port-map.item" in SOURCE_MAPPING as JSON_port_map_item_SOURCE_MAPPING {
        port_ref -> "port-ref",
        static_vlan_registration_entries -> "static-vlan-registration-entries"
    }
    Map JSON_static_vlan_registration_entries to "JSON.static-vlan-registration-entries" in SOURCE_MAPPING as JSON_static_vlan_registration_entries_SOURCE_MAPPING {
        vlan_transmitted -> "vlan-transmitted"
    }
    Map JSON_bridge_vlan to "JSON.bridge-vlan" in SOURCE_MAPPING as JSON_bridge_vlan_SOURCE_MAPPING {
        vlan -> "vlan"
    }
    Map JSON_vlan_item to "JSON.vlan.item" in SOURCE_MAPPING as JSON_vlan_item_SOURCE_MAPPING {
        vid -> "vid",
        name -> "name",
        egress_ports -> "egress-ports",
        untagged_ports -> "untagged-ports"
    }
    Map JSON_ietf_interfaces_interfaces to "JSON.ietf-interfaces:interfaces" in SOURCE_MAPPING as JSON_ietf_interfaces_interfaces_SOURCE_MAPPING {
        interface -> "interface"
    }
    Map JSON_interface_item to "JSON.interface.item" in SOURCE_MAPPING as JSON_interface_item_SOURCE_MAPPING {
        name -> "name",
        type -> "type",
        oper_status -> "oper-status",
        statistics -> "statistics",
        ieee802_dot1q_bridge_bridge_port -> "ieee802-dot1q-bridge:bridge-port"
    }
    Map JSON_statistics to "JSON.statistics" in SOURCE_MAPPING as JSON_statistics_SOURCE_MAPPING {
        discontinuity_time -> "discontinuity-time"
    }
    Map JSON_ieee802_dot1q_bridge_bridge_port to "JSON.ieee802-dot1q-bridge:bridge-port" in SOURCE_MAPPING as JSON_ieee802_dot1q_bridge_bridge_port_SOURCE_MAPPING {
        bridge_name -> "bridge-name",
        component_name -> "component-name",
        port_type -> "port-type",
        pvid -> "pvid",
        acceptable_frame -> "acceptable-frame",
        enable_ingress_filtering -> "enable-ingress-filtering",
        port_number -> "port-number"
    }
}
 No newline at end of file
+277 −0

File added.

Preview size limit exceeded, changes collapsed.

+458 −0

File added.

Preview size limit exceeded, changes collapsed.

+40 −0
Original line number Diff line number Diff line
{
  "authors": [
    {
      "name": "Alfonso"
    },
    {
      "name": "Alfred"
    }
  ],
  "books": [
    {
      "title": "Book One",
      "authors": [
        {
          "name": "Author One"
        },
        {
          "name": "Author Two"
        }
      ]
    },
    {
      "title": "Book Two",
      "authors": [
        {
          "name": "Alfonso"
        }
      ]
    },
    {
      "title": "Book Three",
   	  "year": "2022",
      "authors": [
        {
          "name": "Alfred"
        }
      ]
    }
  ]
}
 No newline at end of file
Loading