From 6edafc65f2d9c2559e6897e96026970bbac81500 Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Mon, 1 Aug 2016 09:49:36 +0800 Subject: [PATCH] Switch to use new ovs nsh version https://github.com/yyang13/ovs_nsh_patches ovs 2.5.90 commit 7d433ae57ebb90cd68e8fa948a096f619ac4e2d8 + Intel NSH and VxLAN-gpe patches Change-Id: If15e1af18f28f76567ac2591db30ac719ed072ca Signed-off-by: Yi Yang Signed-off-by: Tomas Cechvala --- demos/gbpsfc-env/Vagrantfile | 12 ++++++------ demos/gbpsfc-env/bootstrap.sh | 2 +- .../demo-asymmetric-chain/get-nsps.py | 8 +++++++- .../infrastructure_config.py | 16 ++++++++-------- demos/gbpsfc-env/demo-asymmetric-chain/rest.py | 18 ++++++++++-------- .../demo-asymmetric-chain/sf-config.sh | 2 +- .../demo-asymmetric-chain/sf-flows.sh | 4 ++-- .../infrastructure_config.py | 12 ++++++------ .../demo-asymmetric-coexistence/rest.py | 16 ++++++++-------- .../demo-gbp1/infrastructure_config.py | 16 ++++++++-------- demos/gbpsfc-env/demo-gbp1/rest.py | 16 ++++++++-------- .../demo-gbp2/infrastructure_config.py | 16 ++++++++-------- demos/gbpsfc-env/demo-gbp2/rest.py | 16 ++++++++-------- .../demo-symmetric-chain/get-nsps.py | 8 +++++++- .../infrastructure_config.py | 16 ++++++++-------- demos/gbpsfc-env/demo-symmetric-chain/rest.py | 18 ++++++++++-------- .../demo-symmetric-chain/sf-config.sh | 2 +- .../demo-symmetric-chain/sf-flows.sh | 4 ++-- .../infrastructure_config.py | 12 ++++++------ .../demo-symmetric-coexistence/rest.py | 16 ++++++++-------- demos/gbpsfc-env/infrastructure_launch.py | 1 + 21 files changed, 124 insertions(+), 107 deletions(-) diff --git a/demos/gbpsfc-env/Vagrantfile b/demos/gbpsfc-env/Vagrantfile index 65c3025c2..fd94b9f89 100644 --- a/demos/gbpsfc-env/Vagrantfile +++ b/demos/gbpsfc-env/Vagrantfile @@ -1,4 +1,3 @@ - # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" @@ -8,6 +7,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vb.memory = "512" end # run our bootstrapping for the system + config.vm.provision 'shell', path: 'bootstrap.sh', :args => odl num_nodes = (ENV['NUM_NODES'] || 1).to_i # ip configuration @@ -22,16 +22,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vm_ip = ips[n] vm_ip_sflow = ips_sflow[n] vm_index = n+1 - compute.vm.box = "alagalah/gbpsfc-trusty64" - compute.vm.box_version = "1.0.1" + compute.vm.box = "ubuntu/trusty64" + compute.vm.box_version = "20160729.0.0" compute.vm.hostname = "gbpsfc#{vm_index}" compute.vm.network "private_network", ip: "#{vm_ip}" compute.vm.network "private_network", ip: "#{vm_ip_sflow}" compute.vm.provider :virtualbox do |vb| - vb.memory = 512 - vb.customize ["modifyvm", :id, "--ioapic", "on"] + vb.memory = 2048 + vb.customize ["modifyvm", :id, "--ioapic", "on"] vb.cpus = 1 end end end -end +end \ No newline at end of file diff --git a/demos/gbpsfc-env/bootstrap.sh b/demos/gbpsfc-env/bootstrap.sh index dbc43b909..d116d797c 100755 --- a/demos/gbpsfc-env/bootstrap.sh +++ b/demos/gbpsfc-env/bootstrap.sh @@ -20,7 +20,7 @@ EOL docker pull alagalah/odlpoc_ovs230 # OVS -curl https://raw.githubusercontent.com/pritesh/ovs/nsh-v8/third-party/start-ovs-deb.sh | bash +curl https://raw.githubusercontent.com/yyang13/ovs_nsh_patches/master/start-ovs-deb.sh | bash # this part is just for local spinup DON'T copy it to releng bootstrap.sh pip install ipaddr diff --git a/demos/gbpsfc-env/demo-asymmetric-chain/get-nsps.py b/demos/gbpsfc-env/demo-asymmetric-chain/get-nsps.py index 9fb91cb05..06393350b 100755 --- a/demos/gbpsfc-env/demo-asymmetric-chain/get-nsps.py +++ b/demos/gbpsfc-env/demo-asymmetric-chain/get-nsps.py @@ -4,6 +4,7 @@ import requests,json from requests.auth import HTTPBasicAuth import sys import os +import time from subprocess import check_output from infrastructure_config import * @@ -13,9 +14,14 @@ USERNAME='admin' PASSWORD='admin' def get(host, port, uri): + proxies = { + "http": None, + "https": None + } + url='http://'+host+":"+port+uri #print url - r = requests.get(url, auth=HTTPBasicAuth(USERNAME, PASSWORD)) + r = requests.get(url, proxies=proxies, auth=HTTPBasicAuth(USERNAME, PASSWORD)) jsondata=json.loads(r.text) return jsondata diff --git a/demos/gbpsfc-env/demo-asymmetric-chain/infrastructure_config.py b/demos/gbpsfc-env/demo-asymmetric-chain/infrastructure_config.py index efdcfc98f..2662654ef 100755 --- a/demos/gbpsfc-env/demo-asymmetric-chain/infrastructure_config.py +++ b/demos/gbpsfc-env/demo-asymmetric-chain/infrastructure_config.py @@ -30,35 +30,35 @@ defaultContainerImage='alagalah/odlpoc_ovs230' #Note that tenant name and endpointGroup name come from policy_config.py -hosts = [{'name': 'h35_2', +hosts = [{'name': 'h35-2', 'mac': '00:00:00:00:35:02', 'ip': '10.0.35.2/24', 'switch': 'sw1'}, - {'name': 'h35_3', + {'name': 'h35-3', 'ip': '10.0.35.3/24', 'mac': '00:00:00:00:35:03', 'switch': 'sw1'}, - {'name': 'h35_4', + {'name': 'h35-4', 'ip': '10.0.35.4/24', 'mac': '00:00:00:00:35:04', 'switch': 'sw6'}, - {'name': 'h35_5', + {'name': 'h35-5', 'ip': '10.0.35.5/24', 'mac': '00:00:00:00:35:05', 'switch': 'sw6'}, - {'name': 'h36_2', + {'name': 'h36-2', 'ip': '10.0.36.2/24', 'mac': '00:00:00:00:36:02', 'switch': 'sw1'}, - {'name': 'h36_3', + {'name': 'h36-3', 'ip': '10.0.36.3/24', 'mac': '00:00:00:00:36:03', 'switch': 'sw1'}, - {'name': 'h36_4', + {'name': 'h36-4', 'ip': '10.0.36.4/24', 'mac': '00:00:00:00:36:04', 'switch': 'sw6'}, - {'name': 'h36_5', + {'name': 'h36-5', 'ip': '10.0.36.5/24', 'mac': '00:00:00:00:36:05', 'switch': 'sw6'} diff --git a/demos/gbpsfc-env/demo-asymmetric-chain/rest.py b/demos/gbpsfc-env/demo-asymmetric-chain/rest.py index baf88ba84..f88cc6e29 100755 --- a/demos/gbpsfc-env/demo-asymmetric-chain/rest.py +++ b/demos/gbpsfc-env/demo-asymmetric-chain/rest.py @@ -138,6 +138,7 @@ def get_service_function_forwarders_data(): "ip": "192.168.50.71" }, "service-function-forwarder-ovs:ovs-options": { + "exts": "gpe", "remote-ip": "flow", "dst-port": "6633", "key": "flow", @@ -175,6 +176,7 @@ def get_service_function_forwarders_data(): "ip": "192.168.50.73" }, "service-function-forwarder-ovs:ovs-options": { + "exts": "gpe", "remote-ip": "flow", "dst-port": "6633", "key": "flow", @@ -535,7 +537,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_2", + "port-name": "vethl-h36-2", "tenant": "tenant-red" } }, @@ -551,7 +553,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], -"port-name": "vethl-h35_2", +"port-name": "vethl-h35-2", "tenant": "tenant-red" } }, @@ -571,7 +573,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_3", + "port-name": "vethl-h35-3", "tenant": "tenant-red" } }, @@ -591,7 +593,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_3", + "port-name": "vethl-h36-3", "tenant": "tenant-red" } }, @@ -611,7 +613,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_4", + "port-name": "vethl-h36-4", "tenant": "tenant-red" } }, @@ -631,7 +633,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_4", + "port-name": "vethl-h35-4", "tenant": "tenant-red" } }, @@ -651,7 +653,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_5", + "port-name": "vethl-h35-5", "tenant": "tenant-red" } }, @@ -671,7 +673,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_5", + "port-name": "vethl-h36-5", "tenant": "tenant-red" } }] diff --git a/demos/gbpsfc-env/demo-asymmetric-chain/sf-config.sh b/demos/gbpsfc-env/demo-asymmetric-chain/sf-config.sh index b06a75643..5f73540f8 100755 --- a/demos/gbpsfc-env/demo-asymmetric-chain/sf-config.sh +++ b/demos/gbpsfc-env/demo-asymmetric-chain/sf-config.sh @@ -14,4 +14,4 @@ else fi sudo ovs-vsctl add-br $sw -sudo ovs-vsctl add-port $sw $sw-vxlangpe-0 -- set interface $sw-vxlangpe-0 type=vxlan options:remote_ip=flow options:dst_port=6633 options:nshc1=flow options:nshc2=flow options:nshc3=flow options:nshc4=flow options:nsp=flow options:nsi=flow options:key=flow +sudo ovs-vsctl add-port $sw $sw-vxlangpe-0 -- set interface $sw-vxlangpe-0 type=vxlan options:exts=gpe options:remote_ip=flow options:dst_port=6633 options:nshc1=flow options:nshc2=flow options:nshc3=flow options:nshc4=flow options:nsp=flow options:nsi=flow options:key=flow diff --git a/demos/gbpsfc-env/demo-asymmetric-chain/sf-flows.sh b/demos/gbpsfc-env/demo-asymmetric-chain/sf-flows.sh index f4ee6497d..b7816c223 100755 --- a/demos/gbpsfc-env/demo-asymmetric-chain/sf-flows.sh +++ b/demos/gbpsfc-env/demo-asymmetric-chain/sf-flows.sh @@ -16,5 +16,5 @@ fi # delete NORMAL, if present nsphex=`printf "%x\n" $nsp` sudo ovs-ofctl --strict del-flows $sw priority=0 -sudo ovs-ofctl add-flow $sw "priority=1000,nsi=255 actions=move:NXM_NX_NSH_C1[]->NXM_NX_NSH_C1[],move:NXM_NX_NSH_C2[]->NXM_NX_NSH_C2[],move:NXM_NX_TUN_ID[0..31]->NXM_NX_TUN_ID[0..31],load:$TUNNEL->NXM_NX_TUN_IPV4_DST[],set_nsi:254,IN_PORT" -OOpenFlow13 -sudo ovs-ofctl add-flow $sw "priority=1000,nsi=254 actions=move:NXM_NX_NSH_C1[]->NXM_NX_NSH_C1[],move:NXM_NX_NSH_C2[]->NXM_NX_NSH_C2[],move:NXM_NX_TUN_ID[0..31]->NXM_NX_TUN_ID[0..31],load:$TUNNEL->NXM_NX_TUN_IPV4_DST[],set_nsi:253,IN_PORT" -OOpenFlow13 +sudo ovs-ofctl add-flow $sw "priority=1000,nsi=255 actions=move:NXM_NX_NSH_MDTYPE[]->NXM_NX_NSH_MDTYPE[],move:NXM_NX_NSH_NP[]->NXM_NX_NSH_NP[],move:NXM_NX_NSP[]->NXM_NX_NSP[],load:254->NXM_NX_NSI[],move:NXM_NX_NSH_C1[]->NXM_NX_NSH_C1[],move:NXM_NX_NSH_C2[]->NXM_NX_NSH_C2[],move:NXM_NX_TUN_ID[0..31]->NXM_NX_TUN_ID[0..31],load:$TUNNEL->NXM_NX_TUN_IPV4_DST[],load:0x4->NXM_NX_TUN_GPE_NP[],IN_PORT" -OOpenFlow13 +sudo ovs-ofctl add-flow $sw "priority=1000,nsi=254 actions=move:NXM_NX_NSH_MDTYPE[]->NXM_NX_NSH_MDTYPE[],move:NXM_NX_NSH_NP[]->NXM_NX_NSH_NP[],move:NXM_NX_NSP[]->NXM_NX_NSP[],load:253->NXM_NX_NSI[],move:NXM_NX_NSH_C1[]->NXM_NX_NSH_C1[],move:NXM_NX_NSH_C2[]->NXM_NX_NSH_C2[],move:NXM_NX_TUN_ID[0..31]->NXM_NX_TUN_ID[0..31],load:$TUNNEL->NXM_NX_TUN_IPV4_DST[],load:0x4->NXM_NX_TUN_GPE_NP[],IN_PORT" -OOpenFlow13 diff --git a/demos/gbpsfc-env/demo-asymmetric-coexistence/infrastructure_config.py b/demos/gbpsfc-env/demo-asymmetric-coexistence/infrastructure_config.py index 14b98d0fb..155f1c8cc 100755 --- a/demos/gbpsfc-env/demo-asymmetric-coexistence/infrastructure_config.py +++ b/demos/gbpsfc-env/demo-asymmetric-coexistence/infrastructure_config.py @@ -24,27 +24,27 @@ defaultContainerImage='alagalah/odlpoc_ovs230' #Note that tenant name and endpointGroup name come from policy_config.py -hosts = [{'name': 'h35_2', +hosts = [{'name': 'h35-2', 'mac': '00:00:00:00:35:02', 'ip': '10.0.35.2/24', 'switch': 'sw1'}, - {'name': 'h35_3', + {'name': 'h35-3', 'ip': '10.0.35.3/24', 'mac': '00:00:00:00:35:03', 'switch': 'sw2'}, - {'name': 'h35_4', + {'name': 'h35-4', 'ip': '10.0.35.4/24', 'mac': '00:00:00:00:35:04', 'switch': 'sw4'}, - {'name': 'h36_2', + {'name': 'h36-2', 'ip': '10.0.36.2/24', 'mac': '00:00:00:00:36:02', 'switch': 'sw1'}, - {'name': 'h36_3', + {'name': 'h36-3', 'ip': '10.0.36.3/24', 'mac': '00:00:00:00:36:03', 'switch': 'sw2'}, - {'name': 'h36_4', + {'name': 'h36-4', 'ip': '10.0.36.4/24', 'mac': '00:00:00:00:36:04', 'switch': 'sw4'} diff --git a/demos/gbpsfc-env/demo-asymmetric-coexistence/rest.py b/demos/gbpsfc-env/demo-asymmetric-coexistence/rest.py index 41264d665..224247ed1 100755 --- a/demos/gbpsfc-env/demo-asymmetric-coexistence/rest.py +++ b/demos/gbpsfc-env/demo-asymmetric-coexistence/rest.py @@ -535,7 +535,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_2", + "port-name": "vethl-h36-2", "tenant": "tenant-red" } }, @@ -551,7 +551,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], -"port-name": "vethl-h35_2", +"port-name": "vethl-h35-2", "tenant": "tenant-red" } }, @@ -571,7 +571,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_3", + "port-name": "vethl-h35-3", "tenant": "tenant-red" } }, @@ -591,7 +591,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_3", + "port-name": "vethl-h36-3", "tenant": "tenant-red" } }, @@ -611,7 +611,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_4", + "port-name": "vethl-h36-4", "tenant": "tenant-red" } }, @@ -631,7 +631,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_4", + "port-name": "vethl-h35-4", "tenant": "tenant-red" } }, @@ -651,7 +651,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_5", + "port-name": "vethl-h35-5", "tenant": "tenant-red" } }, @@ -671,7 +671,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_5", + "port-name": "vethl-h36-5", "tenant": "tenant-red" } }] diff --git a/demos/gbpsfc-env/demo-gbp1/infrastructure_config.py b/demos/gbpsfc-env/demo-gbp1/infrastructure_config.py index a05ecf610..7c21da86d 100755 --- a/demos/gbpsfc-env/demo-gbp1/infrastructure_config.py +++ b/demos/gbpsfc-env/demo-gbp1/infrastructure_config.py @@ -31,35 +31,35 @@ defaultContainerImage='alagalah/odlpoc_ovs230' #Note that tenant name and endpointGroup name come from policy_config.py -hosts = [{'name': 'h35_2', +hosts = [{'name': 'h35-2', 'mac': '00:00:00:00:35:02', 'ip': '10.0.35.2/24', 'switch': 'sw1'}, - {'name': 'h35_3', + {'name': 'h35-3', 'ip': '10.0.35.3/24', 'mac': '00:00:00:00:35:03', 'switch': 'sw2'}, - {'name': 'h35_4', + {'name': 'h35-4', 'ip': '10.0.35.4/24', 'mac': '00:00:00:00:35:04', 'switch': 'sw3'}, - {'name': 'h35_5', + {'name': 'h35-5', 'ip': '10.0.35.5/24', 'mac': '00:00:00:00:35:05', 'switch': 'sw1'}, - {'name': 'h36_2', + {'name': 'h36-2', 'ip': '10.0.36.2/24', 'mac': '00:00:00:00:36:02', 'switch': 'sw2'}, - {'name': 'h36_3', + {'name': 'h36-3', 'ip': '10.0.36.3/24', 'mac': '00:00:00:00:36:03', 'switch': 'sw3'}, - {'name': 'h36_4', + {'name': 'h36-4', 'ip': '10.0.36.4/24', 'mac': '00:00:00:00:36:04', 'switch': 'sw1'}, - {'name': 'h36_5', + {'name': 'h36-5', 'ip': '10.0.36.5/24', 'mac': '00:00:00:00:36:05', 'switch': 'sw2'} diff --git a/demos/gbpsfc-env/demo-gbp1/rest.py b/demos/gbpsfc-env/demo-gbp1/rest.py index 7c7f4993e..a4137aaea 100755 --- a/demos/gbpsfc-env/demo-gbp1/rest.py +++ b/demos/gbpsfc-env/demo-gbp1/rest.py @@ -342,7 +342,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_2", + "port-name": "vethl-h35-2", "tenant": "tenant-red" } }, @@ -362,7 +362,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_3", + "port-name": "vethl-h35-3", "tenant": "tenant-red" } }, @@ -382,7 +382,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_4", + "port-name": "vethl-h35-4", "tenant": "tenant-red" } }, @@ -402,7 +402,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_5", + "port-name": "vethl-h35-5", "tenant": "tenant-red" } }, @@ -422,7 +422,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_2", + "port-name": "vethl-h36-2", "tenant": "tenant-red" } }, @@ -442,7 +442,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_3", + "port-name": "vethl-h36-3", "tenant": "tenant-red" } }, @@ -462,7 +462,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_4", + "port-name": "vethl-h36-4", "tenant": "tenant-red" } },{ @@ -481,7 +481,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_5", + "port-name": "vethl-h36-5", "tenant": "tenant-red" } }] diff --git a/demos/gbpsfc-env/demo-gbp2/infrastructure_config.py b/demos/gbpsfc-env/demo-gbp2/infrastructure_config.py index 09eb1f927..daf0edcf2 100755 --- a/demos/gbpsfc-env/demo-gbp2/infrastructure_config.py +++ b/demos/gbpsfc-env/demo-gbp2/infrastructure_config.py @@ -31,35 +31,35 @@ defaultContainerImage='alagalah/odlpoc_ovs230' #Note that tenant name and endpointGroup name come from policy_config.py -hosts = [{'name': 'h35_2', +hosts = [{'name': 'h35-2', 'mac': '00:00:00:00:35:02', 'ip': '10.0.35.2/24', 'switch': 'sw1'}, - {'name': 'h35_3', + {'name': 'h35-3', 'ip': '10.0.35.3/24', 'mac': '00:00:00:00:35:03', 'switch': 'sw1'}, - {'name': 'h35_4', + {'name': 'h35-4', 'ip': '10.0.35.4/24', 'mac': '00:00:00:00:35:04', 'switch': 'sw1'}, - {'name': 'h35_5', + {'name': 'h35-5', 'ip': '10.0.35.5/24', 'mac': '00:00:00:00:35:05', 'switch': 'sw1'}, - {'name': 'h36_2', + {'name': 'h36-2', 'ip': '10.0.36.2/24', 'mac': '00:00:00:00:36:02', 'switch': 'sw2'}, - {'name': 'h36_3', + {'name': 'h36-3', 'ip': '10.0.36.3/24', 'mac': '00:00:00:00:36:03', 'switch': 'sw2'}, - {'name': 'h36_4', + {'name': 'h36-4', 'ip': '10.0.36.4/24', 'mac': '00:00:00:00:36:04', 'switch': 'sw2'}, - {'name': 'h36_5', + {'name': 'h36-5', 'ip': '10.0.36.5/24', 'mac': '00:00:00:00:36:05', 'switch': 'sw2'} diff --git a/demos/gbpsfc-env/demo-gbp2/rest.py b/demos/gbpsfc-env/demo-gbp2/rest.py index d08aa82c9..ee18799fe 100755 --- a/demos/gbpsfc-env/demo-gbp2/rest.py +++ b/demos/gbpsfc-env/demo-gbp2/rest.py @@ -354,7 +354,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_2", + "port-name": "vethl-h35-2", "tenant": "tenant-red" } }, @@ -374,7 +374,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_3", + "port-name": "vethl-h35-3", "tenant": "tenant-red" } }, @@ -394,7 +394,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_4", + "port-name": "vethl-h35-4", "tenant": "tenant-red" } }, @@ -414,7 +414,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_5", + "port-name": "vethl-h35-5", "tenant": "tenant-red" } }, @@ -434,7 +434,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_2", + "port-name": "vethl-h36-2", "tenant": "tenant-red" } }, @@ -454,7 +454,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_3", + "port-name": "vethl-h36-3", "tenant": "tenant-red" } }, @@ -474,7 +474,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_4", + "port-name": "vethl-h36-4", "tenant": "tenant-red" } },{ @@ -493,7 +493,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_5", + "port-name": "vethl-h36-5", "tenant": "tenant-red" } }] diff --git a/demos/gbpsfc-env/demo-symmetric-chain/get-nsps.py b/demos/gbpsfc-env/demo-symmetric-chain/get-nsps.py index 4850dcf6f..836b046f2 100755 --- a/demos/gbpsfc-env/demo-symmetric-chain/get-nsps.py +++ b/demos/gbpsfc-env/demo-symmetric-chain/get-nsps.py @@ -4,6 +4,7 @@ import requests,json from requests.auth import HTTPBasicAuth import sys import os +import time from subprocess import check_output from infrastructure_config import * @@ -13,9 +14,14 @@ USERNAME='admin' PASSWORD='admin' def get(host, port, uri): + proxies = { + "http": None, + "https": None + } + url='http://'+host+":"+port+uri #print url - r = requests.get(url, auth=HTTPBasicAuth(USERNAME, PASSWORD)) + r = requests.get(url, proxies=proxies, auth=HTTPBasicAuth(USERNAME, PASSWORD)) jsondata=json.loads(r.text) return jsondata diff --git a/demos/gbpsfc-env/demo-symmetric-chain/infrastructure_config.py b/demos/gbpsfc-env/demo-symmetric-chain/infrastructure_config.py index efdcfc98f..2662654ef 100755 --- a/demos/gbpsfc-env/demo-symmetric-chain/infrastructure_config.py +++ b/demos/gbpsfc-env/demo-symmetric-chain/infrastructure_config.py @@ -30,35 +30,35 @@ defaultContainerImage='alagalah/odlpoc_ovs230' #Note that tenant name and endpointGroup name come from policy_config.py -hosts = [{'name': 'h35_2', +hosts = [{'name': 'h35-2', 'mac': '00:00:00:00:35:02', 'ip': '10.0.35.2/24', 'switch': 'sw1'}, - {'name': 'h35_3', + {'name': 'h35-3', 'ip': '10.0.35.3/24', 'mac': '00:00:00:00:35:03', 'switch': 'sw1'}, - {'name': 'h35_4', + {'name': 'h35-4', 'ip': '10.0.35.4/24', 'mac': '00:00:00:00:35:04', 'switch': 'sw6'}, - {'name': 'h35_5', + {'name': 'h35-5', 'ip': '10.0.35.5/24', 'mac': '00:00:00:00:35:05', 'switch': 'sw6'}, - {'name': 'h36_2', + {'name': 'h36-2', 'ip': '10.0.36.2/24', 'mac': '00:00:00:00:36:02', 'switch': 'sw1'}, - {'name': 'h36_3', + {'name': 'h36-3', 'ip': '10.0.36.3/24', 'mac': '00:00:00:00:36:03', 'switch': 'sw1'}, - {'name': 'h36_4', + {'name': 'h36-4', 'ip': '10.0.36.4/24', 'mac': '00:00:00:00:36:04', 'switch': 'sw6'}, - {'name': 'h36_5', + {'name': 'h36-5', 'ip': '10.0.36.5/24', 'mac': '00:00:00:00:36:05', 'switch': 'sw6'} diff --git a/demos/gbpsfc-env/demo-symmetric-chain/rest.py b/demos/gbpsfc-env/demo-symmetric-chain/rest.py index c22c322d4..11f55dff3 100755 --- a/demos/gbpsfc-env/demo-symmetric-chain/rest.py +++ b/demos/gbpsfc-env/demo-symmetric-chain/rest.py @@ -140,6 +140,7 @@ def get_service_function_forwarders_data(): "ip": "192.168.50.71" }, "service-function-forwarder-ovs:ovs-options": { + "exts": "gpe", "remote-ip": "flow", "dst-port": "6633", "key": "flow", @@ -177,6 +178,7 @@ def get_service_function_forwarders_data(): "ip": "192.168.50.73" }, "service-function-forwarder-ovs:ovs-options": { + "exts": "gpe", "remote-ip": "flow", "dst-port": "6633", "key": "flow", @@ -537,7 +539,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_2", + "port-name": "vethl-h36-2", "tenant": "tenant-red" } }, @@ -553,7 +555,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], -"port-name": "vethl-h35_2", +"port-name": "vethl-h35-2", "tenant": "tenant-red" } }, @@ -573,7 +575,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_3", + "port-name": "vethl-h35-3", "tenant": "tenant-red" } }, @@ -593,7 +595,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_3", + "port-name": "vethl-h36-3", "tenant": "tenant-red" } }, @@ -613,7 +615,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_4", + "port-name": "vethl-h36-4", "tenant": "tenant-red" } }, @@ -633,7 +635,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_4", + "port-name": "vethl-h35-4", "tenant": "tenant-red" } }, @@ -653,7 +655,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_5", + "port-name": "vethl-h35-5", "tenant": "tenant-red" } }, @@ -673,7 +675,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_5", + "port-name": "vethl-h36-5", "tenant": "tenant-red" } }] diff --git a/demos/gbpsfc-env/demo-symmetric-chain/sf-config.sh b/demos/gbpsfc-env/demo-symmetric-chain/sf-config.sh index b06a75643..5f73540f8 100755 --- a/demos/gbpsfc-env/demo-symmetric-chain/sf-config.sh +++ b/demos/gbpsfc-env/demo-symmetric-chain/sf-config.sh @@ -14,4 +14,4 @@ else fi sudo ovs-vsctl add-br $sw -sudo ovs-vsctl add-port $sw $sw-vxlangpe-0 -- set interface $sw-vxlangpe-0 type=vxlan options:remote_ip=flow options:dst_port=6633 options:nshc1=flow options:nshc2=flow options:nshc3=flow options:nshc4=flow options:nsp=flow options:nsi=flow options:key=flow +sudo ovs-vsctl add-port $sw $sw-vxlangpe-0 -- set interface $sw-vxlangpe-0 type=vxlan options:exts=gpe options:remote_ip=flow options:dst_port=6633 options:nshc1=flow options:nshc2=flow options:nshc3=flow options:nshc4=flow options:nsp=flow options:nsi=flow options:key=flow diff --git a/demos/gbpsfc-env/demo-symmetric-chain/sf-flows.sh b/demos/gbpsfc-env/demo-symmetric-chain/sf-flows.sh index f4ee6497d..b7816c223 100755 --- a/demos/gbpsfc-env/demo-symmetric-chain/sf-flows.sh +++ b/demos/gbpsfc-env/demo-symmetric-chain/sf-flows.sh @@ -16,5 +16,5 @@ fi # delete NORMAL, if present nsphex=`printf "%x\n" $nsp` sudo ovs-ofctl --strict del-flows $sw priority=0 -sudo ovs-ofctl add-flow $sw "priority=1000,nsi=255 actions=move:NXM_NX_NSH_C1[]->NXM_NX_NSH_C1[],move:NXM_NX_NSH_C2[]->NXM_NX_NSH_C2[],move:NXM_NX_TUN_ID[0..31]->NXM_NX_TUN_ID[0..31],load:$TUNNEL->NXM_NX_TUN_IPV4_DST[],set_nsi:254,IN_PORT" -OOpenFlow13 -sudo ovs-ofctl add-flow $sw "priority=1000,nsi=254 actions=move:NXM_NX_NSH_C1[]->NXM_NX_NSH_C1[],move:NXM_NX_NSH_C2[]->NXM_NX_NSH_C2[],move:NXM_NX_TUN_ID[0..31]->NXM_NX_TUN_ID[0..31],load:$TUNNEL->NXM_NX_TUN_IPV4_DST[],set_nsi:253,IN_PORT" -OOpenFlow13 +sudo ovs-ofctl add-flow $sw "priority=1000,nsi=255 actions=move:NXM_NX_NSH_MDTYPE[]->NXM_NX_NSH_MDTYPE[],move:NXM_NX_NSH_NP[]->NXM_NX_NSH_NP[],move:NXM_NX_NSP[]->NXM_NX_NSP[],load:254->NXM_NX_NSI[],move:NXM_NX_NSH_C1[]->NXM_NX_NSH_C1[],move:NXM_NX_NSH_C2[]->NXM_NX_NSH_C2[],move:NXM_NX_TUN_ID[0..31]->NXM_NX_TUN_ID[0..31],load:$TUNNEL->NXM_NX_TUN_IPV4_DST[],load:0x4->NXM_NX_TUN_GPE_NP[],IN_PORT" -OOpenFlow13 +sudo ovs-ofctl add-flow $sw "priority=1000,nsi=254 actions=move:NXM_NX_NSH_MDTYPE[]->NXM_NX_NSH_MDTYPE[],move:NXM_NX_NSH_NP[]->NXM_NX_NSH_NP[],move:NXM_NX_NSP[]->NXM_NX_NSP[],load:253->NXM_NX_NSI[],move:NXM_NX_NSH_C1[]->NXM_NX_NSH_C1[],move:NXM_NX_NSH_C2[]->NXM_NX_NSH_C2[],move:NXM_NX_TUN_ID[0..31]->NXM_NX_TUN_ID[0..31],load:$TUNNEL->NXM_NX_TUN_IPV4_DST[],load:0x4->NXM_NX_TUN_GPE_NP[],IN_PORT" -OOpenFlow13 diff --git a/demos/gbpsfc-env/demo-symmetric-coexistence/infrastructure_config.py b/demos/gbpsfc-env/demo-symmetric-coexistence/infrastructure_config.py index bdeb050a4..32475835f 100755 --- a/demos/gbpsfc-env/demo-symmetric-coexistence/infrastructure_config.py +++ b/demos/gbpsfc-env/demo-symmetric-coexistence/infrastructure_config.py @@ -24,27 +24,27 @@ defaultContainerImage='alagalah/odlpoc_ovs230' #Note that tenant name and endpointGroup name come from policy_config.py -hosts = [{'name': 'h35_2', +hosts = [{'name': 'h35-2', 'mac': '00:00:00:00:35:02', 'ip': '10.0.35.2/24', 'switch': 'sw1'}, - {'name': 'h35_3', + {'name': 'h35-3', 'ip': '10.0.35.3/24', 'mac': '00:00:00:00:35:03', 'switch': 'sw2'}, - {'name': 'h35_4', + {'name': 'h35-4', 'ip': '10.0.35.4/24', 'mac': '00:00:00:00:35:04', 'switch': 'sw4'}, - {'name': 'h36_2', + {'name': 'h36-2', 'ip': '10.0.36.2/24', 'mac': '00:00:00:00:36:02', 'switch': 'sw1'}, - {'name': 'h36_3', + {'name': 'h36-3', 'ip': '10.0.36.3/24', 'mac': '00:00:00:00:36:03', 'switch': 'sw2'}, - {'name': 'h36_4', + {'name': 'h36-4', 'ip': '10.0.36.4/24', 'mac': '00:00:00:00:36:04', 'switch': 'sw4'} diff --git a/demos/gbpsfc-env/demo-symmetric-coexistence/rest.py b/demos/gbpsfc-env/demo-symmetric-coexistence/rest.py index 2884d76a0..f92d9fd91 100755 --- a/demos/gbpsfc-env/demo-symmetric-coexistence/rest.py +++ b/demos/gbpsfc-env/demo-symmetric-coexistence/rest.py @@ -535,7 +535,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_2", + "port-name": "vethl-h36-2", "tenant": "tenant-red" } }, @@ -551,7 +551,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], -"port-name": "vethl-h35_2", +"port-name": "vethl-h35-2", "tenant": "tenant-red" } }, @@ -571,7 +571,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_3", + "port-name": "vethl-h35-3", "tenant": "tenant-red" } }, @@ -591,7 +591,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_3", + "port-name": "vethl-h36-3", "tenant": "tenant-red" } }, @@ -611,7 +611,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_4", + "port-name": "vethl-h36-4", "tenant": "tenant-red" } }, @@ -631,7 +631,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_4", + "port-name": "vethl-h35-4", "tenant": "tenant-red" } }, @@ -651,7 +651,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h35_5", + "port-name": "vethl-h35-5", "tenant": "tenant-red" } }, @@ -671,7 +671,7 @@ def get_endpoint_data(): "l3-context": "l3-context-vrf-red" } ], - "port-name": "vethl-h36_5", + "port-name": "vethl-h36-5", "tenant": "tenant-red" } }] diff --git a/demos/gbpsfc-env/infrastructure_launch.py b/demos/gbpsfc-env/infrastructure_launch.py index 5653063c9..76efb0dc0 100755 --- a/demos/gbpsfc-env/infrastructure_launch.py +++ b/demos/gbpsfc-env/infrastructure_launch.py @@ -52,6 +52,7 @@ def addGpeTunnel(sw, sourceIp=None): cmd = ['ovs-vsctl', 'add-port', sw, ifaceName, '--', 'set', 'Interface', ifaceName, 'type=vxlan', + 'options:exts=gpe', 'options:remote_ip=flow', 'options:dst_port=6633', 'options:nshc1=flow', -- 2.36.6