It was the SURGE, authorized by Bush, that ended the war in Iraq. You might recall that Obama OPPOSED the Surge, along with other liberals. Despite objections from the left, Bush instituted the Surge. It worked. It brought the war pretty much to an end.
The only thing Obama did was call the troops home. That did not end the war. The Surge did that. In fact, the early withdrawal of troops may very well result in a resurgence of violence in Iraq.
So once again Obama takes credit for something he had no hand in. And he refuses to ttake credit for those things that do have his fingerprints - Solyndra, Fiskar, the Chevy Volt fiasco, illegal recess appointments while the Senate was not in recess, the high unemployment rate... the list is nearly endless.