Skip to content
Snippets Groups Projects
Commit 138e3c02 authored by Henrik Thostrup Jensen's avatar Henrik Thostrup Jensen
Browse files

add symmetric, directionality, and connection traces to database

parent bbd54fe2
No related branches found
No related tags found
No related merge requests found
......@@ -4,5 +4,6 @@
DROP TABLE generic_backend_connections;
DROP TABLE sub_connections;
DROP TABLE service_connections;
DROP TYPE directionality;
DROP TYPE label;
......@@ -7,6 +7,8 @@ CREATE TYPE label AS (
label_value text
);
CREATE TYPE directionality AS ENUM ('Bidirectional', 'Unidirectional');
-- publically reachable connections
CREATE TABLE service_connections (
......@@ -29,7 +31,10 @@ CREATE TABLE service_connections (
dest_label label,
start_time timestamp NOT NULL,
end_time timestamp NOT NULL,
bandwidth integer NOT NULL -- mbps
symmetrical boolean NOT NULL,
directionality directionality NOT NULL,
bandwidth integer NOT NULL, -- mbps
connection_trace text[]
);
-- internal references to connections that are part of a service connection
......@@ -77,6 +82,8 @@ CREATE TABLE generic_backend_connections (
dest_label label,
start_time timestamp NOT NULL,
end_time timestamp NOT NULL,
symmetrical boolean NOT NULL,
directionality directionality NOT NULL,
bandwidth integer NOT NULL -- mbps
);
......@@ -185,7 +185,8 @@ class Aggregator:
reservation_state=state.RESERVE_START, provision_state=state.RELEASED, lifecycle_state=state.CREATED,
source_network=source_stp.network, source_port=source_stp.port, source_label=source_stp.label,
dest_network=dest_stp.network, dest_port=dest_stp.port, dest_label=dest_stp.label,
start_time=criteria.schedule.start_time, end_time=criteria.schedule.end_time, bandwidth=sd.capacity)
start_time=criteria.schedule.start_time, end_time=criteria.schedule.end_time,
symmetrical=sd.symmetric, directionality=sd.directionality, bandwidth=sd.capacity, connection_trace=header.connection_trace)
yield conn.save()
# Here we should return / callback and spawn off the path creation
......
......@@ -263,7 +263,7 @@ class GenericBackend(service.Service):
source_network=source_stp.network, source_port=source_stp.port, source_label=src_label,
dest_network=dest_stp.network, dest_port=dest_stp.port, dest_label=dst_label,
start_time=schedule.start_time, end_time=schedule.end_time,
bandwidth=sd.capacity)
symmetrical=sd.symmetric, directionality=sd.directionality, bandwidth=sd.capacity)
yield conn.save()
reactor.callWhenRunning(self._doReserve, conn, header.correlation_id)
defer.returnValue(connection_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment