Iranian military leaders were relieved at the recent election of the “moderate” Hassan Rowhani to replace Mahmoud Ahmadinejad as president. Rowhani is known to be a superb negotiator and someone you can reason with. Ahmadinejad was neither of those things and his constant and hysterical threats to Israel made war with Israel an ever increasing possibility. This was made worse by the growing threat of Iran developing nuclear weapons. Ahmadinejad also liked to boast of how well prepared Iran was to kick Israeli ass if it ever came to a fight. Iranian military leaders cringed at this because they knew that the military power Ahmadinejad was boasting of was largely an illusion. The constant stream of boastful press releases put out by the Iranian military were for building domestic morale, not to describe any real improvements in Iranian military capabilities. The Israeli’s knew this, as did Ahmadinejad (well, he was told) but the numerous threats against Israel caused the Israelis to threaten right back. The problem was that Israel was much more capable to attacking Iran than Iran was in defending itself.
While Israel has a huge stockpile of fuel, ammo, and other supplies for wartime (about 30 days’ worth), Iran has very little. While Iran pumps a lot of oil, it doesn’t have the refineries to produce much aircraft grade fuel. Iran has few smart bombs, missiles, and, well, not much of anything compared to Israel.
Israel can put over 500 aircraft (mostly F-15s and F-16s) a day (as in sorties) over Iran. That’s in addition to more than twice as many for any short range threat. Israel has over 25,000 smart bombs and missiles (not counting smaller missiles like Hellfire). Within a few days this Israeli air power could destroy what little Iran has in the way of major weapons systems (armored vehicles, aircraft, warships, and weapons research and manufacturing facilities). Worse, the earlier claims of Iranian military strength would not only be exposed as false but greatly diminished from what they actually were before the Israelis came by. Iranian military leaders did not want this to happen, although the senior clerics of the religious dictatorship that rules Iran saw a positive angle to an Israeli attack; it would rally all Iranians behind the generally disliked government.
The Iranian problem is that three decades of sanctions has made it impossible to replace obsolete and worn out gear or even maintain the elderly systems they have to rely on. Thus, the best defenses (anti-aircraft missiles and jet fighters) against an Israeli attack are largely absent. What is available is ancient and probably ineffective against Israeli SEAD (Suppression of Enemy Air Defenses) capabilities.
For example, Iran has been having increasing problems keeping its 1970s era F-5s flying. The ones that are still flying tend to crash a lot, or not be available for use because of maintenance problems (including spare parts shortages). Spare parts for all U.S. aircraft Iran still uses have been hard to come by. Iran has managed, sort of. Nevertheless, the Iranian Air Force is largely a fraud. It has lots of aircraft that, for the most part, sit there but can't fly because of age and lack of replacement parts. Those that can fly would likely provide target practice for Israeli fighters.
The Iranian Air Force is still recovering from the effects of the 1979 revolution (which led to an embargo on spare parts and new aircraft). Despite that, many Iranian warplanes remain flyable but only for short periods. The main reason for even that is an extensive smuggling operation that obtains spare parts. Two of their aircraft, the U.S. F-4D and F-5E Tiger, were widely used around the world. Somewhere, someone had parts for these planes that Iran could buy. There are still about 40 of each in service, with less than half of them flyable at any time.
This was less the case with Iran's most expensive warplane, the U.S. F-14 Tomcat. Iran was the only export customer of this aircraft. Some F-14s have been kept flyable, despite the rumored sabotage of Iran's AIM-54 Phoenix missiles by U.S. technicians, as they were leaving. To demonstrate this, they sent 25 F-14s on a fly-over of Tehran in 1985. Today, Iran has about 20 F-14s, with less than half of them flyable.
Iran has sought to buy new foreign aircraft. In the 1990s, with the end of the Cold War and the collapse of the Soviet Union, they sought to buy from Russia. Despite the low prices, a combination of Western pressure (to not sell) and the lack of Iranian money for high-ticket items, not that many aircraft were obtained. One unforeseen opportunity was the 1991 Gulf War. Many Iraqi aircraft (most of them Russian-built) fled to Iran to avoid American attack. The Iranians never returned them. Iran ended up with up to 60 MiG-29s. There were also 18 Su-24s, a force that was expanded by more purchases from Russia. Black market spare parts have been available, but the MiG-29 is a notoriously difficult aircraft to maintain, even when you have all the parts you need.
Iran currently has about two hundred fighters and fighter bombers, but only about half can be put into action and then usually for only one sortie a day. The chronic shortage of spare parts limits the number of hours the aircraft can be flown. This means pilots lack good flying skills. The poor maintenance and untrained pilots leads to more accidents.
Iran is similarly ill-prepared when it comes to ground based anti-aircraft defense. Iran has managed to keep operational some of the American Hawk anti-aircraft missile systems it bought in the 1970s. But these are not very capable these days and the Israelis know all about Hawk. Iran has had limited success in buying new systems from Russia and China and, in general, is as ill-prepared as it is in the air to oppose an Israeli attack.