diff --git a/bands.json b/bands.json deleted file mode 100644 index 59851eb21cbd17f41db74231593cf1e9e09d17a3..0000000000000000000000000000000000000000 --- a/bands.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "1": { - "optical_band_id": 1, - "bidir": 0, - "src": "R1", - "dst": "R2", - "flows": { - "R1": { - "f": { - "in": "0", - "out": "101" - }, - "b": {} - }, - "R2": { - "f": { - "in": "111", - "out": "0" - }, - "b": {} - } - }, - "band_type": "c_slots", - "fiber_forward": {}, - "fiber_backward": {}, - "op-mode": 0, - "n_slots": 16, - "links": [ - "R1-R2" - ], - "path": [ - "R1", - "R2" - ], - "band": 200000, - "freq": 192106250, - "is_active": false, - "src_port": "101", - "dst_port": "111", - "rev_dst_port": "111", - "rev_src_port": "101", - "c_slots": { - "1": 1, - "2": 1, - "3": 1, - "4": 1, - "5": 1, - "6": 1, - "7": 1, - "8": 1, - "9": 1, - "10": 1, - "11": 1, - "12": 1, - "13": 1, - "14": 1, - "15": 1, - "16": 1 - }, - "served_lightpaths": [] - } -} \ No newline at end of file diff --git a/lightpath.json b/lightpath.json deleted file mode 100644 index 3ff09b1b58ecd7e47ead8fefa1539ee06639c80f..0000000000000000000000000000000000000000 --- a/lightpath.json +++ /dev/null @@ -1 +0,0 @@ -{"1": {"flow_id": 1, "src": "T1.1", "dst": "T2.1", "bitrate": 100, "bidir": 0, "flows": {"T1.1": {"f": {"in": "0", "out": "1"}, "b": {}}, "R1": {"f": {"in": "12", "out": "101"}, "b": {}}, "R2": {"f": {"in": "111", "out": "2"}, "b": {}}, "T2.1": {"f": {"in": "6", "out": "0"}, "b": {}}}, "band_type": "c_slots", "slots": [1, 2, 3, 4], "fiber_forward": {}, "fiber_backward": {}, "op-mode": 1, "n_slots": 4, "links": ["T1.1-R1", "R2-T2.1"], "path": ["R1", "R2"], "band": 50000, "freq": 192031250, "is_active": false, "parent_opt_band": 1, "new_optical_band": 1}, "2": {"flow_id": 2, "src": "T1.1", "dst": "T2.1", "bitrate": 100, "bidir": 0, "flows": {"T1.1": {"f": {"in": "0", "out": "1"}, "b": {}}, "R1": {"f": {"in": "12", "out": "101"}, "b": {}}, "R2": {"f": {"in": "111", "out": "2"}, "b": {}}, "T2.1": {"f": {"in": "6", "out": "0"}, "b": {}}}, "band_type": "c_slots", "slots": [5, 6, 7, 8], "fiber_forward": {}, "fiber_backward": {}, "op-mode": 1, "n_slots": 4, "links": ["T1.1-R1", "R2-T2.1"], "path": ["T1.1", "R1", "R2", "T2.1"], "band": 50000, "freq": 192081250, "is_active": false, "parent_opt_band": 1, "new_optical_band": 0}} diff --git a/src/opticalcontroller/Dockerfile b/src/opticalcontroller/Dockerfile index 70bae4223dcbb0a9399671e1b7a9af95fc5fffc6..75245256c27bae0c24f7a9bebb51ae718c8be525 100644 --- a/src/opticalcontroller/Dockerfile +++ b/src/opticalcontroller/Dockerfile @@ -34,20 +34,20 @@ RUN python3 -m pip install --upgrade pip-tools # Get common Python packages # Note: this step enables sharing the previous Docker build steps among all the Python components -WORKDIR /var/teraflow/opticalcontroller/ +WORKDIR /var/teraflow/ COPY common_requirements.in common_requirements.in RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in RUN python3 -m pip install -r common_requirements.txt # Add common files into working directory -WORKDIR /var/teraflow/opticalcontroller/common +WORKDIR /var/teraflow/common COPY src/common/. ./ RUN rm -rf proto # Create proto sub-folder, copy .proto files, and generate Python code -RUN mkdir -p /var/teraflow/opticalcontroller/common/proto -WORKDIR /var/teraflow/opticalcontroller/common/proto +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto RUN touch __init__.py COPY proto/*.proto ./ RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto @@ -55,19 +55,18 @@ RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Create component sub-folders, get specific Python packages - -WORKDIR /var/teraflow/ +RUN mkdir -p /var/teraflow/opticalcontroller +WORKDIR /var/teraflow/opticalcontroller COPY src/opticalcontroller/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt # Add component files into working directory -WORKDIR /var/teraflow/opticalcontroller/ - +WORKDIR /var/teraflow/ COPY src/context/__init__.py context/__init__.py COPY src/context/client/. context/client/ -COPY src/opticalcontroller/. ./ +COPY src/opticalcontroller/. opticalcontroller/ # Start the service - +WORKDIR /var/teraflow/opticalcontroller ENTRYPOINT ["python", "OpticalController.py"] diff --git a/topog.json b/topog.json deleted file mode 100644 index 7e432c5feae313d869e84899a3e37490ae98b390..0000000000000000000000000000000000000000 --- a/topog.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "1": { - "optical_band_id": 1, - "bidir": 0, - "src": "R1", - "dst": "R2", - "flows": { - "R1": { - "f": { - "in": "0", - "out": "101" - }, - "b": {} - }, - "R2": { - "f": { - "in": "111", - "out": "0" - }, - "b": {} - } - }, - "band_type": "c_slots", - "fiber_forward": {}, - "fiber_backward": {}, - "op-mode": 0, - "n_slots": 16, - "links": [ - "R1-R2" - ], - "path": [ - "R1", - "R2" - ], - "band": 200000, - "freq": 192106250, - "is_active": true, - "src_port": "101", - "dst_port": "111", - "rev_dst_port": "111", - "rev_src_port": "101", - "c_slots": { - "1": 1, - "2": 1, - "3": 1, - "4": 0, - "5": 0, - "6": 0, - "7": 0, - "8": 1, - "9": 1, - "10": 1, - "11": 1, - "12": 1, - "13": 1, - "14": 1, - "15": 1, - "16": 1 - }, - "served_lightpaths": [ - 3 - ] - }, - "2": { - "optical_band_id": 2, - "bidir": 1, - "src": "R1", - "dst": "R2", - "flows": { - "R1": { - "f": { - "in": "0", - "out": "101" - }, - "b": { - "in": "111", - "out": "0" - } - }, - "R2": { - "f": { - "in": "111", - "out": "0" - }, - "b": { - "in": "0", - "out": "101" - } - } - }, - "band_type": "l_slots", - "fiber_forward": {}, - "fiber_backward": {}, - "op-mode": 0, - "n_slots": 16, - "links": [ - "R1-R2" - ], - "path": [ - "R1", - "R2" - ], - "band": 200000, - "freq": 186156250, - "is_active": true, - "src_port": "101", - "dst_port": "111", - "rev_dst_port": "111", - "rev_src_port": "101", - "l_slots": { - "101": 1, - "102": 1, - "103": 1, - "104": 1, - "105": 1, - "106": 1, - "107": 1, - "108": 1, - "109": 1, - "110": 1, - "111": 1, - "112": 1, - "113": 1, - "114": 1, - "115": 1, - "116": 1 - }, - "served_lightpaths": [] - } -} \ No newline at end of file