cURL Commands

  • View VTNs:
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X GET 
    http://<OneController-ip>:8080/controller/nb/v2/vtn/default/vtns | python -mjson.tool
    expand icon
    Viewing VTNs
    Graphics/VTN_Screen_19.png
  • View vBridge:
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X GET 
    http:// <OneController-ip>:8080/controller/nb/v2/vtn/default/vtns/
    <your-vtn-string-here>/vbridges | python -mjson.tool
    expand icon
    Viewing vBridge
    Graphics/VTN_Screen_20.png
  • View vInterface:
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X GET 
    http:// <OneController-ip>:8080/controller/nb/v2/vtn/default/vtns/
    <your-vtn-string-here>/vbridges/<you-bridge-name-here>/interfaces | python -mjson.tool
    expand icon
    Viewing vInterface
    Graphics/VTN_Screen_21.png
  • View port maps:
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X GET 
    http:// <OneController-ip>:8080/controller/nb/v2/vtn/default/vtns/
    <your- vtn -string-here>/vbridges/<you-bridge-name-here>/interfaces/<you-vinterface1-name-here>/portmap | python -mjson.tool
    expand icon
    Viewing Port Map IF1
    Graphics/VTN_Screen_22.png
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X GET 
    http:// <OneController-ip>:8080/controller/nb/v2/vtn/default/vtns/
    <your- vtn -string-here>/vbridges/<you-bridge-name-here>/interfaces/<you-vinterface2-name-here>/portmap | python -mjson.tool
    expand icon
    Viewing Port Map IF2
    Graphics/VTN_Screen_23.png
  • Put port map:
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X PUT 
    http:// <OneController-ip>:8080/controller/nb/v2/vtn/default/vtns/
    <your- vtn -string-here>/vbridges/<you-bridge-name-here>/interfaces/
    <you-vinterface1-name-here>/portmap -d '{"vlan": "<vlan-number>", 
    "node": {"type": "OF", "id": "00:00:<switch-mac-address-here>"}, "port": 
    {"name": "<port-number>"}}'
    expand icon
    Put Port Map IF1
    Graphics/VTN_Screen_24.png
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X PUT 
    http:// <OneController-ip>:8080/controller/nb/v2/vtn/default/vtns/
    <your- vtn -string-here>/vbridges/<you-bridge-name-here>/interfaces/
    <you-vinterface2-name-here>/portmap -d '{"vlan": "<vlan-number>", 
    "node": {"type": "OF", "id": "00:00: <switch-mac-address-here>"}, 
    "port": {"name": "<port-number>"}}'
    expand icon
    Put Port Map IF2
    Graphics/VTN_Screen_25.png
  • Delete port map:
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X DELETE 
    http:// <OneController-ip>:8080/controller/nb/v2/vtn/default/vtns/
    <your- vtn -string-here>/vbridges/<you-bridge-name-here>/interfaces/
    <you-vinterface1-name-here>/portmap
    expand icon
    Delete Port Map IF1
    Graphics/VTN_Screen_26.png
    curl --user "admin":"abc123" -H "Accept: application/json" -H
     "Content-type: application/json" -X DELETE 
    http:// <OneController-ip>:8080/controller/nb/v2/vtn/default/vtns/
    <your- vtn -string-here>/vbridges/<you-bridge-name-here>/interfaces/
    <you-vinterface2-name-here>/portmap
    expand icon
    Delete Port Map IF2
    Graphics/VTN_Screen_27.png