module ietf-alto {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-alto";
prefix "alto";
import ietf-inet-types {
prefix "inet";
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-key-chain {
prefix key-chain;
reference
"RFC 8177: YANG Data Model for Key Chains";
}
import ietf-tcp-server {
prefix tcp;
reference
"RFC DDDD: YANG Groupings for TCP Clients and TCP Servers";
}
import ietf-tls-server {
prefix tls;
reference
"RFC FFFF: YANG Groupings for TLS Clients and TLS Servers";
}
import ietf-http-server {
prefix http;
reference
"RFC GGGG: YANG Groupings for HTTP Clients and HTTP Servers";
}
organization
"IETF ALTO Working Group";
contact
"WG Web:
WG List: ";
description
"This YANG module defines all the configured and operational
parameters of the administrated ALTO server instance.
Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision "2022-10-24" {
description
"Initial Version.";
reference
"RFC XXXX: A YANG Data Model for OAM and Management of ALTO
Protocol.";
}
typedef resource-id {
type string {
length "1..64";
pattern "[0-9a-zA-Z\\-:@_]*";
}
description
"Format of Resource ID";
reference
"Section 9.1.1 of RFC 7285.";
}
// Base identities
identity resource-type {
description
"Base identity for type of information resource.";
}
identity source-type {
description
"Base identity for type of data source.";
}
identity cost-mode {
description
"The cost mode attribute indicates how costs should be
interpreted. Specifically, the cost mode attribute indicates
whether returned costs should be interpreted as numerical
values or ordinal rankings.";
reference
"Section 6.1.2 of RFC 7285.";
}
identity cost-metric {
description
"The cost metric attribute indicates what the cost
represents.";
reference
"Section 6.1.1 of RFC 7285.";
}
// Identities for ALTO information resources
identity network-map {
base resource-type;
description
"Identity for network map.";
}
identity cost-map {
base resource-type;
description
"Identity for cost map.";
}
identity property-map {
base resource-type;
description
"Identity for property map.";
}
// Identities for cost mode
identity numerical {
base cost-mode;
description
"This mode indicates that it is safe to perform numerical
operations";
}
identity ordinal {
base cost-mode;
description
"This mode indicates that the cost values in a cost map
represent ranking";
}
identity array {
if-feature "path-vector";
base cost-mode;
description
"This mode indicates that every cost value in the response body
of a (Filtered) Cost Map or an Endpoint Cost Service MUST be
interpreted as a JSON array.";
}
// Identities for cost metrics
identity routingcost {
base cost-metric;
description
"This metric conveys a generic measure for the cost of routing
traffic from a source to a destination.";
}
identity ane-path {
if-feature "path-vector";
base cost-metric;
description
"This metric indicates that the value of such a cost type
conveys an array of Abstract Network Element (ANE) names,
where each ANE name uniquely represents an ANE traversed by
traffic from a source to a destination.";
}
identity delay-ow {
if-feature "performance-metrics";
base cost-metric;
description
"Section 4.1 of RFC XXXX";
}
identity delay-rt {
if-feature "performance-metrics";
base cost-metric;
description
"Section 4.2 of RFC XXXX";
}
identity delay-variation {
if-feature "performance-metrics";
base cost-metric;
description
"Section 4.3 of RFC XXXX";
}
identity lossrate {
if-feature "performance-metrics";
base cost-metric;
description
"Section 4.4 of RFC XXXX";
}
identity hopcount {
if-feature "performance-metrics";
base cost-metric;
description
"Section 4.5 of RFC XXXX";
}
identity tput {
if-feature "performance-metrics";
base cost-metric;
description
"Section 5.1 of RFC XXXX";
}
identity bw-residual {
if-feature "performance-metrics";
base cost-metric;
description
"Section 5.2 of RFC XXXX";
}
identity bw-available {
if-feature "performance-metrics";
base cost-metric;
description
"Section 5.3 of RFC XXXX";
}
// Features
feature http-listen {
description
"The 'http-listen' feature is only used for test depolyment.
According to Sec 8.3.5 of RFC 7285, it shouldn't be used in
the production depolyment.";
}
feature multi-cost {
description
"Support multi-cost extension.";
reference
"RFC 8189: Multi-Cost Application-Layer Traffic Optimization
(ALTO)";
}
feature incr-update {
description
"Support incremental update extension.";
reference
"RFC 8895: Application-Layer Traffic Optimization (ALTO)
Incremental Updates Using Server-Sent Events (SSE)";
}
feature cost-calendar {
description
"Support cost calendar extension.";
reference
"RFC 8896: Application-Layer Traffic Optimization (ALTO) Cost
Calendar";
}
feature propmap {
description
"Support entity property map extension.";
reference
"RFC 9240: An ALTO Extension: Entity Property Maps";
}
feature cdni {
description
"Support CDNi extension.";
reference
"RFC 9241: Content Delivery Network Interconnection (CDNI)
Request Routing: CDNI Footprint and Capabilities
Advertisement using ALTO";
}
feature path-vector {
description
"Support path vector extension.";
reference
"RFC XXXX: An ALTO Extension: Path Vector";
}
feature performance-metrics {
description
"Support performance metrics extension.";
reference
"RFC XXXX: ALTO Performance Cost Metrics";
}
// Groupings
grouping filter-costmap-cap {
description
"This grouping defines data model for
FilteredCostMapCapabilities.";
reference
"Sec 11.3.2.4 of RFC 7285.";
leaf-list cost-type-names {
type string;
min-elements 1;
description
"Supported cost types";
}
leaf cost-constraints {
type boolean;
description
"If true, then the ALTO server allows cost
constraints to be included in requests to the
corresponding URI. If not present, this field MUST
be interpreted as if it specified false.";
}
leaf max-cost-types {
if-feature "multi-cost";
type uint32;
default 0;
description
"If present with value N greater than 0, this resource
understands the multi-cost extensions in this document and
can return a multi-cost map with any combination of N or
fewer cost types in the 'cost-type-names' list. If omitted,
the default value is 0.";
}
leaf-list testable-cost-type-names {
if-feature "multi-cost";
type string;
description
"If present, the resource allows constraint tests, but only
on the cost type names in this array.";
}
container calendar-attributes {
if-feature "cost-calendar";
leaf-list cost-type-names {
type string;
min-elements 1;
description
"An array of one or more elements indicating the cost type
names in the IRD entry to which the values of
'time-interval-size' and 'number-of-intervals' apply.";
}
leaf time-interval-size {
type decimal64 {
fraction-digits 4;
}
mandatory true;
description
"The duration of an ALTO Calendar time interval in a unit
of seconds.";
}
leaf number-of-intervals {
type uint32 {
range "1..max";
}
mandatory true;
description
"A strictly positive integer (greater or equal to 1) that
indicates the number of values of the Cost Calendar
array.";
}
description
"Configuration for CalendarAttributes.";
reference
"Section 4.1 of RFC 8896.";
}
}
grouping endpoint-cost-cap {
uses filter-costmap-cap;
description
"This grouping defines EndpointCostCapabilities as the same as
FilteredCostMapCapabilities defined by the grouping
filter-costmap-cap.";
reference
"Section 11.5.1.4 of RFC 7285";
}
grouping algorithm {
choice algorithm {
mandatory true;
description
"Information resource creation algorithm to be augmented.";
}
description
"This grouping defines base data model for information
resource creation algorithm.";
}
grouping alto-server-grouping {
description
"A reuseable grouping for configuring an ALTO server without
any consideration for how underlying transport sessions are
established.";
leaf base-uri {
type inet:uri;
description
"The base URI for the ALTO server.";
}
}
grouping alto-server-listen-stack-grouping {
description
"A reuseable grouping for configuring an ALTO server
'listen' protocol stack for a single connection.";
choice transport {
mandatory true;
description
"Selects between available transports.";
case http {
if-feature "http-listen";
container http {
description
"Configures ALTO server stack assuming that
TLS-termination is handled externally.";
container tcp-server-parameters {
description
"A wrapper around the TCP server parameters
to avoid name collisions.";
uses tcp:tcp-server-grouping {
refine "local-port" {
default "80";
description
"The RESTCONF server will listen on the IANA-
assigned well-known port value for 'http'
(80) if no value is specified.";
}
}
}
container http-server-parameters {
description
"A wrapper around the HTTP server parameters
to avoid name collisions.";
uses http:http-server-grouping;
}
container alto-server-parameters {
description
"A wrapper around the ALTO server parameters
to avoid name collisiions.";
uses alto-server-grouping;
}
}
}
case https {
container https {
description
"Configures ALTO server stack assuming that
TLS-termination is handled internally.";
container tcp-server-parameters {
description
"A wrapper around the TCP server parameters
to avoid name collisions.";
uses tcp:tcp-server-grouping {
refine "local-port" {
default "443";
description
"The ALTO server will listen on the IANA-
assigned well-known port value for 'https'
(443) if no value is specified.";
}
}
container tls-server-parameters {
description
"A wrapper around the TLS server parameters
to avoid name collisions.";
uses tls:tls-server-grouping;
}
container http-server-parameters {
description
"A wrapper around the HTTP server parameters
to avoid name collisions.";
uses http:http-server-grouping;
}
container alto-server-parameters {
description
"A wrapper around the ALTO server parameters
to avoid name collisions.";
uses alto-server-grouping;
}
}
}
}
}
}
grouping alto-server-discovery-grouping {
description
"Configure how to set up server discovery for clients or other
ALTO servers to discovery the URI of this ALTO server.";
choice server-discovery-manner {
description
"Selects among available server discovery manners";
case reverse-dns {
description
"Configure DNS NAPTR records for cross-domain ALTO server
discovery using reverse DNS lookup.";
container rdns-naptr-records {
description
"Configuration parameters for DNS NAPTR records.";
leaf-list static-prefix {
type inet:ip-prefix;
description
"Static IP prefixes in the scope.";
}
leaf-list dynamic-prefix-source {
type leafref {
path "/alto:alto-server/alto:data-source/alto:source-id";
}
description
"Dynamic IP prefixes collected from data sources.";
}
}
reference
"RFC 8686: Application-Layer Traffic Optimization (ALTO)
Cross-Domain Server Discovery.";
}
case internet-routing-registry {
description
"Update descr attributes of a aut-num class in a Internet
Routing Registry (IRR) database for ALTO server discovery
using RPSL.";
reference
"RFC 2622: Routing Policy Specification Language (RPSL).";
container irr-params {
description
"Configuration parameters for IRR database.";
leaf aut-num {
type inet:as-number;
description
"The autonomous system (AS) to be updated.";
}
}
}
case peeringdb {
description
"Update metadata of a network record in PeeringDB database
for ALTO server discovery using PeeringDB lookup.";
container peeringdb-params {
description
"Configuration parameters for PeeringDB database.";
leaf org-id {
type uint32;
description
"The ID referring to the org object of the
organization record in PeeringDB.";
}
}
}
}
}
grouping alto-logging-system-grouping {
description
"Grouping for configuration of logging system used by the ALTO
server.";
choice logging-system {
description
"Selects among available logging systems";
case syslog {
description
"Use syslog as logging system.";
container syslog-params {
description
"Configuration parameters for syslog.";
leaf config-file {
type inet:uri {
pattern 'file:.*';
}
description
"The file location of the syslog configuration.";
}
}
}
}
}
// Top-level container
container alto-server {
description
"The ALTO server instance.";
container listen {
description
"Configure the ALTO server to listen for ALTO clients.";
uses alto-server-listen-stack-grouping;
}
container server-discovery {
description
"Configure how the ALTO server to be discovered by others.";
uses alto-server-discovery-grouping;
}
container logging-system {
description
"Configure logging system to capture log messages generated
by the ALTO server.";
uses alto-logging-system-grouping;
}
list cost-type {
key "cost-type-name";
leaf cost-type-name {
type string;
description
"The name to reference cost type";
}
leaf cost-mode {
type identityref {
base cost-mode;
}
mandatory true;
description
"The referenced cost mode";
}
leaf cost-metric {
type identityref {
base cost-metric;
}
mandatory true;
description
"The referenced cost metric";
}
description
"Mapping between name and referenced cost type";
}
list meta {
key "meta-key";
leaf meta-key {
type string;
description
"Custom meta key";
}
leaf meta-value {
type string;
mandatory true;
description
"Custom meta value";
}
description
"Mapping of custom meta information";
reference
"Section 8.4.1 of RFC 7285.";
}
list data-source {
key "source-id";
leaf source-id {
type string;
description
"Data source id that can be referenced by information
resource creation algorithms.";
}
leaf source-type {
type identityref {
base source-type;
}
mandatory true;
description
"Identify the type of the data source.";
}
choice update-policy {
mandatory true;
case reactive {
leaf reactive {
type boolean;
mandatory true;
description
"Reactive mode.";
}
}
case proactive {
leaf poll-interval {
type uint32;
mandatory true;
description
"Polling interval in seconds for proactive mode.";
}
}
description
"Policy to get updates from data sources.";
}
choice source-params {
description
"Data source specific configuration.";
}
description
"List of subscribed data sources.";
}
list resource {
key "resource-id";
leaf resource-id {
type resource-id;
description
"resource-id to be defined.";
}
leaf resource-type {
type identityref {
base resource-type;
}
mandatory true;
description
"identityref to be defined.";
}
leaf description {
type string;
description
"The optional description for this information resource.";
}
leaf-list accepted-group {
type string;
description
"Access list for authenticated clients.";
}
leaf-list dependency {
type leafref {
path "/alto:alto-server/alto:resource/alto:resource-id";
}
description
"A list of dependent information resources.";
}
container auth {
description
"The authentication options";
choice auth-type-selection {
description
"Options for expressing authentication
setting.";
case auth-key-chain {
leaf key-chain {
type key-chain:key-chain-ref;
description
"key-chain name.";
}
}
case auth-key {
}
case auth-tls {
}
}
}
choice resource-params {
description
"Resource-specific configuration.";
case ird {
container alto-ird-params {
leaf delegation {
type inet:uri;
mandatory true;
description
"Upstream IRD to be delegated.";
}
description
"IRD-specific configuration.";
}
}
case networkmap {
container alto-networkmap-params {
description
"(Filtered) Network Map specific configuration.";
reference
"Section 11.2.1 and Section 11.3.1 of RFC 7285.";
leaf is-default {
type boolean;
description
"Set whether this is the default network map.";
}
leaf filtered {
type boolean;
default false;
description
"Configure whether filtered network map is
supported.";
}
uses algorithm;
}
}
case costmap {
container alto-costmap-params {
description
"(Filtered) Cost Map specific configuration.";
reference
"Section 11.2.2 and Section 11.3.2 of RFC 7285.";
leaf filtered {
type boolean;
description
"Configure whether filtered cost map is supported.";
}
uses filter-costmap-cap;
uses algorithm;
}
}
case endpointcost {
container alto-endpointcost-params {
description
"Endpoint Cost Service specific configuration.";
reference
"Section 11.5 of RFC 7285.";
uses endpoint-cost-cap;
uses algorithm;
}
}
case endpointprop {
container alto-endpointprop-params {
description
"Endpoint Cost Service specific configuration.";
reference
"Section 11.5 of RFC 7285.";
leaf-list prop-types {
type string;
min-elements 1;
description
"Supported endpoint properties.";
}
uses algorithm;
}
}
case propmap {
if-feature "propmap";
container alto-propmap-params {
uses algorithm;
description
"(Filtered) Entity Property Map specific
configuration.";
}
}
case cdni {
if-feature "cdni";
container alto-cdni-params {
uses algorithm;
description
"CDNi specific configuration";
}
}
case update {
if-feature "incr-update";
container alto-update-params {
uses algorithm;
description
"Incremental Updates specific configuration";
}
}
}
description
"ALTO information resources to be defined";
}
}
}