By ordinance, the council may establish city departments, boards, offices, or agencies and may prescribe the functions thereof, except that no function assigned by law to a particular department, board, office, or agency may be discontinued unless this chapter specifically so provides.