Various fixes and workarounds to talk to HP API server

Change-Id: Id16b34790aac14b8af2803f8556e66b560ce6c2f