def test_make_split_nodekey(self):
     """Test make and split_nodekey."""
     key = make_nodekey(VOLUME_UUID, NODE_UUID)
     self.assertEqual(key, "%s:%s" % (VOLUME_KEY, NODE_KEY))
     volume_id, node_id = split_nodekey(key)
     self.assertEqual(volume_id, VOLUME_UUID)
     self.assertEqual(node_id, NODE_UUID)
示例#2
0
 def get_node_with_key(self, key):
     """Using a nodekey, get the node from the appropriate volume."""
     vol_id, node_id = utils.split_nodekey(key)
     return self.volume(vol_id).get_node(node_id)