Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Release History
**Network**

* az network list-service-aliases: support list service aliases which can be used for Service Endpoint Policies
* dns zone import: Support .@ in record name


**Packaging**

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mytxt2 7200 TXT "abc def"
mytxt2 7200 TXT "foo bar"
mytxtrs 3600 TXT "hi"
mysrv 3600 SRV 1 2 1234 target.contoso.com.
_sip._tls.@ 3600 IN SRV 100 1 443 target.contoso.com.
caa1 60 IN CAA 0 issue "ca1.contoso.com"
60 IN CAA 128 iodef mailto:[email protected]
caa2 60 IN CAA 0 issue ca1.contoso.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
; Exported zone file from Azure DNS
; Zone name: zone1.com
; Resource Group Name: cli_dns_zone1_import000001
; Date and time (UTC): Sun, 27 Oct 2019 14:17:04 +0800
; Date and time (UTC): Mon, 09 Dec 2019 19:13:32 +0800

$TTL 300
$ORIGIN zone1.com.

@ 3600 IN SOA ns1-05.azure-dns.com. azuredns-hostmaster.microsoft.com. (
@ 3600 IN SOA ns1-02.azure-dns.com. azuredns-hostmaster.microsoft.com. (
1 ; serial
3600 ; refresh
300 ; retry
2419200 ; expire
300 ; minimum
)

172800 IN NS ns1-05.azure-dns.com.
172800 IN NS ns2-05.azure-dns.net.
172800 IN NS ns3-05.azure-dns.org.
172800 IN NS ns4-05.azure-dns.info.
172800 IN NS ns1-02.azure-dns.com.
172800 IN NS ns2-02.azure-dns.net.
172800 IN NS ns3-02.azure-dns.org.
172800 IN NS ns4-02.azure-dns.info.

_sip._tls 3600 IN SRV 100 1 443 target.contoso.com.

caa1 60 IN CAA 0 issue "ca1.contoso.com"
60 IN CAA 128 iodef "mailto:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
; Exported zone file from Azure DNS
; Zone name: zone2.com
; Resource Group Name: cli_dns_zone2_import000001
; Date and time (UTC): Sun, 27 Oct 2019 14:17:05 +0800
; Date and time (UTC): Mon, 09 Dec 2019 19:13:33 +0800

$TTL 3600
$ORIGIN zone2.com.

@ 3600 IN SOA ns1-05.azure-dns.com. hostmaster. (
@ 3600 IN SOA ns1-01.azure-dns.com. hostmaster. (
10 ; serial
900 ; refresh
600 ; retry
86400 ; expire
3600 ; minimum
)

3600 IN NS ns1-05.azure-dns.com.
3600 IN NS ns2-05.azure-dns.net.
3600 IN NS ns3-05.azure-dns.org.
3600 IN NS ns4-05.azure-dns.info.
3600 IN NS ns1-01.azure-dns.com.
3600 IN NS ns2-01.azure-dns.net.
3600 IN NS ns3-01.azure-dns.org.
3600 IN NS ns4-01.azure-dns.info.

200 IN TXT "this is another SPF, this time as TXT"
200 IN TXT "v=spf1 mx ip4:14.14.22.0/23 a:mail.trum.ch mx:mese.ch include:spf.mapp.com ?all"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
; Exported zone file from Azure DNS
; Zone name: zone3.com
; Resource Group Name: cli_dns_zone3_import000001
; Date and time (UTC): Sun, 27 Oct 2019 14:17:04 +0800
; Date and time (UTC): Mon, 09 Dec 2019 19:13:32 +0800

$TTL 10800
$ORIGIN zone3.com.

@ 86400 IN SOA ns1-05.azure-dns.com. hostmaster.zone3.com. (
@ 86400 IN SOA ns1-01.azure-dns.com. hostmaster.zone3.com. (
2003080800 ; serial
43200 ; refresh
900 ; retry
1814400 ; expire
10800 ; minimum
)

86400 IN NS ns1-05.azure-dns.com.
86400 IN NS ns2-05.azure-dns.net.
86400 IN NS ns3-05.azure-dns.org.
86400 IN NS ns4-05.azure-dns.info.
86400 IN NS ns1-01.azure-dns.com.
86400 IN NS ns2-01.azure-dns.net.
86400 IN NS ns3-01.azure-dns.org.
86400 IN NS ns4-01.azure-dns.info.

_sip._tcp 3600 IN SRV 10 20 30 foo.com.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
; Exported zone file from Azure DNS
; Zone name: zone4.com
; Resource Group Name: cli_dns_zone4_import000001
; Date and time (UTC): Sun, 27 Oct 2019 14:17:04 +0800
; Date and time (UTC): Mon, 09 Dec 2019 19:13:33 +0800

$TTL 10800
$ORIGIN zone4.com.

@ 3600 IN SOA ns1-02.azure-dns.com. hostmaster.zone4.com. (
@ 3600 IN SOA ns1-09.azure-dns.com. hostmaster.zone4.com. (
2003080800 ; serial
43200 ; refresh
900 ; retry
1814400 ; expire
10800 ; minimum
)

100 IN NS ns1-02.azure-dns.com.
100 IN NS ns2-02.azure-dns.net.
100 IN NS ns3-02.azure-dns.org.
100 IN NS ns4-02.azure-dns.info.
100 IN NS ns1-09.azure-dns.com.
100 IN NS ns2-09.azure-dns.net.
100 IN NS ns3-09.azure-dns.org.
100 IN NS ns4-09.azure-dns.info.

c1 10 IN A 11.1.2.3
10 IN A 11.2.3.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
; Exported zone file from Azure DNS
; Zone name: zone5.com
; Resource Group Name: cli_dns_zone5_import000001
; Date and time (UTC): Sun, 27 Oct 2019 14:17:04 +0800
; Date and time (UTC): Mon, 09 Dec 2019 19:13:32 +0800

$TTL 10800
$ORIGIN zone5.com.

@ 3600 IN SOA ns1-07.azure-dns.com. hostmaster.zone5.com. (
@ 3600 IN SOA ns1-03.azure-dns.com. hostmaster.zone5.com. (
2003080800 ; serial
43200 ; refresh
900 ; retry
Expand All @@ -17,10 +17,10 @@ $ORIGIN zone5.com.

3600 IN A 1.2.3.4

172800 IN NS ns1-07.azure-dns.com.
172800 IN NS ns2-07.azure-dns.net.
172800 IN NS ns3-07.azure-dns.org.
172800 IN NS ns4-07.azure-dns.info.
172800 IN NS ns1-03.azure-dns.com.
172800 IN NS ns2-03.azure-dns.net.
172800 IN NS ns3-03.azure-dns.org.
172800 IN NS ns4-03.azure-dns.info.

default 3600 IN A 0.1.2.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
; Exported zone file from Azure DNS
; Zone name: zone6.com
; Resource Group Name: cli_dns_zone6_import000001
; Date and time (UTC): Sun, 27 Oct 2019 14:17:03 +0800
; Date and time (UTC): Mon, 09 Dec 2019 19:13:32 +0800

$TTL 300
$ORIGIN zone6.com.

@ 3600 IN SOA ns1-08.azure-dns.com. azuredns-hostmaster.microsoft.com. (
@ 3600 IN SOA ns1-04.azure-dns.com. azuredns-hostmaster.microsoft.com. (
1 ; serial
3600 ; refresh
300 ; retry
Expand All @@ -17,10 +17,10 @@ $ORIGIN zone6.com.

3600 IN A 1.1.1.1

172800 IN NS ns1-08.azure-dns.com.
172800 IN NS ns2-08.azure-dns.net.
172800 IN NS ns3-08.azure-dns.org.
172800 IN NS ns4-08.azure-dns.info.
172800 IN NS ns1-04.azure-dns.com.
172800 IN NS ns2-04.azure-dns.net.
172800 IN NS ns3-04.azure-dns.org.
172800 IN NS ns4-04.azure-dns.info.

www 3600 IN A 1.1.1.1

Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
; Exported zone file from Azure DNS
; Zone name: zone7.com
; Resource Group Name: cli_dns_zone7_import000001
; Date and time (UTC): Sun, 27 Oct 2019 14:17:04 +0800
; Date and time (UTC): Mon, 09 Dec 2019 19:13:32 +0800

$TTL 300
$ORIGIN zone7.com.

@ 3600 IN SOA ns1-01.azure-dns.com. azuredns-hostmaster.microsoft.com. (
@ 3600 IN SOA ns1-09.azure-dns.com. azuredns-hostmaster.microsoft.com. (
1 ; serial
3600 ; refresh
300 ; retry
2419200 ; expire
300 ; minimum
)

172800 IN NS ns1-01.azure-dns.com.
172800 IN NS ns2-01.azure-dns.net.
172800 IN NS ns3-01.azure-dns.org.
172800 IN NS ns4-01.azure-dns.info.
172800 IN NS ns1-09.azure-dns.com.
172800 IN NS ns2-09.azure-dns.net.
172800 IN NS ns3-09.azure-dns.org.
172800 IN NS ns4-09.azure-dns.info.

60 IN TXT "a\\b\255\000\;\"\"\"testtesttest\"\"\""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
; Exported zone file from Azure DNS
; Zone name: zone8.com
; Resource Group Name: cli_dns_zone8_import000001
; Date and time (UTC): Sun, 27 Oct 2019 14:17:04 +0800
; Date and time (UTC): Mon, 09 Dec 2019 19:13:32 +0800

$TTL 300
$ORIGIN zone8.com.

@ 3600 IN SOA ns1-07.azure-dns.com. azuredns-hostmaster.microsoft.com. (
@ 3600 IN SOA ns1-02.azure-dns.com. azuredns-hostmaster.microsoft.com. (
1 ; serial
3600 ; refresh
300 ; retry
2419200 ; expire
300 ; minimum
)

172800 IN NS ns1-07.azure-dns.com.
172800 IN NS ns2-07.azure-dns.net.
172800 IN NS ns3-07.azure-dns.org.
172800 IN NS ns4-07.azure-dns.info.
172800 IN NS ns1-02.azure-dns.com.
172800 IN NS ns2-02.azure-dns.net.
172800 IN NS ns3-02.azure-dns.org.
172800 IN NS ns4-02.azure-dns.info.

* 3600 IN A 2.3.4.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,11 @@ def parse_zone_file(text, zone_name, ignore_invalid=False):
current_ttl = _convert_to_seconds(record['val'])
else:
record_name = record['name']
if record_name == '@':
record_name = current_origin
if '@' in record_name:
record_name = record_name.replace('@', current_origin)
elif not record_name.endswith('.'):
record_name = '{}.{}'.format(record_name, current_origin)
print(current_origin, record_name)

# special record-specific fix-ups
if record_type == 'ptr':
Expand Down