Fixup API code and add missing code from Ceilometer