diff --git a/cmd/scw/testdata/test-all-usage-dns-record-bulk-update-usage.golden b/cmd/scw/testdata/test-all-usage-dns-record-bulk-update-usage.golden index 8d052a6273..223b54b636 100644 --- a/cmd/scw/testdata/test-all-usage-dns-record-bulk-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-dns-record-bulk-update-usage.golden @@ -74,6 +74,8 @@ ARGS: [changes.{index}.delete.id-fields.data] [changes.{index}.delete.id-fields.ttl] [return-all-records] Whether or not to return all the records + [disallow-new-zone-creation] Forbid the creation of the target zone if not existing (default action is yes) + [serial] Don't use the autoincremenent serial but the provided one (0 to keep the same) FLAGS: -h, --help help for bulk-update diff --git a/cmd/scw/testdata/test-all-usage-dns-zone-import-usage.golden b/cmd/scw/testdata/test-all-usage-dns-zone-import-usage.golden index b62a69ef59..a82c72325d 100644 --- a/cmd/scw/testdata/test-all-usage-dns-zone-import-usage.golden +++ b/cmd/scw/testdata/test-all-usage-dns-zone-import-usage.golden @@ -6,10 +6,17 @@ USAGE: scw dns zone import [arg=value ...] ARGS: - dns-zone The DNS zone to import - [content] - [project-id] Project ID to use. If none is passed the default project ID will be used - [format] (unknown_raw_format | bind) + dns-zone The DNS zone to import + [project-id] Project ID to use. If none is passed the default project ID will be used + [bind-source.content] + [axfr-source.name-server] + [axfr-source.tsig-key.name] + [axfr-source.tsig-key.key] + [axfr-source.tsig-key.algorithm] + +DEPRECATED ARGS: + [content] + [format] (unknown_raw_format | bind) FLAGS: -h, --help help for import diff --git a/docs/commands/dns.md b/docs/commands/dns.md index 5b1e1aa6b0..8e8759514d 100644 --- a/docs/commands/dns.md +++ b/docs/commands/dns.md @@ -260,6 +260,8 @@ scw dns record bulk-update [arg=value ...] | changes.{index}.delete.id-fields.data | | | | changes.{index}.delete.id-fields.ttl | | | | return-all-records | | Whether or not to return all the records | +| disallow-new-zone-creation | | Forbid the creation of the target zone if not existing (default action is yes) | +| serial | | Don't use the autoincremenent serial but the provided one (0 to keep the same) | @@ -673,9 +675,14 @@ scw dns zone import [arg=value ...] | Name | | Description | |------|---|-------------| | dns-zone | Required | The DNS zone to import | -| content | | | +| ~~content~~ | Deprecated | | | project-id | | Project ID to use. If none is passed the default project ID will be used | -| format | One of: `unknown_raw_format`, `bind` | | +| ~~format~~ | Deprecated
One of: `unknown_raw_format`, `bind` | | +| bind-source.content | | | +| axfr-source.name-server | | | +| axfr-source.tsig-key.name | | | +| axfr-source.tsig-key.key | | | +| axfr-source.tsig-key.algorithm | | | diff --git a/internal/namespaces/domain/v2beta1/domain_cli.go b/internal/namespaces/domain/v2beta1/domain_cli.go index cb5c47ea07..b6b0a9fa91 100644 --- a/internal/namespaces/domain/v2beta1/domain_cli.go +++ b/internal/namespaces/domain/v2beta1/domain_cli.go @@ -785,6 +785,20 @@ All edits will be versioned. Deprecated: false, Positional: false, }, + { + Name: "disallow-new-zone-creation", + Short: `Forbid the creation of the target zone if not existing (default action is yes)`, + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "serial", + Short: `Don't use the autoincremenent serial but the provided one (0 to keep the same)`, + Required: false, + Deprecated: false, + Positional: false, + }, }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*domain.UpdateDNSZoneRecordsRequest) @@ -964,17 +978,47 @@ func dnsZoneImport() *core.Command { { Name: "content", Required: false, - Deprecated: false, + Deprecated: true, Positional: false, }, core.ProjectIDArgSpec(), { Name: "format", Required: false, - Deprecated: false, + Deprecated: true, Positional: false, EnumValues: []string{"unknown_raw_format", "bind"}, }, + { + Name: "bind-source.content", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "axfr-source.name-server", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "axfr-source.tsig-key.name", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "axfr-source.tsig-key.key", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "axfr-source.tsig-key.algorithm", + Required: false, + Deprecated: false, + Positional: false, + }, }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { request := args.(*domain.ImportRawDNSZoneRequest)