Skip to content

Commit 6638b24

Browse files
authored
feat(domain): add support for bind source and axfr source (#1965)
1 parent 5273172 commit 6638b24

File tree

4 files changed

+68
-8
lines changed

4 files changed

+68
-8
lines changed

cmd/scw/testdata/test-all-usage-dns-record-bulk-update-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ ARGS:
7474
[changes.{index}.delete.id-fields.data]
7575
[changes.{index}.delete.id-fields.ttl]
7676
[return-all-records] Whether or not to return all the records
77+
[disallow-new-zone-creation] Forbid the creation of the target zone if not existing (default action is yes)
78+
[serial] Don't use the autoincremenent serial but the provided one (0 to keep the same)
7779

7880
FLAGS:
7981
-h, --help help for bulk-update

cmd/scw/testdata/test-all-usage-dns-zone-import-usage.golden

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ USAGE:
66
scw dns zone import <dns-zone ...> [arg=value ...]
77

88
ARGS:
9-
dns-zone The DNS zone to import
10-
[content]
11-
[project-id] Project ID to use. If none is passed the default project ID will be used
12-
[format] (unknown_raw_format | bind)
9+
dns-zone The DNS zone to import
10+
[project-id] Project ID to use. If none is passed the default project ID will be used
11+
[bind-source.content]
12+
[axfr-source.name-server]
13+
[axfr-source.tsig-key.name]
14+
[axfr-source.tsig-key.key]
15+
[axfr-source.tsig-key.algorithm]
16+
17+
DEPRECATED ARGS:
18+
[content]
19+
[format] (unknown_raw_format | bind)
1320

1421
FLAGS:
1522
-h, --help help for import

docs/commands/dns.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ scw dns record bulk-update <dns-zone ...> [arg=value ...]
260260
| changes.{index}.delete.id-fields.data | | |
261261
| changes.{index}.delete.id-fields.ttl | | |
262262
| return-all-records | | Whether or not to return all the records |
263+
| disallow-new-zone-creation | | Forbid the creation of the target zone if not existing (default action is yes) |
264+
| serial | | Don't use the autoincremenent serial but the provided one (0 to keep the same) |
263265

264266

265267

@@ -673,9 +675,14 @@ scw dns zone import <dns-zone ...> [arg=value ...]
673675
| Name | | Description |
674676
|------|---|-------------|
675677
| dns-zone | Required | The DNS zone to import |
676-
| content | | |
678+
| ~~content~~ | Deprecated | |
677679
| project-id | | Project ID to use. If none is passed the default project ID will be used |
678-
| format | One of: `unknown_raw_format`, `bind` | |
680+
| ~~format~~ | Deprecated<br />One of: `unknown_raw_format`, `bind` | |
681+
| bind-source.content | | |
682+
| axfr-source.name-server | | |
683+
| axfr-source.tsig-key.name | | |
684+
| axfr-source.tsig-key.key | | |
685+
| axfr-source.tsig-key.algorithm | | |
679686

680687

681688

internal/namespaces/domain/v2beta1/domain_cli.go

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,20 @@ All edits will be versioned.
785785
Deprecated: false,
786786
Positional: false,
787787
},
788+
{
789+
Name: "disallow-new-zone-creation",
790+
Short: `Forbid the creation of the target zone if not existing (default action is yes)`,
791+
Required: false,
792+
Deprecated: false,
793+
Positional: false,
794+
},
795+
{
796+
Name: "serial",
797+
Short: `Don't use the autoincremenent serial but the provided one (0 to keep the same)`,
798+
Required: false,
799+
Deprecated: false,
800+
Positional: false,
801+
},
788802
},
789803
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
790804
request := args.(*domain.UpdateDNSZoneRecordsRequest)
@@ -964,17 +978,47 @@ func dnsZoneImport() *core.Command {
964978
{
965979
Name: "content",
966980
Required: false,
967-
Deprecated: false,
981+
Deprecated: true,
968982
Positional: false,
969983
},
970984
core.ProjectIDArgSpec(),
971985
{
972986
Name: "format",
973987
Required: false,
974-
Deprecated: false,
988+
Deprecated: true,
975989
Positional: false,
976990
EnumValues: []string{"unknown_raw_format", "bind"},
977991
},
992+
{
993+
Name: "bind-source.content",
994+
Required: false,
995+
Deprecated: false,
996+
Positional: false,
997+
},
998+
{
999+
Name: "axfr-source.name-server",
1000+
Required: false,
1001+
Deprecated: false,
1002+
Positional: false,
1003+
},
1004+
{
1005+
Name: "axfr-source.tsig-key.name",
1006+
Required: false,
1007+
Deprecated: false,
1008+
Positional: false,
1009+
},
1010+
{
1011+
Name: "axfr-source.tsig-key.key",
1012+
Required: false,
1013+
Deprecated: false,
1014+
Positional: false,
1015+
},
1016+
{
1017+
Name: "axfr-source.tsig-key.algorithm",
1018+
Required: false,
1019+
Deprecated: false,
1020+
Positional: false,
1021+
},
9781022
},
9791023
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
9801024
request := args.(*domain.ImportRawDNSZoneRequest)

0 commit comments

Comments
 (0)