def test_node_detach_network(self): """(successful) call to node_detach_network""" C.node.connect_network('node-04', 'eth0', 'net-04', 'vlan/native') deferred.apply_networking() response = C.node.detach_network('node-04', 'eth0', 'net-04') assert uuid_pattern.match(response['status_id']) deferred.apply_networking()
def test_node_detach_network(self): """(successful) call to node_detach_network""" C.node.connect_network('node-04', 'eth0', 'net-04', 'vlan/native') deferred.apply_networking() response = C.node.detach_network('node-04', 'eth0', 'net-04') assert uuid_pattern.match(response['status_id']) deferred.apply_networking()
def test_node_connect_network(self): """(successful) call to node_connect_network""" response = C.node.connect_network('node-01', 'eth0', 'net-01', 'vlan/native') # check that the reponse contains a valid UUID. assert uuid_pattern.match(response['status_id']) deferred.apply_networking()
def test_node_connect_network(self): """(successful) call to node_connect_network""" response = C.node.connect_network( 'manhattan_node_1', 'nic-with-port', 'manhattan_pxe', 'vlan/native') # check that the reponse contains a valid UUID. assert uuid_pattern.match(response['status_id']) deferred.apply_networking()
def test_node_detach_network(self): """(successful) call to node_detach_network""" C.node.connect_network('manhattan_node_0', 'nic-with-port', 'manhattan_pxe', 'vlan/native') deferred.apply_networking() response = C.node.detach_network('manhattan_node_0', 'nic-with-port', 'manhattan_pxe') assert uuid_pattern.match(response['status_id']) deferred.apply_networking()
def test_node_detach_network(self): """(successful) call to node_detach_network""" C.node.connect_network( 'manhattan_node_0', 'nic-with-port', 'manhattan_pxe', 'vlan/native') deferred.apply_networking() response = C.node.detach_network( 'manhattan_node_0', 'nic-with-port', 'manhattan_pxe') assert uuid_pattern.match(response['status_id']) deferred.apply_networking()
def test_port_revert(self): """Revert port should run without error and remove all networks""" C.node.connect_network('node-01', 'eth0', 'net-01', 'vlan/native') deferred.apply_networking() assert C.port.show('mock-01', 'gi1/0/1') == { 'node': 'node-01', 'nic': 'eth0', 'networks': {'vlan/native': 'net-01'}} response = C.port.port_revert('mock-01', 'gi1/0/1') assert uuid_pattern.match(response['status_id']) deferred.apply_networking() assert C.port.show('mock-01', 'gi1/0/1') == { 'node': 'node-01', 'nic': 'eth0', 'networks': {}}
def test_port_revert(self): """Revert port should run without error and remove all networks""" C.node.connect_network('node-01', 'eth0', 'net-01', 'vlan/native') deferred.apply_networking() assert C.port.show('mock-01', 'gi1/0/1') == { 'node': 'node-01', 'nic': 'eth0', 'networks': {'vlan/native': 'net-01'}} response = C.port.port_revert('mock-01', 'gi1/0/1') assert uuid_pattern.match(response['status_id']) deferred.apply_networking() assert C.port.show('mock-01', 'gi1/0/1') == { 'node': 'node-01', 'nic': 'eth0', 'networks': {}}
def test_port_revert(self): """Revert port should run without error and remove all networks""" C.node.connect_network( 'runway_node_0', 'nic-with-port', 'runway_pxe', 'vlan/native') deferred.apply_networking() assert C.port.show('stock_switch_0', 'runway_node_0_port') == { 'node': 'runway_node_0', 'nic': 'nic-with-port', 'networks': {'vlan/native': 'runway_pxe'}} response = C.port.port_revert('stock_switch_0', 'runway_node_0_port') assert uuid_pattern.match(response['status_id']) deferred.apply_networking() assert C.port.show('stock_switch_0', 'runway_node_0_port') == { 'node': 'runway_node_0', 'nic': 'nic-with-port', 'networks': {}}
def test_port_revert(self): """Revert port should run without error and remove all networks""" C.node.connect_network('runway_node_0', 'nic-with-port', 'runway_pxe', 'vlan/native') deferred.apply_networking() assert C.port.show('stock_switch_0', 'runway_node_0_port') == { 'node': 'runway_node_0', 'nic': 'nic-with-port', 'networks': { 'vlan/native': 'runway_pxe' } } response = C.port.port_revert('stock_switch_0', 'runway_node_0_port') assert uuid_pattern.match(response['status_id']) deferred.apply_networking() assert C.port.show('stock_switch_0', 'runway_node_0_port') == { 'node': 'runway_node_0', 'nic': 'nic-with-port', 'networks': {} }