return {
"tenant": [
{
- "id": "tenant-dobre",
+ "id": "tenant-red",
"name": "DockerTenant",
"forwarding-context": {
"l2-flood-domain": [
# Main Program
def get_tenant_uri():
- return "/restconf/config/policy:tenants/policy:tenant/tenant-dobre"
+ return "/restconf/config/policy:tenants/policy:tenant/tenant-red"
def get_tunnel_data_1():
return {
}
],
"port-name": "vethl-h36_2",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_2",
-"tenant": "tenant-dobre"
+"tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_3",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_3",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_4",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_4",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_5",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_5",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
}]
def get_tenant_data():
return {
"policy:tenant": {
- "id": "tenant-dobre",
+ "id": "tenant-red",
"name": "GBPPOC",
"forwarding-context": {
"l2-bridge-domain": [
# Main Program
def get_tenant_uri():
- return "/restconf/config/policy:tenants/policy:tenant/tenant-dobre"
+ return "/restconf/config/policy:tenants/policy:tenant/tenant-red"
+
def get_tunnel_data():
return {
}
],
"port-name": "vethl-h35_2",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_3",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_4",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_5",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_2",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_3",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_4",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},{
"input": {
}
],
"port-name": "vethl-h36_5",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
}]
return {
"tenant": [
{
- "id": "tenant-dobre",
+ "id": "tenant-red",
"name": "DockerTenant",
"forwarding-context": {
"l2-flood-domain": [
# Main Program
def get_tenant_uri():
- return "/restconf/config/policy:tenants/policy:tenant/tenant-dobre"
+ return "/restconf/config/policy:tenants/policy:tenant/tenant-red"
def get_tunnel_data_1():
return {
}
],
"port-name": "vethl-h36_2",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_2",
-"tenant": "tenant-dobre"
+"tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_3",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_3",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_4",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_4",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h35_5",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
},
{
}
],
"port-name": "vethl-h36_5",
- "tenant": "tenant-dobre"
+ "tenant": "tenant-red"
}
}]
return "/restconf/config/service-function-path:service-function-paths/"
def get_tenant_uri():
- return "/restconf/config/policy:tenants/policy:tenant/f5c7d344-d1c7-4208-8531-2c2693657e12"
+ return "/restconf/config/policy:tenants/policy:tenant/tenant-red"
def get_tunnel_uri():
return "/restconf/config/opendaylight-inventory:nodes"
if controller == None:
sys.exit("No controller set.")
else:
- print "Contacting controller at %s" % controller
+ print "Contacting controller at %s" % controller
resp=get(controller,DEFAULT_PORT,'/restconf/operational/endpoint:endpoints')
resp_json=json.loads(resp.text)
print "unregistering L2 endpoints"
for endpoint in l2_eps:
- data={ "input": { "l2": [ { "l2-context": endpoint['l2-context'] ,"mac-address": endpoint['mac-address'] } ] } }
+ data={ "input": { "l2": [ { "l2-context": endpoint['l2-context'] ,"mac-address": endpoint['mac-address'] } ] } }
post(controller, DEFAULT_PORT, get_endpoint_uri(),data,True)
print "unregistering L3 endpoints"
for endpoint in l3_eps:
- data={ "input": { "l3": [ { "l3-context": endpoint['l3-context'] ,"ip-address": endpoint['ip-address'] } ] } }
+ data={ "input": { "l3": [ { "l3-context": endpoint['l3-context'] ,"ip-address": endpoint['ip-address'] } ] } }
post(controller, DEFAULT_PORT, get_endpoint_uri(),data,True)
print "topology removed check"