Skip to content

Commit d18061e

Browse files
committed
Networking V2: use 200 code for Update policy call
Use StatusOK for Update QoS policy call.
1 parent 6ee9145 commit d18061e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

openstack/networking/v2/extensions/qos/policies/requests.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func Update(c *gophercloud.ServiceClient, policyID string, opts UpdateOptsBuilde
255255
return
256256
}
257257
_, r.Err = c.Put(updateURL(c, policyID), b, &r.Body, &gophercloud.RequestOpts{
258-
OkCodes: []int{202},
258+
OkCodes: []int{200},
259259
})
260260
return
261261
}

openstack/networking/v2/extensions/qos/policies/testing/requests_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ func TestUpdatePolicy(t *testing.T) {
422422
th.TestJSONRequest(t, r, UpdatePolicyRequest)
423423

424424
w.Header().Add("Content-Type", "application/json")
425-
w.WriteHeader(http.StatusAccepted)
425+
w.WriteHeader(http.StatusOK)
426426

427427
fmt.Fprintf(w, UpdatePolicyResponse)
428428
})

0 commit comments

Comments
 (0)