Skip to content

Commit 5b97102

Browse files
authored
Merge pull request #1438 from ioito/hotfix/qx-dns-zone-name-server
fix(region): dns name server
2 parents 7b0c9ce + d03d028 commit 5b97102

File tree

6 files changed

+44
-4
lines changed

6 files changed

+44
-4
lines changed

pkg/cloudprovider/resources.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,10 @@ type ICloudDnsZone interface {
13541354

13551355
AddDnsRecord(*DnsRecord) (string, error)
13561356

1357+
GetNameServers() ([]string, error)
1358+
GetOriginalNameServers() ([]string, error)
1359+
GetRegistrar() string
1360+
13571361
Delete() error
13581362

13591363
GetDnsProductType() TDnsProductType

pkg/multicloud/aliyun/dns_domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
)
2727

2828
type SDomain struct {
29-
multicloud.SVirtualResourceBase
29+
multicloud.SDnsZoneBase
3030
AliyunTags
3131
client *SAliyunClient
3232
ttlMinValue int64

pkg/multicloud/aliyun/private_zone.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type SPvtzBindVpcs struct {
3939
}
4040

4141
type SPrivateZone struct {
42-
multicloud.SResourceBase
42+
multicloud.SDnsZoneBase
4343
AliyunTags
4444
client *SAliyunClient
4545

pkg/multicloud/aws/dnszone.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type AssociatedVPC struct {
3939
}
4040

4141
type SDnsZone struct {
42-
multicloud.SVirtualResourceBase
42+
multicloud.SDnsZoneBase
4343
AwsTags
4444
client *SAwsClient
4545

pkg/multicloud/dns_zone_base.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright 2019 Yunion
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package multicloud
16+
17+
import (
18+
"yunion.io/x/cloudmux/pkg/cloudprovider"
19+
"yunion.io/x/pkg/errors"
20+
)
21+
22+
type SDnsZoneBase struct {
23+
SVirtualResourceBase
24+
}
25+
26+
func (self *SDnsZoneBase) GetNameServers() ([]string, error) {
27+
return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetNameServers")
28+
}
29+
30+
func (self *SDnsZoneBase) GetOriginalNameServers() ([]string, error) {
31+
return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetOriginalNameServers")
32+
}
33+
34+
func (self *SDnsZoneBase) GetRegistrar() string {
35+
return ""
36+
}

pkg/multicloud/qcloud/dnspod_domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
)
2929

3030
type SDomian struct {
31-
multicloud.SVirtualResourceBase
31+
multicloud.SDnsZoneBase
3232
QcloudTags
3333
client *SQcloudClient
3434

0 commit comments

Comments
 (0)