コード例 #1
0
 def test_delete_ironic_node(self):
     server_hardware_uri = "/rest/server-hardware/31393736-3831-4753-4831-30315837524E"
     server_hardware_json = service_manager.get_server_hardware(server_hardware_uri)
     server_hardware_info = service_manager.parse_server_hardware_to_dict(server_hardware_json)
     node = manage_ironic_nodes.create_ironic_node(server_hardware_info)
     manage_ironic_nodes.delete_ironic_node(server_hardware_uri)
     assert manage_ironic_nodes.get_ironic_node_by_server_hardware_uri(server_hardware_uri) is None
コード例 #2
0
 def test_create_ironic_node(self):
     server_hardware_uri = "/rest/server-hardware/37333036-3831-4753-4831-30305838524E"
     server_hardware_json = service_manager.get_server_hardware(server_hardware_uri)
     server_hardware_info = service_manager.parse_server_hardware_to_dict(server_hardware_json)
     node = manage_ironic_nodes.create_ironic_node(server_hardware_info)
     assert node is not None
     manage_ironic_nodes.delete_ironic_node(server_hardware_uri)
コード例 #3
0
 def test_create_ironic_node(self):
     server_hardware_uri = '/rest/server-hardware/37333036-3831-4753-4831-30305838524E'
     server_hardware_json = service_manager.get_server_hardware(
         server_hardware_uri)
     server_hardware_info = service_manager.parse_server_hardware_to_dict(
         server_hardware_json)
     node = manage_ironic_nodes.create_ironic_node(server_hardware_info)
     assert node is not None
     manage_ironic_nodes.delete_ironic_node(server_hardware_uri)
コード例 #4
0
 def test_delete_ironic_node(self):
     server_hardware_uri = '/rest/server-hardware/31393736-3831-4753-4831-30315837524E'
     server_hardware_json = service_manager.get_server_hardware(
         server_hardware_uri)
     server_hardware_info = service_manager.parse_server_hardware_to_dict(
         server_hardware_json)
     node = manage_ironic_nodes.create_ironic_node(server_hardware_info)
     manage_ironic_nodes.delete_ironic_node(server_hardware_uri)
     assert manage_ironic_nodes.get_ironic_node_by_server_hardware_uri(
         server_hardware_uri) is None
コード例 #5
0
 def test_maintenance_state_out(self):
     server_hardware_uri = "/rest/server-hardware/31393736-3831-4753-4831-30305837524E"
     server_hardware_json = service_manager.get_server_hardware(server_hardware_uri)
     server_hardware_info = service_manager.parse_server_hardware_to_dict(server_hardware_json)
     manage_ironic_nodes.create_ironic_node(server_hardware_info)
     manage_ironic_nodes.set_node_maintenance_state(server_hardware_uri, "true")
     node = manage_ironic_nodes.get_ironic_node_by_server_hardware_uri(server_hardware_uri)
     self.assertTrue(node.maintenance)
     manage_ironic_nodes.set_node_maintenance_state(server_hardware_uri, "false")
     node = manage_ironic_nodes.get_ironic_node_by_server_hardware_uri(server_hardware_uri)
     self.assertFalse(node.maintenance)
     manage_ironic_nodes.delete_ironic_node(server_hardware_uri)
コード例 #6
0
 def test_maintenance_state_out(self):
     server_hardware_uri = '/rest/server-hardware/31393736-3831-4753-4831-30305837524E'
     server_hardware_json = service_manager.get_server_hardware(
         server_hardware_uri)
     server_hardware_info = service_manager.parse_server_hardware_to_dict(
         server_hardware_json)
     manage_ironic_nodes.create_ironic_node(server_hardware_info)
     manage_ironic_nodes.set_node_maintenance_state(server_hardware_uri,
                                                    'true')
     node = manage_ironic_nodes.get_ironic_node_by_server_hardware_uri(
         server_hardware_uri)
     self.assertTrue(node.maintenance)
     manage_ironic_nodes.set_node_maintenance_state(server_hardware_uri,
                                                    'false')
     node = manage_ironic_nodes.get_ironic_node_by_server_hardware_uri(
         server_hardware_uri)
     self.assertFalse(node.maintenance)
     manage_ironic_nodes.delete_ironic_node(server_hardware_uri)