//DeleteObject calls the OpenStack delete object API using //previously obtained token. // //Note from API doc: "A DELETE to a versioned object removes the current version //of the object and replaces it with the next-most current version, moving it //from the non-current container to the current." .. "If you want to completely //remove an object and you have five total versions of it, you must DELETE it //five times." func DeleteObject(session *openstack.Session, url string) (err error) { resp, err := session.Delete(url, nil, nil) if err != nil { return err } defer resp.Body.Close() // CF return util.CheckHTTPResponseStatusCode(resp) }