A R Karthick | 35495c3 | 2017-05-11 14:58:32 -0700 | [diff] [blame] | 1 | import os |
| 2 | import sys |
| 3 | import unittest |
| 4 | from nose.tools import * |
| 5 | from CordTestConfig import setup_module |
| 6 | from CordTestUtils import log_test |
| 7 | from VolthaCtrl import VolthaCtrl |
| 8 | |
| 9 | class voltha_exchange(unittest.TestCase): |
| 10 | |
| 11 | OLT_TYPE = 'tibit_olt' |
| 12 | OLT_MAC = '00:0c:e2:31:12:00' |
| 13 | VOLTHA_HOST = 'localhost' |
| 14 | VOLTHA_REST_PORT = 8881 |
| 15 | voltha = None |
| 16 | |
| 17 | @classmethod |
| 18 | def setUpClass(cls): |
| 19 | cls.voltha = VolthaCtrl(cls.VOLTHA_HOST, rest_port = cls.VOLTHA_REST_PORT) |
| 20 | |
| 21 | def test_olt_enable(self): |
| 22 | log_test.info('Enabling OLT type %s, MAC %s' %(self.OLT_TYPE, self.OLT_MAC)) |
| 23 | status = self.voltha.enable_device(self.OLT_TYPE, self.OLT_MAC) |
| 24 | assert_equal(status, True) |