HUAWEICLOUD: Document DNSSEC capability and improve docs, reliability (#3084)

This commit is contained in:
Hui Hui 2024-08-15 20:53:45 +08:00 committed by GitHub
parent 8899f45816
commit e8eca6a31e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 9 deletions

View file

@ -42,7 +42,7 @@ D("example.com", REG_NONE, DnsProvider(DSP_HWCLOUD),
A("test", "223.5.5.5", {hw_line: "CN"}), // GEODNS A("test", "223.5.5.5", {hw_line: "CN"}), // GEODNS
A("test", "223.6.6.6", {hw_line: "CN", hw_weight: "10"}), // GEODNS with weight A("test", "223.6.6.6", {hw_line: "CN", hw_weight: "10"}), // GEODNS with weight
// this example will create 3 rrsets with the same name "lb" // this example will create 3 rrsets with the same name "rr-lb"
A("rr-lb", "10.0.0.1", {hw_weight: "10", hw_rrset_key: "lb-zone-a"}), A("rr-lb", "10.0.0.1", {hw_weight: "10", hw_rrset_key: "lb-zone-a"}),
A("rr-lb", "10.0.0.2", {hw_weight: "10", hw_rrset_key: "lb-zone-a"}), A("rr-lb", "10.0.0.2", {hw_weight: "10", hw_rrset_key: "lb-zone-a"}),
A("rr-lb", "10.0.1.1", {hw_weight: "10", hw_rrset_key: "lb-zone-b"}), A("rr-lb", "10.0.1.1", {hw_weight: "10", hw_rrset_key: "lb-zone-b"}),
@ -95,7 +95,7 @@ The minimum permissions required are as follows:
} }
``` ```
To determine the `Region` parameter, refer to the [endpoint page of huaweicloud](https://developer.huaweicloud.com/intl/en-us/endpoint?DNS). For example, on the international site, the `Region` name `ap-southeast-1` is known to work. To determine the `Region` parameter, refer to the [endpoint page of huaweicloud](https://console-intl.huaweicloud.com/apiexplorer/#/endpoint/DNS). For example, on the international site, the `Region` name `ap-southeast-1` is known to work.
If that doesn't work, log into Huaweicloud's website and open the [API Explorer](https://console-intl.huaweicloud.com/apiexplorer/#/openapi/DNS/debug?api=ListPublicZones), find the `ListPublicZones` API, select a different Region and click Debug to try and find your Region. If that doesn't work, log into Huaweicloud's website and open the [API Explorer](https://console-intl.huaweicloud.com/apiexplorer/#/openapi/DNS/debug?api=ListPublicZones), find the `ListPublicZones` API, select a different Region and click Debug to try and find your Region.

View file

@ -40,7 +40,7 @@ If a feature is definitively not supported for whatever reason, we would also li
| [`HETZNER`](provider/hetzner.md) | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❔ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❔ | ✅ | ✅ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | | [`HETZNER`](provider/hetzner.md) | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ | ❔ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❔ | ✅ | ✅ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`HEXONET`](provider/hexonet.md) | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ❔ | ✅ | ❔ | ❔ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ✅ | ❔ | | [`HEXONET`](provider/hexonet.md) | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ❔ | ✅ | ❔ | ❔ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ✅ | ❔ |
| [`HOSTINGDE`](provider/hostingde.md) | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❔ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ❔ | ✅ | ✅ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | | [`HOSTINGDE`](provider/hostingde.md) | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❔ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ❔ | ✅ | ✅ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`HUAWEICLOUD`](provider/huaweicloud.md) | ❌ | ✅ | ❌ | ❔ | ❌ | ✅ | | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | | [`HUAWEICLOUD`](provider/huaweicloud.md) | ❌ | ✅ | ❌ | ❔ | ❌ | ✅ | | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`INTERNETBS`](provider/internetbs.md) | ❌ | ❌ | ✅ | ❌ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❌ | ❔ | | [`INTERNETBS`](provider/internetbs.md) | ❌ | ❌ | ✅ | ❌ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❌ | ❔ |
| [`INWX`](provider/inwx.md) | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | ❔ | ✅ | ❔ | ✅ | ✅ | ❔ | ✅ | ✅ | ✅ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | | [`INWX`](provider/inwx.md) | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | ❔ | ✅ | ❔ | ✅ | ✅ | ❔ | ✅ | ✅ | ✅ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ |
| [`LINODE`](provider/linode.md) | ❌ | ✅ | ❌ | ❌ | ❔ | ✅ | ❔ | ❔ | ❌ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❌ | ❌ | ✅ | | [`LINODE`](provider/linode.md) | ❌ | ✅ | ❌ | ❌ | ❔ | ✅ | ❔ | ❔ | ❌ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ | ❌ | ❌ | ✅ |

View file

@ -22,6 +22,7 @@ func getRRSetIDFromRecords(rcs models.Records) []string {
} }
ids = append(ids, *r.Original.(*model.ShowRecordSetByZoneResp).Id) ids = append(ids, *r.Original.(*model.ShowRecordSetByZoneResp).Id)
} }
slices.Sort(ids)
return slices.Compact(ids) return slices.Compact(ids)
} }

View file

@ -28,9 +28,9 @@ Info required in `creds.json`:
Record level metadata available: Record level metadata available:
- hw_line (refer below Huawei Cloud DNS API documentation for available lines, default "default_view") - hw_line (refer below Huawei Cloud DNS API documentation for available lines, default "default_view")
(https://support.huaweicloud.com/intl/en-us/api-dns/en-us_topic_0085546214.html) (https://support.huaweicloud.com/intl/en-us/api-dns/en-us_topic_0085546214.html)
- hw_weight (0-1000, default "1") - hw_weight (0-1000, default "1")
- hw_rrset_key (default "") - hw_rrset_key (default "")
*/ */
@ -82,7 +82,7 @@ func newHuaweicloud(m map[string]string, metadata json.RawMessage) (providers.DN
var features = providers.DocumentationNotes{ var features = providers.DocumentationNotes{
// The default for unlisted capabilities is 'Cannot'. // The default for unlisted capabilities is 'Cannot'.
// See providers/capabilities.go for the entire list of capabilities. // See providers/capabilities.go for the entire list of capabilities.
providers.CanAutoDNSSEC: providers.Cannot(), providers.CanAutoDNSSEC: providers.Unimplemented("No public api provided, but can be turned on manually in the console."),
providers.CanGetZones: providers.Can(), providers.CanGetZones: providers.Can(),
providers.CanUseAlias: providers.Cannot(), providers.CanUseAlias: providers.Cannot(),
providers.CanUseCAA: providers.Can(), providers.CanUseCAA: providers.Can(),

View file

@ -143,9 +143,6 @@ func collectRecordsByLineAndWeightAndKey(records models.Records) map[string]mode
weight := rec.Metadata[metaWeight] weight := rec.Metadata[metaWeight]
rrsetKey := rec.Metadata[metaKey] rrsetKey := rec.Metadata[metaKey]
key := weight + "," + line + "," + rrsetKey key := weight + "," + line + "," + rrsetKey
if _, ok := recordsByLineAndWeight[key]; !ok {
recordsByLineAndWeight[key] = models.Records{}
}
recordsByLineAndWeight[key] = append(recordsByLineAndWeight[key], rec) recordsByLineAndWeight[key] = append(recordsByLineAndWeight[key], rec)
} }
return recordsByLineAndWeight return recordsByLineAndWeight