Example #1
0
 def test_update(self):
     NAME = 'ovirtmgmt'
     net = docker.Network(NAME)
     net.update(nic='foonet0',
                gw='192.168.192.240',
                subnet='192.168.192.0',
                mask='26')
     self.assertEqual(net.subnet, "192.168.192.0/26")
Example #2
0
 def test_load_missing(self):
     NAME = 'notexists'
     net = docker.Network(NAME)
     net.load()
     self.assertFalse(net.existing)
Example #3
0
 def test_existing_false_before_load(self):
     NAME = 'test'
     net = docker.Network(NAME)
     self.assertFalse(net.existing)
Example #4
0
 def test_load(self):
     NAME = 'ovirtmgmt'
     net = docker.Network(NAME)
     net.load()
     self.assertTrue(net.existing)
Example #5
0
 def test_subnet(self):
     NAME = 'test'
     net = docker.Network(NAME)
     self.assertEqual(net.subnet, "10.1.0.0/20")