diff --git a/go.mod b/go.mod index 0ae568e..e9f887f 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ toolchain go1.23.1 require ( github.com/aerospike/aerospike-client-go/v7 v7.8.0 - github.com/aerospike/aerospike-management-lib v1.5.1-0.20241028112258-5562cfa38ea5 - github.com/aerospike/tools-common-go v0.0.0-20241008160846-fe05e01c0f83 + github.com/aerospike/aerospike-management-lib v1.6.0 + github.com/aerospike/tools-common-go v0.0.0-20250103065152-e9dbc6120714 github.com/bombsimon/logrusr/v4 v4.1.0 github.com/docker/docker v27.4.1+incompatible github.com/go-logr/logr v1.4.2 diff --git a/go.sum b/go.sum index ae717ce..2458405 100644 --- a/go.sum +++ b/go.sum @@ -4,10 +4,10 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/aerospike/aerospike-client-go/v7 v7.8.0 h1:mKWTf/8sWQkWSYlIR3ZWXZMr9FQQPnIihrA+ujGD+n8= github.com/aerospike/aerospike-client-go/v7 v7.8.0/go.mod h1:STlBtOkKT8nmp7iD+sEkr/JGEOu+4e2jGlNN0Jiu2a4= -github.com/aerospike/aerospike-management-lib v1.5.1-0.20241028112258-5562cfa38ea5 h1:hJsmyWNrXYLILGC520ZOOjVkbcCjkK3X3h829ZipZLk= -github.com/aerospike/aerospike-management-lib v1.5.1-0.20241028112258-5562cfa38ea5/go.mod h1:hsEptY/AmTmHoJnItJNmfJ4yCMG8LIB8YPnIpIyvGXI= -github.com/aerospike/tools-common-go v0.0.0-20241008160846-fe05e01c0f83 h1:q8iZiCYXGznOfPqA0dESEzwhyYcb/bv4Nsze02bxKXY= -github.com/aerospike/tools-common-go v0.0.0-20241008160846-fe05e01c0f83/go.mod h1:bRbp47f86+MvO4VIMOJa7MQVGEoObDlmmzBCbI5njcY= +github.com/aerospike/aerospike-management-lib v1.6.0 h1:+bV9bjO9APvF4EOH7+l6608B4rj2Ns8KJVQJ1qqCJsg= +github.com/aerospike/aerospike-management-lib v1.6.0/go.mod h1:hsEptY/AmTmHoJnItJNmfJ4yCMG8LIB8YPnIpIyvGXI= +github.com/aerospike/tools-common-go v0.0.0-20250103065152-e9dbc6120714 h1:KNMoO/NWboyWJhB7CGXUhESYPIQd2MtNDJdfQdrfQLo= +github.com/aerospike/tools-common-go v0.0.0-20250103065152-e9dbc6120714/go.mod h1:4DNS6ukaprOST0wb3n4hJ6/wDLyM6MQ0MCsmZC/CqKU= github.com/bombsimon/logrusr/v4 v4.1.0 h1:uZNPbwusB0eUXlO8hIUwStE6Lr5bLN6IgYgG+75kuh4= github.com/bombsimon/logrusr/v4 v4.1.0/go.mod h1:pjfHC5e59CvjTBIU3V3sGhFWFAnsnhOR03TRc6im0l8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= diff --git a/schema/schemas b/schema/schemas index 50ca067..87bc637 160000 --- a/schema/schemas +++ b/schema/schemas @@ -1 +1 @@ -Subproject commit 50ca067d6b9d248bf9dea2d78060e6f42a9c2c0e +Subproject commit 87bc637c2c2edecd63194cee03c445c83ac60ddc diff --git a/testdata/cases/server80/conf-tests.json b/testdata/cases/server80/conf-tests.json new file mode 100644 index 0000000..99dc93e --- /dev/null +++ b/testdata/cases/server80/conf-tests.json @@ -0,0 +1,11 @@ +[ + { + "Source":"testdata/cases/server80/server80.conf", + "Destination":"testdata/cases/server80/server80-res-.yaml", + "Expected":"testdata/cases/server80/server80.yaml", + "Arguments":["convert","--aerospike-version","8.0.0.0","--format","asconfig","--output","testdata/cases/server80/server80-res-.yaml"], + "SkipServerTest":false, + "ServerErrorAllowList":null, + "ServerImage":"aerospike/aerospike-server-enterprise:8.0.0.0-rc1" + } +] \ No newline at end of file diff --git a/testdata/cases/server80/server80.conf b/testdata/cases/server80/server80.conf new file mode 100644 index 0000000..b187945 --- /dev/null +++ b/testdata/cases/server80/server80.conf @@ -0,0 +1,108 @@ + +service { + cluster-name cl1 + + user root + group root + pidfile /dummy/file/path1 + + batch-max-requests 1000 + tls-refresh-period 300S +} + +logging { + console { + context any info + } +} + +network { + service { + address any + port 3000 + } + + heartbeat { + mode multicast + multicast-group 127.0.0.1 + port 9918 + + + + + interval 150 + timeout 10 + } + + fabric { + port 3001 + } + + info { + port 3003 + } +} + +namespace ns1 { + replication-factor 2 + + index-type shmem + sindex-type shmem + + disable-mrt-writes false + mrt-duration 60 + strong-consistency true + migrate-skip-unreadable false + + default-read-touch-ttl-pct 50 + + storage-engine memory { + data-size 32G + } + + evict-indexes-memory-pct 50 + + indexes-memory-budget 2147483648 + + nsup-period 2048 + + set s1 { + default-read-touch-ttl-pct -1 + } + + active-rack 2 +} + +namespace ns2 { + replication-factor 2 + index-type shmem + sindex-type shmem + default-read-touch-ttl-pct 0 + storage-engine device { + device /dummy/mount/point1 + evict-used-pct 70 + stop-writes-used-pct 70 + stop-writes-avail-pct 20 + flush-size 2M + + } + + set s2 { + default-read-touch-ttl-pct 50 + } +} + +security { + default-password-file /dummy/file/path2 +} + +xdr { + dc dataCenter1 { + node-address-port 127.0.0.1 3000 + namespace ns1 { + remote-namespace ns2 + ship-versions-interval 2M + ship-versions-policy interval + } + } +} \ No newline at end of file diff --git a/testdata/cases/server80/server80.yaml b/testdata/cases/server80/server80.yaml new file mode 100644 index 0000000..e48a770 --- /dev/null +++ b/testdata/cases/server80/server80.yaml @@ -0,0 +1,78 @@ +logging: + - any: info + name: console +namespaces: + - default-read-touch-ttl-pct: 0 + index-type: + type: shmem + name: ns2 + replication-factor: 2 + sets: + - default-read-touch-ttl-pct: 50 + name: s2 + sindex-type: + type: shmem + storage-engine: + devices: + - /dummy/mount/point1 + evict-used-pct: 70 + flush-size: 2097152 + stop-writes-avail-pct: 20 + stop-writes-used-pct: 70 + type: device + - active-rack: 2 + default-read-touch-ttl-pct: 50 + evict-indexes-memory-pct: 50 + index-type: + type: shmem + indexes-memory-budget: 2147483648 + name: ns1 + nsup-period: 2048 + replication-factor: 2 + disable-mrt-writes: false + mrt-duration: 60 + strong-consistency: true + migrate-skip-unreadable: false + sets: + - default-read-touch-ttl-pct: -1 + name: s1 + sindex-type: + type: shmem + storage-engine: + data-size: 34359738368 + type: memory +network: + fabric: + port: 3001 + heartbeat: + interval: 150 + mode: multicast + multicast-groups: + - 127.0.0.1 + port: 9918 + timeout: 10 + info: + port: 3003 + service: + addresses: + - any + port: 3000 +security: + default-password-file: /dummy/file/path2 +service: + batch-max-requests: 1000 + cluster-name: cl1 + group: root + pidfile: /dummy/file/path1 + tls-refresh-period: 300 + user: root +xdr: + dcs: + - name: dataCenter1 + namespaces: + - name: ns1 + remote-namespace: ns2 + ship-versions-interval: 120 + ship-versions-policy: interval + node-address-ports: + - 127.0.0.1:3000 \ No newline at end of file diff --git a/testdata/cases/server80/versions.json b/testdata/cases/server80/versions.json new file mode 100644 index 0000000..ae5a5dc --- /dev/null +++ b/testdata/cases/server80/versions.json @@ -0,0 +1 @@ +{"TestedVersion":"8.0.0.0-rc1","OriginallyUsedVersion":"8.0.0.0-rc1"} \ No newline at end of file diff --git a/testdata/cases/server80/yaml-tests.json b/testdata/cases/server80/yaml-tests.json new file mode 100644 index 0000000..ddacaa7 --- /dev/null +++ b/testdata/cases/server80/yaml-tests.json @@ -0,0 +1,11 @@ +[ + { + "Source":"testdata/cases/server80/server80.yaml", + "Destination":"testdata/cases/server80/server80-res-.conf", + "Expected":"testdata/cases/server80/server80.conf", + "Arguments":["convert","--aerospike-version","8.0.0.0","--format","yaml","--output","testdata/cases/server80/server80-res-.conf"], + "SkipServerTest":false, + "ServerErrorAllowList":null, + "ServerImage":"aerospike/aerospike-server-enterprise:8.0.0.0-rc1" + } +] \ No newline at end of file