Update api_samples code samples from nova code base

Partial-Bug: #1227280

Change-Id: I44e37d92f020540aa202a1f753a7ffde165fce2b
author: diane fleming
Merge "Update api_samples code samples from nova code base"