ListTrustAnchors = auto()
ListZoneToCaches = auto()
ListOutgoingTLSConfigurations = auto()
+ ListOpenTelemetryTraceConditions = auto()
String = auto()
Uint64 = auto()
LType.ListProtobufServers, LType.ListDNSTapFrameStreamServers, LType.ListDNSTapNODFrameStreamServers,
LType.ListSortLists, LType.ListRPZs, LType.ListZoneToCaches, LType.ListAllowedAdditionalQTypes,
LType.ListProxyMappings, LType.ListForwardingCatalogZones, LType.ListIncomingWSConfigs,
- LType.ListOutgoingTLSConfigurations)
+ LType.ListOutgoingTLSConfigurations, LType.ListOpenTelemetryTraceConditions)
def get_olddoc_typename(typ):
"""Given a type from table.py, return the old-style type name"""
return 'Sequence of `IncomingWSConfig`_'
if typ == LType.ListOutgoingTLSConfigurations:
return 'Sequence of `OutgoingTLSConfiguration`_'
+ if typ == LType.ListOpenTelemetryTraceConditions:
+ return 'Sequence of `OpenTelemetryTraceCondition`_'
return 'Unknown2' + str(typ)
def get_default_olddoc_value(typ, val):
ciphers_tls_13: String,
}
+#[derive(Deserialize, Serialize, Clone, Debug, PartialEq)]
+#[serde(deny_unknown_fields)]
+struct OpenTelemetryTraceCondition {
+ #[serde(default, skip_serializing_if = "crate::is_default")]
+ acls: Vec<String>,
+ #[serde(default, skip_serializing_if = "crate::is_default")]
+ qnames: Vec<String>,
+ #[serde(default, skip_serializing_if = "crate::is_default")]
+ qtypes: Vec<String>,
+ #[serde(default = "crate::U32::<{u32::MAX}>::value", skip_serializing_if = "crate::U32::<{u32::MAX}>::is_equal")]
+ qid: u32,
+ #[serde(default, skip_serializing_if = "crate::is_default")]
+ edns_option_required: bool,
+ #[serde(default, skip_serializing_if = "crate::is_default")]
+ traceid_only: bool,
+}
+
// Two structs used to generated YAML based on a vector of name to value mappings
// Cannot use Enum as CXX has only very basic Enum support
struct Value {
}
}
+impl OpenTelemetryTraceCondition {
+ pub fn validate(&self, field: &str) -> Result<(), ValidationError> {
+ validate_vec(
+ &(field.to_string() + ".acls"),
+ &self.acls,
+ validate_subnet,
+ )?;
+ validate_vec(
+ &(field.to_string() + ".qnames"),
+ &self.qnames,
+ validate_name,
+ )?;
+ validate_vec(
+ &(field.to_string() + ".qtypes"),
+ &self.qtypes,
+ validate_qtype,
+ )?;
+ if self.qid != u32::MAX && self.qid > u16::MAX.into() {
+ let msg = format!("{}.qid: must be between 0 and 2^16", field);
+ return Err(ValidationError { msg });
+ }
+ Ok(())
+ }
+}
+
#[allow(clippy::ptr_arg)] //# Avoids creating a rust::Slice object on the C++ side.
pub fn validate_auth_zones(field: &str, vec: &Vec<AuthZone>) -> Result<(), ValidationError> {
validate_vec(field, vec, |field, element| element.validate(field))
'versionadded': '5.4.0',
'runtime': ['reload-lua-config', 'reload-yaml'],
},
+ {
+ 'name' : 'opentelemetry_trace_conditions',
+ 'section' : 'logging',
+ 'type' : LType.ListOpenTelemetryTraceConditions,
+ 'default' : '',
+ 'help' : 'Sequence of OpenTelemetryTraceCondition',
+ 'doc' : '''
+ XXX
+ ''',
+ 'skip-old' : 'No equivalent old style setting',
+ 'versionadded': '5.4.0',
+ 'runtime': ['reload-lua-config', 'reload-yaml'],
+ },
]