Esempio n. 1
0
 def test_get_delete_url(self):
     """
     Test delete url of Interface Breakout
     """
     brkout = InterfaceBreakout()
     expected_url  = '/api/mo/sys/breakout/module-1/fport-1.json'
     self.assertEqual(expected_url, brkout.get_delete_url('1', '1'))
Esempio n. 2
0
    def create_breakout(self):
        brkout = InterfaceBreakout()

        module1 = BreakoutModule('1')
        module1.add_port_map('1', '10g-4x')

        module2 = BreakoutModule('2')
        module2.add_port_map('1', '10g-4x')

        brkout.add_module(module1)
        brkout.add_module(module2)

        return brkout
Esempio n. 3
0
 def create_breakout(self):
     brkout = InterfaceBreakout()
 
     module1 = BreakoutModule('1')
     module1.add_port_map('1', '10g-4x')
     
     module2 = BreakoutModule('2')
     module2.add_port_map('1', '10g-4x')
     
     brkout.add_module(module1)
     brkout.add_module(module2)
     
     return brkout
Esempio n. 4
0
 def create_breakout(self):
     """
     Create breakout object used as setup for test cases
     """
     brkout = InterfaceBreakout()
 
     module1 = BreakoutModule('1')
     module1.add_port_map('1', '10g-4x')
     
     module2 = BreakoutModule('2')
     module2.add_port_map('1', '10g-4x')
     
     brkout.add_module(module1)
     brkout.add_module(module2)
     
     return brkout
Esempio n. 5
0
 def test_interface_break_get(self):
     session = self.login_to_switch()
     self.assertRaises(TypeError, InterfaceBreakout.get, None)
     level = InterfaceBreakout(session)
     self.assertTrue(isinstance(level, InterfaceBreakout))
Esempio n. 6
0
 def test_get_delete_url(self):
     brkout = InterfaceBreakout()
     expected_url = '/api/mo/sys/breakout/module-1/fport-1.json'
     self.assertEqual(expected_url, brkout.get_delete_url('1', '1'))