diff --git a/acceptance/openstack/waf-premium/v1/policy_test.go b/acceptance/openstack/waf-premium/v1/policy_test.go index 207fc14d2..b79b09a9d 100644 --- a/acceptance/openstack/waf-premium/v1/policy_test.go +++ b/acceptance/openstack/waf-premium/v1/policy_test.go @@ -97,6 +97,9 @@ func TestWafPremiumPolicyWorkflow(t *testing.T) { }, Level: 1, FullDetection: pointerto.Bool(true), + Extend: &policies.ExtendParams{ + Extend: "{\"deep_decode\":false,\"check_all_headers\":true,\"shiro_rememberMe_enable\":false}", + }, } updated, err := policies.Update(client, policy.ID, updateOpts) th.AssertNoErr(t, err) @@ -104,4 +107,5 @@ func TestWafPremiumPolicyWorkflow(t *testing.T) { th.AssertEquals(t, *updated.FullDetection, true) th.AssertEquals(t, updated.Action.Category, "block") th.AssertEquals(t, *updated.Options.WebAttack, false) + th.AssertEquals(t, updated.Extend.Extend, "{\"deep_decode\":false,\"check_all_headers\":true,\"shiro_rememberMe_enable\":false}") } diff --git a/openstack/waf-premium/v1/policies/Update.go b/openstack/waf-premium/v1/policies/Update.go index 5050e7a01..4430e094b 100644 --- a/openstack/waf-premium/v1/policies/Update.go +++ b/openstack/waf-premium/v1/policies/Update.go @@ -19,7 +19,12 @@ type UpdateOpts struct { // Protection level Level int `json:"level"` // Detection mode in the precise protection rule - FullDetection *bool `json:"full_detection"` + FullDetection *bool `json:"full_detection"` + Extend *ExtendParams `json:"extend,omitempty"` +} + +type ExtendParams struct { + Extend string `json:"extend"` } func Update(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*Policy, error) {