Avoid empty entity field in uri path

Currently, empty entity field is accepted but will fail when call cli,
it is because the empty field leads to incorrect rest api uri, which will
get 404 error.

This patch checks some required entity fields, which will present in uri path,
and raises CommandError if they are empty. Note the other required fields
will not cause the same problem, so they are not checked.

Change-Id: I59411b760ff7457064b386911e868518b3057e3a
Closes-Bug: #1313679
Merge "Avoid empty entity field in uri path"