Yeah, they shot a soldier at a war memorial and went into the main government building, which they parked outside of. I don't think it's a stretch to attach political motives to it. Could turn out to be random but on balance of probabilities, I think "terrorism" is a safe bet. The way the guy got into Centre Block suggests there was some research involved; he knew where he was going.
I also doubt it has anything to do with Mallala. Why would they hit Ottawa when the PM is going to be here, in Toronto, with her later today? (Or was - he just cancelled.)