blob: d6043f4f321bebfebee5a114aa79e584e35cad07 [file] [log] [blame]
donNewtonAlphab9b85eb2018-08-14 14:28:22 -04001/*
2 Copyright 2017 the original author or authors.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17package abstract_test
18
19import (
20 "testing"
21
22 "gerrit.opencord.org/abstract-olt/models/abstract"
23)
24
25func TestChassisUtils_GenerateChassis(t *testing.T) {
donNewtonAlpha1d2d6812018-09-14 16:00:02 -040026 chassis := abstract.GenerateChassis("MY_CLLI", 1, 1)
donNewtonAlphab9b85eb2018-08-14 14:28:22 -040027 slot := chassis.Slots[6]
28 port := slot.Ports[0]
29 ont := port.Onts[3]
30 svlan := ont.Svlan
31 cvlan := ont.Cvlan
32 if svlan != 98 { // see map doc
donNewtonAlpha1d2d6812018-09-14 16:00:02 -040033 t.Errorf("SVlan should be 98 and is %d\n", svlan)
donNewtonAlphab9b85eb2018-08-14 14:28:22 -040034 }
35 if cvlan != 434 { // see map doc
donNewtonAlpha1d2d6812018-09-14 16:00:02 -040036 t.Errorf("CVlan should be 434 and is %d\n", cvlan)
donNewtonAlphab9b85eb2018-08-14 14:28:22 -040037 }
donNewtonAlphab9b85eb2018-08-14 14:28:22 -040038}