Add back mdns_enabled (#73)

This commit is contained in:
Joshua Spence
2022-05-16 13:56:45 +10:00
committed by GitHub
parent 85a08e202e
commit 09e0556344
2 changed files with 6 additions and 0 deletions

View File

@@ -144,6 +144,11 @@ func NewResource(structName string, resourcePath string) *Resource {
case resource.IsSetting():
resource.ResourcePath = strcase.ToSnake(strings.TrimPrefix(structName, "Setting"))
baseType.Fields[" Key"] = NewFieldInfo("Key", "key", "string", "", false, false, "")
if resource.StructName == "SettingUsg" {
// Removed in v7, retaining for backwards compatibility
baseType.Fields["MdnsEnabled"] = NewFieldInfo("MdnsEnabled", "mdns_enabled", "bool", "", true, false, "")
}
case resource.StructName == "Device":
baseType.Fields[" MAC"] = NewFieldInfo("MAC", "mac", "string", "", true, false, "")
baseType.Fields["Adopted"] = NewFieldInfo("Adopted", "adopted", "bool", "", false, false, "")

View File

@@ -55,6 +55,7 @@ type SettingUsg struct {
H323Module bool `json:"h323_module"`
ICMPTimeout int `json:"icmp_timeout,omitempty"`
LldpEnableAll bool `json:"lldp_enable_all"`
MdnsEnabled bool `json:"mdns_enabled,omitempty"`
MssClamp string `json:"mss_clamp,omitempty"` // auto|custom|disabled
MssClampMss int `json:"mss_clamp_mss,omitempty"` // [1-9][0-9]{2,3}
OffloadAccounting bool `json:"offload_accounting"`