# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

blockdiag {

    //orientation = portrait;

    // Blocks used
    SDN [label = "SDN\nController", width = 64];
    M [label = "PON\nManager", width = 64];
    V [label = "Voltha\nCore & NBI", width = 74];
    A [label = "OLT\nAdapter", width = 64];
    A2 [label = "ONU\nAdapter", width = 64];
    U [label = "Upstream\nNetwork", width = 64];
    L2 [label = "L2 Aggr.", width = 64, shape = cloud];
    OL [label = OLT, width = 64];
    ON [label = ONU, width = 64];
    R [label = RG, width = 64];

    U <-> L2 [label = Pd];
    L2 <-> OL [label = Pu];
    OL <-> ON;
    ON <-> R [label = Pr];
    M <-> V [label = Pv, folded];
    M <-> SDN;
    SDN <-> V [label = Pv, folded];
    V <-> A [label = Pa];
    V <-> A2;
    A <-> L2 [label = Pc];

    group {
        label = "Voltha Deployed on Compute Cluster with Inband Access to OLTs"
        SDN; M; V; A; A2; U; L2; OL; ON; R;
        color = "#FFFFFF";
        fontsize = 24;

        group {
            label = "Voltha";
            color = "#AAAAFF"
            V; A; A2;
        }

        group {
            label = "PON Network";
            OL; ON;
        }
    }
}

