Actually it's a simile.
An analogy takes two things and makes them the same by comparison "he's as stubborn as a rock", "it's like they are made of money", "his hair is like a ray of light".
Metaphor - similar to a simile but it uses language differently to equate two things "the world is a stage and we are merely players" or "The world is my canvas and I am a painter"...see the difference between simile and metaphor? In a metaphor, you sort of live in that world rather than equate two things.
This has been Lit 101 with Adam. I think I'm right, not sure.