Open Kilda Java Documentation
app.tests.push_flows Namespace Reference

Variables

string url = "http://localhost:80/api/v1/push/flows"
 
dictionary headers
 
list j_data
 
 result = requests.put(url, json=j_data, headers=headers)
 

Detailed Description

push_flows.py facilitates testing the feature through the NB API.

This will create some Switches if they don't exist, flows between them, and possibly isls with the
available_bandwidth adjusted (possibly negative since I won't know what it is).

The path will hit 2 places:
    (1) NB -> TER -> NEO4J
    (2) NB -> kafka -> FLOW TOPOLOGY

Variable Documentation

◆ headers

dictionary app.tests.push_flows.headers
Initial value:
1 = {
2  'Content-Type': 'application/json',
3  'Authorization': 'Basic %s' % b64encode(b"kilda:kilda").decode("ascii")
4 }

Definition at line 19 of file push_flows.py.

◆ j_data

list app.tests.push_flows.j_data
Initial value:
1 = [{
2  "flow_id": "fat-flow-1",
3  "src_node": "de:ad:be:ef:01:11:22:01-p.3-v.45",
4  "dst_node": "de:ad:be:ef:01:11:22:01-p.1-v.23",
5  "max_bandwidth": 1000,
6  "forward_path": [{
7  "switch_name": "my.big.switch",
8  "switch_id": "de:ad:be:ef:01:11:22:01",
9  "cookie": "0x10400000005dc8f",
10  "cookie_int": 73183493945154703
11  }],
12  "reverse_path": [{
13  "switch_name": "my.big.switch",
14  "switch_id": "de:ad:be:ef:01:11:22:01",
15  "cookie": "0x18400000005dc8f",
16  "cookie_int": 109212290964118671
17  }]
18 }]

Definition at line 24 of file push_flows.py.

◆ result

app.tests.push_flows.result = requests.put(url, json=j_data, headers=headers)

Definition at line 44 of file push_flows.py.

◆ url

string app.tests.push_flows.url = "http://localhost:80/api/v1/push/flows"

Definition at line 17 of file push_flows.py.