diff --git a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithIPv4ParentPrefixSelectorWhenAppliedThenSucceed/chainsaw-test.yaml b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithIPv4ParentPrefixSelectorWhenAppliedThenSucceed/chainsaw-test.yaml index 52876cb0..45827906 100644 --- a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithIPv4ParentPrefixSelectorWhenAppliedThenSucceed/chainsaw-test.yaml +++ b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithIPv4ParentPrefixSelectorWhenAppliedThenSucceed/chainsaw-test.yaml @@ -45,3 +45,27 @@ spec: tenant: MY_TENANT_2 customFields: netboxOperatorRestorationHash: e3ea4eebe4ab49cc7c91dc9f96007965ede43338 + - patch: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv4-parentprefixselector-sample + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv4-parentprefixselector-sample + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: Prefix + metadata: + name: prefixclaim-ipv4-parentprefixselector-sample + spec: + (preserveInNetbox == true): false diff --git a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedDeletedAppliedThenRestorationSucceed/chainsaw-test.yaml b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedDeletedAppliedThenRestorationSucceed/chainsaw-test.yaml index 0301a1e6..474a71f0 100644 --- a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedDeletedAppliedThenRestorationSucceed/chainsaw-test.yaml +++ b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedDeletedAppliedThenRestorationSucceed/chainsaw-test.yaml @@ -56,7 +56,6 @@ spec: description: some description parentPrefix: 2.0.3.0/24 prefixLength: /28 - preserveInNetbox: true site: MY_SITE tenant: MY_TENANT status: @@ -73,7 +72,6 @@ spec: comments: your comments description: some description prefix: 2.0.3.16/28 - preserveInNetbox: true site: MY_SITE tenant: MY_TENANT customFields: @@ -87,10 +85,10 @@ spec: kind: PrefixClaim name: prefixclaim-ipv4-apply-delete-apply-restored-1 - name: Apply prefix claim CR 1 for the second time and check after deletion and reapply of CR 1 - description: + description: try: - apply: - file: netbox_v1_prefixclaim_1.yaml + file: netbox_v1_prefixclaim_1.yaml - assert: resource: apiVersion: netbox.dev/v1 @@ -135,7 +133,6 @@ spec: description: some description parentPrefix: 2.0.3.0/24 prefixLength: /28 - preserveInNetbox: true site: MY_SITE tenant: MY_TENANT status: @@ -152,8 +149,31 @@ spec: comments: your comments description: some description prefix: 2.0.3.16/28 - preserveInNetbox: true site: MY_SITE tenant: MY_TENANT customFields: netboxOperatorRestorationHash: 0265a1eec7bba9748f9542476fe3dccb46cceb5a + - patch: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv4-apply-delete-apply-restored-1 + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv4-apply-delete-apply-restored-1 + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: Prefix + metadata: + name: prefixclaim-ipv4-apply-delete-apply-restored-1 + spec: + (preserveInNetbox == true): false diff --git a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedDeletedAppliedThenRestorationSucceed/netbox_v1_prefixclaim_2.yaml b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedDeletedAppliedThenRestorationSucceed/netbox_v1_prefixclaim_2.yaml index 3471d5ab..ba07167e 100644 --- a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedDeletedAppliedThenRestorationSucceed/netbox_v1_prefixclaim_2.yaml +++ b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedDeletedAppliedThenRestorationSucceed/netbox_v1_prefixclaim_2.yaml @@ -10,6 +10,6 @@ spec: site: "MY_SITE" description: "some description" comments: "your comments" - preserveInNetbox: true + preserveInNetbox: false parentPrefix: "2.0.3.0/24" prefixLength: "/28" diff --git a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedThenSucceed/chainsaw-test.yaml b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedThenSucceed/chainsaw-test.yaml index 354e3dcd..44734393 100644 --- a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedThenSucceed/chainsaw-test.yaml +++ b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenAppliedThenSucceed/chainsaw-test.yaml @@ -41,3 +41,27 @@ spec: tenant: MY_TENANT customFields: netboxOperatorRestorationHash: f773cf04f71c017931716e125a8520d70f4c7f83 + - patch: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv4-apply + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv4-apply + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: Prefix + metadata: + name: prefixclaim-ipv4-apply + spec: + (preserveInNetbox == true): false diff --git a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenParentPrefixSelectorAppliedDeletedAppliedThenRestorationSucceed/chainsaw-test.yaml b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenParentPrefixSelectorAppliedDeletedAppliedThenRestorationSucceed/chainsaw-test.yaml index be5473d1..362ce637 100644 --- a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenParentPrefixSelectorAppliedDeletedAppliedThenRestorationSucceed/chainsaw-test.yaml +++ b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenParentPrefixSelectorAppliedDeletedAppliedThenRestorationSucceed/chainsaw-test.yaml @@ -66,7 +66,6 @@ spec: site: MY_SITE tenant: MY_TENANT prefixLength: /28 - preserveInNetbox: true site: MY_SITE_2 tenant: MY_TENANT_2 status: @@ -83,7 +82,6 @@ spec: comments: your comments description: some description prefix: 3.0.4.16/28 - preserveInNetbox: true site: MY_SITE_2 tenant: MY_TENANT_2 customFields: @@ -97,10 +95,10 @@ spec: kind: PrefixClaim name: prefixclaim-ipv4-parentprefixselector-apply-delete-apply-restored-1 - name: Apply prefix claim CR 1 for the second time and check after deletion and reapply of CR 1 - description: + description: try: - apply: - file: netbox_v1_prefixclaim_1.yaml + file: netbox_v1_prefixclaim_1.yaml - assert: resource: apiVersion: netbox.dev/v1 @@ -155,7 +153,6 @@ spec: site: MY_SITE tenant: MY_TENANT prefixLength: /28 - preserveInNetbox: true site: MY_SITE_2 tenant: MY_TENANT_2 status: @@ -172,8 +169,31 @@ spec: comments: your comments description: some description prefix: 3.0.4.16/28 - preserveInNetbox: true site: MY_SITE_2 tenant: MY_TENANT_2 customFields: netboxOperatorRestorationHash: 2fecef786a6c3590bc219c540d2a142f9e2ad907 + - patch: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv4-parentprefixselector-apply-delete-apply-restored-1 + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv4-parentprefixselector-apply-delete-apply-restored-1 + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: Prefix + metadata: + name: prefixclaim-ipv4-parentprefixselector-apply-delete-apply-restored-1 + spec: + (preserveInNetbox == true): false diff --git a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenParentPrefixSelectorAppliedDeletedAppliedThenRestorationSucceed/netbox_v1_prefixclaim_2.yaml b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenParentPrefixSelectorAppliedDeletedAppliedThenRestorationSucceed/netbox_v1_prefixclaim_2.yaml index 4310742d..f22d4bd1 100644 --- a/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenParentPrefixSelectorAppliedDeletedAppliedThenRestorationSucceed/netbox_v1_prefixclaim_2.yaml +++ b/tests/e2e/Prefix/IPv4/GivenPrefixClaimWithPreserveWhenParentPrefixSelectorAppliedDeletedAppliedThenRestorationSucceed/netbox_v1_prefixclaim_2.yaml @@ -10,7 +10,7 @@ spec: site: "MY_SITE_2" description: "some description" comments: "your comments" - preserveInNetbox: true + preserveInNetbox: false prefixLength: "/28" parentPrefixSelector: # The keys and values are case-sensitive tenant: "MY_TENANT" # Use the `name` value instead of the `slug` value diff --git a/tests/e2e/Prefix/IPv6/GivenPrefixClaimWithIPv6ParentPrefixSelectorWhenAppliedThenSucceed/chainsaw-test.yaml b/tests/e2e/Prefix/IPv6/GivenPrefixClaimWithIPv6ParentPrefixSelectorWhenAppliedThenSucceed/chainsaw-test.yaml index ca29d522..a109137e 100644 --- a/tests/e2e/Prefix/IPv6/GivenPrefixClaimWithIPv6ParentPrefixSelectorWhenAppliedThenSucceed/chainsaw-test.yaml +++ b/tests/e2e/Prefix/IPv6/GivenPrefixClaimWithIPv6ParentPrefixSelectorWhenAppliedThenSucceed/chainsaw-test.yaml @@ -47,3 +47,27 @@ spec: tenant: MY_TENANT_2 customFields: netboxOperatorRestorationHash: 92913dac42ca35232682325c7f04639959d3a3cf + - patch: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv6-parentprefixselector-apply-succeed + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: PrefixClaim + metadata: + name: prefixclaim-ipv6-parentprefixselector-apply-succeed + spec: + preserveInNetbox: false + - assert: + resource: + apiVersion: netbox.dev/v1 + kind: Prefix + metadata: + name: prefixclaim-ipv6-parentprefixselector-apply-succeed + spec: + (preserveInNetbox == true): false