From 5106dccba12e88081db96200840684c3410c8aa4 Mon Sep 17 00:00:00 2001 From: Wim Henderickx Date: Wed, 13 Nov 2024 16:21:15 -0700 Subject: [PATCH] updated builtin functions --- docs/rn/0.0.18.md | 7 +++++++ pkg/controller/reconciler/starlark/reconciler.go | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 docs/rn/0.0.18.md diff --git a/docs/rn/0.0.18.md b/docs/rn/0.0.18.md new file mode 100644 index 0000000..be47706 --- /dev/null +++ b/docs/rn/0.0.18.md @@ -0,0 +1,7 @@ +# Release 0.0.18 + +[ChangeLog](https://github.com/kform-dev/choreo/releases) + +## renamed the starlark builtin commands using the python convention + +change isIPv4 and isIPv6 to is_ipv4 and is_ipv6 \ No newline at end of file diff --git a/pkg/controller/reconciler/starlark/reconciler.go b/pkg/controller/reconciler/starlark/reconciler.go index 5c0188f..b3e4d9e 100644 --- a/pkg/controller/reconciler/starlark/reconciler.go +++ b/pkg/controller/reconciler/starlark/reconciler.go @@ -70,8 +70,8 @@ func NewReconcilerFn(client resourceclient.Client, reconcileConfig *choreov1alph "get_prefixlength": starlark.NewBuiltin("get_prefixlength", getPrefixLength), "get_subnetname": starlark.NewBuiltin("get_subnetname", getSubnetName), "get_address": starlark.NewBuiltin("get_address", getAddress), - "isIPv4": starlark.NewBuiltin("isIPv4", isIPv4), - "isIPv6": starlark.NewBuiltin("isIPv6", isIPv6), + "is_ipv4": starlark.NewBuiltin("is_ipv4", isIPv4), + "is_ipv6": starlark.NewBuiltin("is_ipv6", isIPv6), "is_conditionready": starlark.NewBuiltin("is_condition_ready", isConditionReady), }