A future for Gorgie City Farm has been secured with the agreement of a 25 year lease by the council.