Validate template size during download

The API downloads the entire template before validating it. For a 100 MB
file, this causes the API process to use several hundred megabytes of
memory. If several requests like this come in simultaneously, the API
server will run out of memory.

Closes-Bug: #1233366

Change-Id: I453274d62e71b3f860322dfcd98c2830ef039e9b
Handle BadRequest in VolumeDetachTask

Novaclient raises BadRequest(400) if a volume is already
detached when delete_server_volume is called.

This change treats BadRequest the same as a NotFound in the
VolumeDetachTask, and logs the actual exception string.

Change-Id: I34c01a493e8c87281d2adecb6d4404376cf78738
Closes-Bug: #1232234
resource_id check on router gateway, interface delete

This change prevents RouterGateway and RouterInterface
delete failing if create never managed to set the resource_id.

Change-Id: I88ba2dd9b92546fca684dad2f921c6caf8467367
Closes-Bug: #1231805
Merge "Validate template size during download"
Merge "resource_id check on router gateway, interface delete"
Merge "Handle BadRequest in VolumeDetachTask"