#create bridge brtest

curl --request PUT \
  --url http://localhost:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F8c759a10-8500-42a1-ac14-31215fca408c%2Fbridge%2Fbrtest \
  --header 'authorization: Basic YWRtaW46YWRtaW4=' \
  --header 'content-type: application/json' \
  --cookie JSESSIONID=1nmm9axlg0gp410xwo8fhg5arb \
  --data '{
  "network-topology:node": [
    {
      "node-id": "ovsdb://uuid/8c759a10-8500-42a1-ac14-31215fca408c/bridge/brtest",
      "ovsdb:bridge-name": "brtest",
      "ovsdb:protocol-entry": [
        {
          "protocol": "ovsdb:ovsdb-bridge-protocol-openflow-13"
        }
      ],
      "ovsdb:managed-by": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='\''ovsdb:1'\'']/network-topology:node[network-topology:node-id='\''ovsdb://uuid/8c759a10-8500-42a1-ac14-31215fca408c'\'']",
      "ovsdb:controller-entry": [
        {
          "target": "tcp:127.0.0.1:6653",
          "is-connected": true,
          "controller-uuid": "c39b1262-0876-4613-8bfd-c67eec1a991b"
        }
      ]
    }
  ]
}'

#create bridge brtest2
curl --request PUT \
  --url http://localhost:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F8c759a10-8500-42a1-ac14-31215fca408c%2Fbridge%2Fbrtest2 \
  --header 'authorization: Basic YWRtaW46YWRtaW4=' \
  --header 'content-type: application/json' \
  --cookie JSESSIONID=1nmm9axlg0gp410xwo8fhg5arb \
  --data '{
  "network-topology:node": [
    {
      "node-id": "ovsdb://uuid/8c759a10-8500-42a1-ac14-31215fca408c/bridge/brtest2",
      "ovsdb:bridge-name": "brtest2",
      "ovsdb:protocol-entry": [
        {
          "protocol": "ovsdb:ovsdb-bridge-protocol-openflow-13"
        }
      ],
      "ovsdb:managed-by": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='\''ovsdb:1'\'']/network-topology:node[network-topology:node-id='\''ovsdb://uuid/8c759a10-8500-42a1-ac14-31215fca408c'\'']",
      "ovsdb:controller-entry": [
        {
          "target": "tcp:127.0.0.1:6653",
          "is-connected": true,
          "controller-uuid": "c39b1262-0876-4613-8bfd-c67eec1a991b"
        }
      ]
    }
  ]
}'

#delete brtest2
curl --request DELETE \
  --url http://localhost:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F8c759a10-8500-42a1-ac14-31215fca408c%2Fbridge%2Fbrtest2 \
  --header 'authorization: Basic YWRtaW46YWRtaW4=' \
  --header 'content-type: application/json' \
  --cookie JSESSIONID=1nmm9axlg0gp410xwo8fhg5arb

