Im kind of compelled to a contrarian view.
If the Iranians were really close to nukes, Obama would want a deal so as not to be at the table when to first test goes off. With that Obama knows the media will dutifully praise him. (WIN for Obama)
If that above is true. Obama knows the Israelis might well take matters into their own hand, conducting an air strike that will set Iran back years. Obama will condemn this air strike. ( WIN for Obama)
With the Israeli air strike, the particulars of deal will no longer matter. Obama and the media will decry that Obamas deal was...never given a chance. ( WIN for Obama)
With all that Obama will punish Israel which is high on his agenda. ( WIN for Obama)
Otherwise, what if, Israel doesnt strike. Is this deal soo sweet because the unspoken agreement is Iran has agree not to test a nuke. ie: Obama to Iran: listen you can have it, just dont test or acknowledge it (like Israels policy, no tests, never acknowledged). (WIN for Obama)